gpt4 book ai didi

ios - Parse.enableLocalDatastore() - 警告 : A long-running operation is being executed on the main thread

转载 作者:IT王子 更新时间:2023-10-29 05:53:28 25 4
gpt4 key购买 nike

此外,我还在 dispatch_async 中执行了 Parse.enableLocalDatastore() - 我仍然收到警告。

即使我在 warnParseOperationOnMainThread 上添加一个符号断点,它也不会中断

这是应用委托(delegate)的代码片段

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com