File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -145,16 +145,26 @@ - (BOOL)presentExternalUserAgentRequest:(nonnull id<OIDExternalUserAgentRequest>
145145 NSString *testURLString = [NSString stringWithFormat: @" %@ ://example.com" , _canOpenURLScheme];
146146 NSURL *testURL = [NSURL URLWithString: testURLString];
147147 if (![[UIApplication sharedApplication ] canOpenURL: testURL]) {
148- [[UIApplication sharedApplication ] openURL: _appStoreURL];
148+ if (@available (iOS 10.0 , *)) {
149+ [[UIApplication sharedApplication ] openURL: _appStoreURL options: @{} completionHandler: nil ];
150+ } else {
151+ [[UIApplication sharedApplication ] openURL: _appStoreURL];
152+ }
149153 return NO ;
150154 }
151155 }
152156
153157 // Transforms the request URL and opens it.
154158 NSURL *requestURL = [request externalUserAgentRequestURL ];
155159 requestURL = _URLTransformation (requestURL);
156- BOOL openedInBrowser = [[UIApplication sharedApplication ] openURL: requestURL];
157- return openedInBrowser;
160+ if (@available (iOS 10.0 , *)) {
161+ BOOL willOpen = [[UIApplication sharedApplication ] canOpenURL: requestURL];
162+ [[UIApplication sharedApplication ] openURL: requestURL options: @{} completionHandler: nil ];
163+ return willOpen;
164+ } else {
165+ BOOL openedInBrowser = [[UIApplication sharedApplication ] openURL: requestURL];
166+ return openedInBrowser;
167+ }
158168}
159169
160170- (void )dismissExternalUserAgentAnimated : (BOOL )animated
You can’t perform that action at this time.
0 commit comments