Как мое приложение может дождаться завершения работы моего API вызова?
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)
}
Подробнее здесь: https://stackoverflow.com/questions/366 ... api-finish