Skip to content

Commit 6862d18

Browse files
committed
remove commented out code
1 parent 7925e0f commit 6862d18

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

Branch-SDK/Branch-SDK/BNCStrongMatchHelper.m

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ - (void)presentSafariVCWithBranchKey:(NSString *)branchKey {
113113
return;
114114
}
115115

116+
// Must be on next run loop to avoid a warning
116117
dispatch_async(dispatch_get_main_queue(), ^{
117118
UIViewController * safController = [[SFSafariViewControllerClass alloc] initWithURL:strongMatchUrl];
118119
self.secondWindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
@@ -121,6 +122,8 @@ - (void)presentSafariVCWithBranchKey:(NSString *)branchKey {
121122
[self.secondWindow setHidden:NO];
122123
UIWindow *keyWindow = [[UIApplication sharedApplication] keyWindow];
123124
[self.secondWindow makeKeyWindow];
125+
126+
// Give enough time for Safari to load the request (optimized for 3G)
124127
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
125128
[keyWindow makeKeyWindow];
126129

@@ -133,24 +136,6 @@ - (void)presentSafariVCWithBranchKey:(NSString *)branchKey {
133136
self.requestInProgress = NO;
134137
});
135138
});
136-
137-
// // Must be on next run loop to avoid a warning
138-
// dispatch_async(dispatch_get_main_queue(), ^{
139-
// // Add the safari view controller using view controller containment
140-
// [windowRootController addChildViewController:safController];
141-
// [windowRootController.view addSubview:safController.view];
142-
// [safController didMoveToParentViewController:windowRootController];
143-
//
144-
// // Give a little bit of time for safari to load the request.
145-
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(10 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
146-
// // Remove the safari view controller from view controller containment
147-
// [safController willMoveToParentViewController:nil];
148-
// [safController.view removeFromSuperview];
149-
// [safController removeFromParentViewController];
150-
//
151-
//
152-
// });
153-
// });
154139
}
155140
else {
156141
self.requestInProgress = NO;

0 commit comments

Comments
 (0)