From 203384c4ee8d077b3adf0faf96a2ec9c9c0d28bd Mon Sep 17 00:00:00 2001
From: Website Deployment Script
Date: Wed, 17 May 2017 01:33:16 +0000
Subject: [PATCH] Updated docs for next
---
releases/next/docs/linking.html | 26 ++++++++++++++++++--------
1 file changed, 18 insertions(+), 8 deletions(-)
diff --git a/releases/next/docs/linking.html b/releases/next/docs/linking.html
index 0ce70690c9f..5068aa3e386 100644
--- a/releases/next/docs/linking.html
+++ b/releases/next/docs/linking.html
@@ -23,20 +23,30 @@ you may set the launchMode of MainActivity to singleTaskAndroidManifest.xml. See <activity>
documentation for more information.
<activity
android:name=".MainActivity"
- android:launchMode="singleTask">
NOTE: On iOS you'll need to link RCTLinking to your project by following
+ android:launchMode="singleTask">
NOTE: On iOS, you'll need to link RCTLinking to your project by following
the steps described here.
-In case you also want to listen to incoming app links during your app's
-execution you'll need to add the following lines to your *AppDelegate.m:
#import <React
/RCTLinkingManager
.h
>
+If you also want to listen to incoming app links during your app's
+execution, you'll need to add the following lines to your
*AppDelegate.m:
#import <React/RCTLinkingManager.h>
+- (BOOL)application:(UIApplication *)application
+ openURL:(NSURL *)url
+ options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
+{
+
+ return [RCTLinkingManager application:application openURL:url
+ sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
+ annotation:options[UIApplicationOpenURLOptionsAnnotationKey]];
+
+}
If you're targeting iOS 9 or older, you can use the following code instead:
#import <React/RCTLinkingManager.h>
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
return [RCTLinkingManager application:application openURL:url
- sourceApplication:sourceApplication annotation:annotation];
-}
-- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity
+ sourceApplication:sourceApplication annotation:annotation];
+}
If your app is using Universal Links,
+you'll need to add the following code as well:
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler
{
return [RCTLinkingManager application:application