iOS linkedin authentication

后端 未结 6 1298
走了就别回头了
走了就别回头了 2020-11-29 05:45

I started developing an app for iOS in Swift. Now I am at the part where I need to create a login system. However we need the LinkedIn information from people.

How c

6条回答
  •  庸人自扰
    2020-11-29 06:13

    I know this has already been answered but I faced this issue as well and had done everything set in the Accepted answer, but for whatever reason the code still was not hitting success or failure. It turned out that with iOS 9 the following is deprecated.

    - (BOOL)application:(UIApplication *)application 
            openURL:(NSURL *)url 
            sourceApplication:(NSString *)sourceApplication 
            annotation:(id)annotation
    

    The solution was to use this instead :

    - (BOOL)application:(UIApplication *)app
            openURL:(NSURL *)url
            options:(NSDictionary *)options
    

    For example, you could do:

    - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options {
    if ([LISDKCallbackHandler shouldHandleUrl:url]) {
        return [LISDKCallbackHandler application:app openURL:url sourceApplication:options[UIApplicationLaunchOptionsSourceApplicationKey] annotation:options[UIApplicationLaunchOptionsAnnotationKey]];
    }
    return YES;
    }
    

提交回复
热议问题