Opening links in Chrome for iOSというページ書かれている通りにやればいいらしい。
NSURL *inputURL = <the URL to open>;
NSString *scheme = inputURL.scheme;
// Replace the URL Scheme with the Chrome equivalent.
NSString *chromeScheme = nil;
if ([scheme isEqualToString:@"http"]) {
chromeScheme = @"googlechrome";
} else if ([scheme isEqualToString:@"https"]) {
chromeScheme = @"googlechromes";
}
// Proceed only if a valid Google Chrome URI Scheme is available.
if (chromeScheme) {
NSString *absoluteString = [inputURL absoluteString];
NSRange rangeForScheme = [absoluteString rangeOfString:@":"];
NSString *urlNoScheme =
[absoluteString substringFromIndex:rangeForScheme.location];
NSString *chromeURLString =
[chromeScheme stringByAppendingString:urlNoScheme];
NSURL *chromeURL = [NSURL URLWithString:chromeURLString];
// Open the URL with Chrome.
[[UIApplication sharedApplication] openURL:chromeURL];
}
裏技でもなんでもなく、URL Scheme を使うごく普通の方法。アプリごとに対応しないといけない。
今後iOSが強さをみせつけるほど、標準ブラウザをSafariから解放せよという圧力も強まってくるんじゃないかな。WindowsでMicrosoftが独占禁止法がらみでいろいろやられたので、Appleも当然対応はを考えているだろうけど。
日本人としてはIMEの解放してほしい。ATOK使いたいし。