Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/107.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions(启动选项)挂起应用程序_Ios_Swift_Facebook_Parse Platform - Fatal编程技术网

Ios PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions(启动选项)挂起应用程序

Ios PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions(启动选项)挂起应用程序,ios,swift,facebook,parse-platform,Ios,Swift,Facebook,Parse Platform,使用最新的FB iOS SDK和Parse以及ParseFacebookUtilsV4 pod 'FBSDKCoreKit' pod 'FBSDKShareKit' pod 'FBSDKLoginKit' pod 'Parse' pod 'ParseUI' pod 'ParseCrashReporting' pod 'ParseFacebookUtilsV4' 我的应用程序在启动时挂起。以下是我的应用程序代理代码: func application(application: UI

使用最新的FB iOS SDK和Parse以及ParseFacebookUtilsV4

 pod 'FBSDKCoreKit'
 pod 'FBSDKShareKit'
 pod 'FBSDKLoginKit'
 pod 'Parse'
 pod 'ParseUI'
 pod 'ParseCrashReporting'
 pod 'ParseFacebookUtilsV4'
我的应用程序在启动时挂起。以下是我的应用程序代理代码:

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

    Fabric.with([Crashlytics.self])
    configurePushNotifications(application)
    Parse.enableLocalDatastore()

    let configuration = ParseClientConfiguration {
        $0.applicationId = "myapp"
        $0.clientKey = "123123123"
        $0.server = "https://xxxxxx.herokuapp.com/parse"
    }
    Parse.initializeWithConfiguration(configuration)


    if let launchOptions = launchOptions {
        PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions(launchOptions)
    } else {
        PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions([NSObject:AnyObject]())
    }
最后一次呼叫导致应用程序挂起,特别是在块中:

- (PFUserAuthenticationController *)userAuthenticationController {
    __block PFUserAuthenticationController *controller = nil;
    dispatch_sync(_controllerAccessQueue, ^{
        if (!_userAuthenticationController) {
            _userAuthenticationController = [PFUserAuthenticationController controllerWithDataSource:self];
        }
        controller = _userAuthenticationController;
    });
    return controller;
}
内部
PFCoreManager.m


我不相信我在这里做了什么不寻常的事情,我已经尝试过删除并重新安装这个应用程序。在模拟器中也会发生同样的事情。

我遇到了同样的问题。通过阅读最近的发行说明,我们做了一些工作来自动注册实现PFSubclassing协议的对象

您可以在此处阅读更多信息:

我发现删除任何显式注册都可以解决这个问题,包括从类中删除这样的行:

override public class func initialize() {
    self.registerSubclass()
}

多次注册似乎在userAuthenticationController碰巧使用的_controllerAccess队列上造成了死锁…

我遇到了同样的问题。通过阅读最近的发行说明,我们做了一些工作来自动注册实现PFSubclassing协议的对象

您可以在此处阅读更多信息:

我发现删除任何显式注册都可以解决这个问题,包括从类中删除这样的行:

override public class func initialize() {
    self.registerSubclass()
}
多重注册似乎在userAuthenticationController碰巧使用的_-ControllerAccess队列上创建了死锁