From 2afeb3d0ff3c722858c7ee1faabe1086696306ea Mon Sep 17 00:00:00 2001 From: Ilja Daderko Date: Sun, 23 Dec 2018 20:36:30 +0200 Subject: [PATCH 1/5] Apply new implementation --- Libraries/LinkingIOS/RCTLinkingManager.h | 2 +- Libraries/LinkingIOS/RCTLinkingManager.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/LinkingIOS/RCTLinkingManager.h b/Libraries/LinkingIOS/RCTLinkingManager.h index de38c85de62216..784af5be23aef8 100644 --- a/Libraries/LinkingIOS/RCTLinkingManager.h +++ b/Libraries/LinkingIOS/RCTLinkingManager.h @@ -22,6 +22,6 @@ + (BOOL)application:(nonnull UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity - restorationHandler:(nonnull void (^)(NSArray *__nullable))restorationHandler; + restorationHandler:(nonnull void (^)(NSArray> *_Nullable))restorationHandler; @end diff --git a/Libraries/LinkingIOS/RCTLinkingManager.m b/Libraries/LinkingIOS/RCTLinkingManager.m index 768f47edb063b4..de908d6194842d 100644 --- a/Libraries/LinkingIOS/RCTLinkingManager.m +++ b/Libraries/LinkingIOS/RCTLinkingManager.m @@ -67,7 +67,7 @@ + (BOOL)application:(UIApplication *)application + (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity - restorationHandler:(void (^)(NSArray * __nullable))restorationHandler + restorationHandler:(nonnull void (^)(NSArray> *_Nullable))restorationHandler { if ([userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) { NSDictionary *payload = @{@"url": userActivity.webpageURL.absoluteString}; From 79617fa9ac53ced8fa5f293c9a1782cf1f08b3a3 Mon Sep 17 00:00:00 2001 From: Ilja Daderko Date: Mon, 18 Mar 2019 09:42:17 +0200 Subject: [PATCH 2/5] Make change conditional --- Libraries/LinkingIOS/RCTLinkingManager.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Libraries/LinkingIOS/RCTLinkingManager.h b/Libraries/LinkingIOS/RCTLinkingManager.h index 784af5be23aef8..0ff8070a434625 100644 --- a/Libraries/LinkingIOS/RCTLinkingManager.h +++ b/Libraries/LinkingIOS/RCTLinkingManager.h @@ -22,6 +22,11 @@ + (BOOL)application:(nonnull UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity - restorationHandler:(nonnull void (^)(NSArray> *_Nullable))restorationHandler; + restorationHandler: + #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 12000) + (nonnull void (^)(NSArray> *_Nullable))restorationHandler; + #else + (nonnull void (^)(NSArray *_Nullable))restorationHandler; + #endif @end From 46e6b8db65a3261640764961173943db46f16926 Mon Sep 17 00:00:00 2001 From: Ilja Daderko Date: Mon, 18 Mar 2019 09:43:02 +0200 Subject: [PATCH 3/5] Make change conditional --- Libraries/LinkingIOS/RCTLinkingManager.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Libraries/LinkingIOS/RCTLinkingManager.m b/Libraries/LinkingIOS/RCTLinkingManager.m index de908d6194842d..ac949142a434fd 100644 --- a/Libraries/LinkingIOS/RCTLinkingManager.m +++ b/Libraries/LinkingIOS/RCTLinkingManager.m @@ -67,8 +67,12 @@ + (BOOL)application:(UIApplication *)application + (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity - restorationHandler:(nonnull void (^)(NSArray> *_Nullable))restorationHandler -{ + restorationHandler: + #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 12000) + (nonnull void (^)(NSArray> *_Nullable))restorationHandler { + #else + (nonnull void (^)(NSArray *_Nullable))restorationHandler { + #endif if ([userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) { NSDictionary *payload = @{@"url": userActivity.webpageURL.absoluteString}; [[NSNotificationCenter defaultCenter] postNotificationName:kOpenURLNotification From 269a58b4a2ff5bfbfca94b52508b591f73061101 Mon Sep 17 00:00:00 2001 From: Christoph Nakazawa Date: Fri, 22 Mar 2019 10:00:52 +0000 Subject: [PATCH 4/5] Update RCTLinkingManager.h --- Libraries/LinkingIOS/RCTLinkingManager.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LinkingIOS/RCTLinkingManager.h b/Libraries/LinkingIOS/RCTLinkingManager.h index 0ff8070a434625..a3deb1d58cfcdf 100644 --- a/Libraries/LinkingIOS/RCTLinkingManager.h +++ b/Libraries/LinkingIOS/RCTLinkingManager.h @@ -23,7 +23,7 @@ + (BOOL)application:(nonnull UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler: - #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 12000) + #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 12000) /* __IPHONE_12_0 */ (nonnull void (^)(NSArray> *_Nullable))restorationHandler; #else (nonnull void (^)(NSArray *_Nullable))restorationHandler; From 12f45c22d0786524af0dca049debb54a8f4ab5b3 Mon Sep 17 00:00:00 2001 From: Christoph Nakazawa Date: Fri, 22 Mar 2019 10:01:05 +0000 Subject: [PATCH 5/5] Update RCTLinkingManager.m --- Libraries/LinkingIOS/RCTLinkingManager.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LinkingIOS/RCTLinkingManager.m b/Libraries/LinkingIOS/RCTLinkingManager.m index ac949142a434fd..e425158876187d 100644 --- a/Libraries/LinkingIOS/RCTLinkingManager.m +++ b/Libraries/LinkingIOS/RCTLinkingManager.m @@ -68,7 +68,7 @@ + (BOOL)application:(UIApplication *)application + (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler: - #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 12000) + #if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 12000) /* __IPHONE_12_0 */ (nonnull void (^)(NSArray> *_Nullable))restorationHandler { #else (nonnull void (^)(NSArray *_Nullable))restorationHandler {