作者热门文章
- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
此外,我还在 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
}
感谢有人向我强调,缺少什么以避免出现此警告消息?
最佳答案
这是一个错误,将在下一个 Parse SDK 版本中修复 https://developers.facebook.com/bugs/1537241009878763/
关于ios - Parse.enableLocalDatastore() - 警告 : A long-running operation is being executed on the main thread,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27704613/
我是一名优秀的程序员,十分优秀!