Wie kann meine Anwendung warten, bis mein Anruf API beendet ist?Wie kann meine "didFinishLaunchingWithOptions" warten, bis call api beendet
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
GMSServices.provideAPIKey("AIzadGlsfR35k4BeHCXmRq3GDSQ-l_5gcD8")
FlicAuth.sharedInstance
//Call Api here
application.registerUserNotificationSettings(UIUserNotificationSettings(forTypes: [.Alert, .Badge, .Sound], categories: nil))
application.registerForRemoteNotifications()
if(launchOptions?[UIApplicationLaunchOptionsLocationKey] != nil){
LocationService.sharedInstance.startMonitoringLocation()
}
return FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
}
den Dank im Voraus
Können wir fragen, warum würdest du das machen wollen? – Gruntcakes
Sie wollen nicht warten. Wenn es zu lange dauert, wird iOS Ihre App für zu lange zum Starten bringen. – rmaddy
Ich möchte meinen ersten Bildschirm abhängig von den Daten ändern, die ich von der API-Anruf erhalten –