File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,10 @@ extern NSString * _Nonnull const RNBranchLinkOpenedNotificationLinkPropertiesKey
1717
1818+ (void )initSessionWithLaunchOptions : (NSDictionary * _Nullable)launchOptions isReferrable : (BOOL )isReferrable ;
1919+ (BOOL )handleDeepLink : (NSURL * _Nonnull)url __deprecated_msg(" Please use [RNBranch.branch application:openURL:options] or [RNBranch.branch application:openURL:sourceApplication:annotation:] instead." );
20+ #pragma clang diagnostic push
21+ #pragma clang diagnostic ignored "-Wpartial-availability"
2022+ (BOOL )continueUserActivity : (NSUserActivity * _Nonnull)userActivity ;
23+ #pragma clang diagnostic pop
2124
2225// Must be called before any other static method below
2326+ (void )useTestInstance ;
Original file line number Diff line number Diff line change @@ -159,9 +159,12 @@ + (BOOL)handleDeepLink:(NSURL *)url {
159159 return handled;
160160}
161161
162+ #pragma clang diagnostic push
163+ #pragma clang diagnostic ignored "-Wpartial-availability"
162164+ (BOOL )continueUserActivity : (NSUserActivity *)userActivity {
163165 return [self .branch continueUserActivity: userActivity];
164166}
167+ #pragma clang diagnostic pop
165168
166169#pragma mark - Object lifecycle
167170
@@ -186,8 +189,13 @@ - (void) dealloc {
186189- (UIViewController *)currentViewController
187190{
188191 UIViewController *current = [UIApplication sharedApplication ].keyWindow .rootViewController ;
189- while (current.presentedViewController && ![current.presentedViewController isKindOfClass: UIAlertController.class]) {
190- current = current.presentedViewController ;
192+ if (@available (iOS 8.0 , *)) {
193+ while (current.presentedViewController && ![current.presentedViewController isKindOfClass: UIAlertController.class]) {
194+ current = current.presentedViewController ;
195+ }
196+ } else {
197+ // RN Requires iOS 8. Nothing to do here. Still.
198+ while (current.presentedViewController ) current = current.presentedViewController ;
191199 }
192200 return current;
193201}
You can’t perform that action at this time.
0 commit comments