iosobjective-cfacebookxcode7ios9.2

Login through Google or Facebook not returning to application


I've recently upgraded to Xcode(7.2). Before upgrading everything was working fine(i.e. in Xcode 6.3) but after upgrading I'm facing an issue that after choosing login through Google or Facebook, it is not getting back to the app.

enter image description here


Solution

  • That should be because of

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

    and

    - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
    

    of UIApplicationDelegate got deprecated. You should switch to:

    - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options`
    

    Hope this helps!