Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do i fix 'Duplicate declaration of method' in AppDelegate.m #38

Closed
miknonny opened this issue Feb 21, 2016 · 2 comments
Closed

How do i fix 'Duplicate declaration of method' in AppDelegate.m #38

miknonny opened this issue Feb 21, 2016 · 2 comments

Comments

@miknonny
Copy link

Hi,
How do i fix this or declare the second method differently such that it still works.

screen shot 2016-02-21 at 1 00 17 pm

It works if i remove code for Facebook SDK code, but i need both

Thanks.

@devfd
Copy link
Contributor

devfd commented Feb 22, 2016

I would check first if facebooksdk return YES, otherwise return Google method

@devfd devfd closed this as completed Mar 1, 2016
@GedoonS
Copy link

GedoonS commented Jul 26, 2016

This is what I did:

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

  if( [url.absoluteString rangeOfString: @"com.googleusercontent.apps" ].location != NSNotFound ) {
    return [RNGoogleSignin application:application openURL:url sourceApplication:sourceApplication annotation:annotation];
  }

  return [[FBSDKApplicationDelegate sharedInstance] application:application
                                                        openURL:url
                                              sourceApplication:sourceApplication
                                                     annotation:annotation];
}

So just check if the returned string contains google url, if not then continue to facebook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants