Skip to content

Commit

Permalink
Merge pull request #309 from BranchMetrics/ios-warning
Browse files Browse the repository at this point in the history
Get rid of unnecessary version check for iOS 8
  • Loading branch information
jdee authored Dec 22, 2017
2 parents 1bb3648 + 5228ead commit 5b2e3a9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions ios/RNBranch.m
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,8 @@ - (void) dealloc {
- (UIViewController *)currentViewController
{
UIViewController *current = [UIApplication sharedApplication].keyWindow.rootViewController;
if (@available(iOS 8.0, *)) {
while (current.presentedViewController && ![current.presentedViewController isKindOfClass:UIAlertController.class]) {
current = current.presentedViewController;
}
} else {
// RN Requires iOS 8. Nothing to do here. Still.
while (current.presentedViewController) current = current.presentedViewController;
while (current.presentedViewController && ![current.presentedViewController isKindOfClass:UIAlertController.class]) {
current = current.presentedViewController;
}
return current;
}
Expand Down

0 comments on commit 5b2e3a9

Please sign in to comment.