Commit e641ba86 authored by Yuwei Huang's avatar Yuwei Huang Committed by Commit Bot

[CRD iOS] Replace deprecated openURL

This CL replaces the deprecated openURL: call with
openURL:options:completionHandler:.

Bug: 774483
Change-Id: Idf9414bbacc9e633c98f1190a6aee89e2d0ebacd
Reviewed-on: https://chromium-review.googlesource.com/728733
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Reviewed-by: default avatarJamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510251}
parent 1a452c9d
......@@ -205,7 +205,16 @@ std::string GetAuthorizationCodeUri() {
NSString* authUri =
[NSString stringWithCString:GetAuthorizationCodeUri().c_str()
encoding:[NSString defaultCStringEncoding]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:authUri]];
if (@available(iOS 10, *)) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:authUri]
options:@{}
completionHandler:nil];
}
#if !defined(__IPHONE_10_0) || __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_10_0
else {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:authUri]];
}
#endif
}
- (void)didTapLogout:(id)sender {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment