iOS SDK - Accessing `Purchases.shared.appUserID` immediately after initialization


Directly after initializing the RevenueCat SDK in my AppDelegate.didFinishLaunchingWithOptions method, I call `Purchases.shared.appUserID`. I briefly looked into the implementation and saw that `IdentityManager.currentAppUserId` (which is used by `Purchases.shared.appUserID` to retrieve the actual id) uses a `fatalError` when no cached app user id is present:


    var currentAppUserID: String {
        guard let appUserID = self.deviceCache.cachedAppUserID else {

        return appUserID


My setup:


    with: Configuration.Builder(withAPIKey: "...")
Purchases.shared.delegate = self
let appUserId = Purchases.shared.appUserID // <- safe?


I assume, that the initialization process via `Purchases.configure` is synchronous and that I can safely call `Purchases.shared.appUserID` as shown in the code snippet above. Is this correct or are there any scenarios in which this will crash or yield an invalid id?

This post has been closed for comments