You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the content of the function, we are trying to call that inside main.async. is that wrong?
func firebaseLoop(){
// The app cannot register with firebase until it gets a token, which only occurs at registration time, and it needs access to the appDelegate.
// This must be called after FirebaseApp.configure(), so we dispatch it and wait until the app is initialized from RegistrationViewController...
GLOBAL_BACKGROUND_QUEUE.async{while !StudyManager.real_study_loaded {sleep(1) // print("waiting for study to load")
}whileFirebaseApp.app()==nil{ // FirebaseApp.app() emits the firebase spam log
sleep(1) // print("waiting firbase app to be ready")
}Messaging.messaging().delegate =selfUNUserNotificationCenter.current().delegate =self
// App crashes if this isn't called on main thread
DispatchQueue.main.async{UIApplication.shared.registerForRemoteNotifications()iflet token =Messaging.messaging().fcmToken {self.sendFCMToken(fcmToken: token)}}}}
Getting these errors on at least my development build.... but not consistently. App doesn't crash. Am confused.
The text was updated successfully, but these errors were encountered: