Skip to content

Commit f47864d

Browse files
Harlan Kellawaysatya164
authored andcommitted
Fix Deep linking iOS docs using deprecated method (react-navigation#530)
The Deep linking iOS docs indicate to use the long deprecated `appliation:openURL:sourceApplication:annotation:` method when. Update to use preferred `application:openURL:options:` method.
1 parent 865b259 commit f47864d

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

docs/deep-linking.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,10 @@ In `SimpleApp/ios/SimpleApp/AppDelegate.m`:
231231
#import <React/RCTLinkingManager.h>
232232

233233
// Add this above the `@end`:
234-
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
235-
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
234+
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url
235+
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
236236
{
237-
return [RCTLinkingManager application:application openURL:url
238-
sourceApplication:sourceApplication annotation:annotation];
237+
return [RCTLinkingManager application:app openURL:url options:options];
239238
}
240239
```
241240

website/versioned_docs/version-4.x/deep-linking.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,10 @@ In `SimpleApp/ios/SimpleApp/AppDelegate.m`:
144144
#import <React/RCTLinkingManager.h>
145145

146146
// Add this above the `@end`:
147-
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
148-
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
147+
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url
148+
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
149149
{
150-
return [RCTLinkingManager application:application openURL:url
151-
sourceApplication:sourceApplication annotation:annotation];
150+
return [RCTLinkingManager application:app openURL:url options:options];
152151
}
153152
```
154153

0 commit comments

Comments
 (0)