r/reactnative • • May 17 '20

Objective C code - Duplicate Declaration Issue

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

inFile: AppDelegate.m

I am working on an app using React-Native. That has react-native twitter Sign in and also Firebase Dynamic Links. I have no idea how objective C code works and would appreciate someone helping me out with the issue I am facing.

//Twitter Auth

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

return [[Twitter sharedInstance] application:app openURL:url options:options];

// [RCTLinkingManager application:app openURL:url options:options];

}

//Dynamic Linking - React Navigation

- (BOOL)application:(UIApplication *)application

openURL:(NSURL *)url

options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options

{

return [RCTLinkingManager application:application openURL:url options:options];

}

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

Thanking You!

4 Upvotes

7 comments sorted by

View all comments

Show parent comment

1

u/Dharmink May 18 '20

Ohhh i figured, I am so sorry for asking such a stupid question. Again Thank you so much for all the help, really appreciate it!