[Parse enableLocalDatastore];
PFInstallation * currentInstallation = [PFInstallation currentInstallation];
我发现这些方法通过在warnParSEOperationOnMainThread上设置一个符号断点并检查调用堆栈来引起麻烦.
我不能用异步替换这些调用,据我所知,这些方法是从主线程定期调用的.这是一个解析错误,还是应该从后台线程调用所有这些方法?
解决方法 将电话转入…dispatch_async(dispatch_get_global_queue(disPATCH_QUEUE_PRIORITY_DEFAulT,0),^{ PFInstallation *currentInstallation = [PFInstallation currentInstallation]; dispatch_async(dispatch_get_main_queue(),^(voID){ // any UI updates need to happen in here back on the main thread });})
您将不再看到警告.
总结以上是内存溢出为你收集整理的ios – 在正常Parse功能的主线程警告上执行长时间运行的 *** 作全部内容,希望文章能够帮你解决ios – 在正常Parse功能的主线程警告上执行长时间运行的 *** 作所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)