I need to add DeepLinking
to my React Native
app, and as mentioned in docs I need to add the method above @and
.
// Add this above `@end`:- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options{ return [RCTLinkingManager application:application openURL:url options:options];}
I've added this method, but I also have similar one for Twitter login. Here's my AppDelegate.m
:
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options { return [[Twitter sharedInstance] application:app openURL:url options:options];}- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options{ return [RCTLinkingManager application:application openURL:url options:options];}@end
I get an error:Duplicate declaration of method 'application:openURL:options:'
How can it be solved? I'm not an iOS developer, so it's hard to figure out, but I think both two methods should be somehow combined.