Skip to content

Commit 5b2e3a9

Browse files
authored
Merge pull request #309 from BranchMetrics/ios-warning
Get rid of unnecessary version check for iOS 8
2 parents 1bb3648 + 5228ead commit 5b2e3a9

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

ios/RNBranch.m

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,8 @@ - (void) dealloc {
219219
- (UIViewController *)currentViewController
220220
{
221221
UIViewController *current = [UIApplication sharedApplication].keyWindow.rootViewController;
222-
if (@available(iOS 8.0, *)) {
223-
while (current.presentedViewController && ![current.presentedViewController isKindOfClass:UIAlertController.class]) {
224-
current = current.presentedViewController;
225-
}
226-
} else {
227-
// RN Requires iOS 8. Nothing to do here. Still.
228-
while (current.presentedViewController) current = current.presentedViewController;
222+
while (current.presentedViewController && ![current.presentedViewController isKindOfClass:UIAlertController.class]) {
223+
current = current.presentedViewController;
229224
}
230225
return current;
231226
}

0 commit comments

Comments
 (0)