[Office Hours] Accessing the user stored in firebase from SpeziAccount #124
Replies: 1 comment 5 replies
-
Hi @kkellybonilla, The best way to take advantage of Spezi in this case is to use its module system. You can learn about modules in the Spezi documentation. A Tip Module needs to be placed into the Configuration section of your App to enable and configure it. Modules have a way to use the final class PatientManager: Module {
@Dependency(Account.self)
private var account
// ...
} You can then use |
Beta Was this translation helpful? Give feedback.
-
Related Discussion
Hi! I'm on the Stanford360 team and I'm creating a
PatientManager
observable class to manage the patient/user. I want to be able to access theAccount.details
set in the onboarding since it has the user's name/date of birth already; however, I'm struggling to figure out how to access it from thePatientManager
class file. I looked through the documentation, but I could only find how to access theAccount
from SwiftUI files, not regular Swift files.Reproduction
n/a
Additional context
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions