我还在 dispatch_async 中执行了 Parse.enableLocalDatastore() - 我仍然有警告。
即使我在 warnParseOperationOnMainThread 添加符号断点,它也不会中断
这是来自应用程序委托的代码片段
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
Parse.enableLocalDatastore()
Parse.setApplicationId("XXX", clientKey: "YYY")
PFAnalytics.trackAppOpenedWithLaunchOptionsInBackground(launchOptions, block: nil )
var defaultACL = PFACL()
defaultACL.setPublicReadAccess(true)
defaultACL.setPublicWriteAccess(false)
PFACL.setDefaultACL(defaultACL, withAccessForCurrentUser:true)
CAUser.registerSubclass()
NSLog("App finish loading")
dispatch_async(dispatch_get_main_queue()){
() -> Void in
// any UI updates need to happen in here back on the main thread
}
}
return true
}
要求
感谢有人向我强调,为了避免这个警告信息缺少什么?