Skip to content

Commit 4f332d0

Browse files
committed
Create URL scheme for iOS
1 parent 8d55c8f commit 4f332d0

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

TestAuth/ios/TestAuth/AppDelegate.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#import "AppDelegate.h"
1111

12+
#import <React/RCTLinkingManager.h>
1213
#import <React/RCTBundleURLProvider.h>
1314
#import <React/RCTRootView.h>
1415

@@ -34,4 +35,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
3435
return YES;
3536
}
3637

38+
- (BOOL)application:(UIApplication *)application
39+
openURL:(NSURL *)url
40+
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
41+
{
42+
return [RCTLinkingManager application:application openURL:url options:options];
43+
}
44+
3745
@end

TestAuth/ios/TestAuth/Info.plist

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@
2020
<string>1.0</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
23+
<key>CFBundleURLTypes</key>
24+
<array>
25+
<dict>
26+
<key>CFBundleURLSchemes</key>
27+
<array>
28+
<string>myapp</string>
29+
</array>
30+
</dict>
31+
</array>
2332
<key>CFBundleVersion</key>
2433
<string>1</string>
2534
<key>LSRequiresIPhoneOS</key>

0 commit comments

Comments
 (0)