diff --git a/example/ios/Example.xcodeproj/project.pbxproj b/example/ios/Example.xcodeproj/project.pbxproj index 61b74b06..633a69ca 100644 --- a/example/ios/Example.xcodeproj/project.pbxproj +++ b/example/ios/Example.xcodeproj/project.pbxproj @@ -1070,6 +1070,7 @@ CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = QGUGW9AUMK; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS\"/**"; INFOPLIST_FILE = Example/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( @@ -1090,6 +1091,7 @@ CODE_SIGN_ENTITLEMENTS = Example/Example.entitlements; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = QGUGW9AUMK; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS\"/**"; INFOPLIST_FILE = Example/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( diff --git a/example/ios/Example/AppDelegate.m b/example/ios/Example/AppDelegate.m index 80a9d62b..0d73f48e 100644 --- a/example/ios/Example/AppDelegate.m +++ b/example/ios/Example/AppDelegate.m @@ -8,6 +8,7 @@ */ #import "AppDelegate.h" +#import "RCTLinkingManager.h" #import #import @@ -34,4 +35,15 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( return YES; } +- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation +{ + return [RCTLinkingManager application:application openURL:url sourceApplication:sourceApplication annotation:annotation]; +} + +// Only if your app is using [Universal Links](https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/AppSearch/UniversalLinks.html). +- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler +{ + return [RCTLinkingManager application:application continueUserActivity:userActivity restorationHandler:restorationHandler]; +} + @end