Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

How to combine ios settings from two different react-native modules : react-native-fbsdk, rn-kakao-login

$
0
0

To use react-native-fbsdk in ios, below code is needed in AppDelegate.m

- (BOOL)application:(UIApplication *)application 
            openURL:(NSURL *)url 
            options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {

  BOOL handled =  [[FBSDKApplicationDelegate sharedInstance] application:application openURL:url options:options];
  // Add any custom logic here.
  return handled;
}

And, to use rn-kakao-login in ios, below code is needed in AppDelegate.m

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
                                                   options:(NSDictionary<NSString *,id> *)options {
      if ([KOSession isKakaoAccountLoginCallback:url]) {
          return [KOSession handleOpenURL:url];
      }

      return NO;
  }

If I add above to sections in AppDeletage.m separately, i get following error

Duplicate declaration of method 'application:openURL:options:'

How can I combile above two sections in AppDelegate.m? Please help.


Viewing all articles
Browse latest Browse all 16552

Trending Articles