首先,我知道这是什么意思.问题是我在无法转换为
后台调用的标准
调用上收到此
错误.我在应用程式开始时遇到这个
错误:
[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
});
})
您将不再看到警告.