簡體   English   中英

PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions(launchOptions)掛起app

[英]PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions(launchOptions) hangs app

使用最新的FB iOS SDKS和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協議的對象。

你可以在這里閱讀更多相關信息: https//github.com/ParsePlatform/Parse-SDK-iOS-OSX/pull/967

我發現刪除任何顯式注冊都清除了這個問題,其中包括從類中刪除這樣的行:

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

多次注冊似乎在_controllerAccessQueue上創建了一個死鎖,userAuthenticationController也碰巧使用了...

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM