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

iOS AppDelegate.m - Duplicate declaration of method 'application:openURL:options:'

$
0
0

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.


Viewing all articles
Browse latest Browse all 16552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>