サードパーティ製アプリをiOS標準Webブラウザとして登録するための条件


iOS14では、デフォルトで起動するWebブラウザを「Safari」以外のアプリにユーザー自身が設定できる様になります。
今回「サードパーティ製アプリが標準ブラウザになる為の要件」が公開されたので簡単にまとめてみました。

概要

標準ブラウザになる為の各要件をクリアする

Appleへメール([email protected])で申請

という流れになる様です。

承認後は、Entitlementsに「com.apple.developer.web-browser」キーを追加する形に?

標準ブラウザになったら出来ること

Be an option for the user to choose as their default browser.

  • 「標準で開くブラウザ」としてユーザが選択出来る様になる

Load pages from all domains with full script access.

  • フルスクリプトアクセスですべてのドメインからページをロード可能に。

Use Service Workers in WKWebView instances.

  • WKWebViewでService Workersが使用出来る

必須要件

Your app must specify the HTTP and HTTPS schemes in its Info.plist file.

  • HTTP/HTTPSのURLスキームをinfo.plistに設定している

Your app can’t use UIWebView.

  • UIWebView(既にDeprecated)を使用していない

On launch, the app must provide a text field for entering a URL, search tools for finding relevant links on the internet, or curated lists of bookmarks.

  • 「URL入力欄」、「検索窓」または「整理済みブックマーク」を起動時に提示している

The app must navigate directly to the specified destination and render the expected web content. Apps that redirect to unexpected locations or render content not specified in the destination’s source code don’t meet the requirements of a default web browser.

  • HTTP/HTTPSのURLを開く場合、ユーザが指定したページに直接移動して、予期されたWebコンテンツをレンダリングしている

→ ユーザが予期しないページへのリダイレクトや、指定されていないコンテンツをレンダリングするアプリはNG。
ただし、以下は例外

Apps designed to operate in a parental controls or locked down mode may restrict navigation to comply with those goals.

  • 「ペアレンタルやロックダウンモード機能」があるアプリは、ナビゲーションを制限してこれらの目標に準拠する場合がある。

Your app may present a “Safe Browsing” or other warning for content suspected of phishing or other problems.

  • フィッシングや詐欺などの問題が疑われるコンテンツに対しては、セーフブラウジング機能が働いたり、警告を表示する場合がある。

Your app may offer a native authentication UI for a site that also offers a native web sign-in flow.

  • ネイティブWebサインインフローも提供するサイトにネイティブ認証UIを提供する場合がある。

こちらの記事: https://iphone-mania.jp/news-304786/ では

  • ペアレンタルコントロール機能もしくはロックダウンモードを持つこと
  • セーフブラウジング、もしくはフィッシングなどの問題への警告を表示すること

も要件としていましたが、これについてはこちらのツイート


で指摘されている通り
「ペアレンタルやロックダウンモード機能」と「セーフブラウジング、フィッシングへの警告表示」は必須項目ではないと思います。

標準ブラウザ資格を持ったアプリに対する制限

標準ブラウザとなった場合にはユーザのWeb閲覧を独占するため、個人データへの不要なアクセスは回避すべきとの方針。

Info.plistで以下のキーを持っているとリジェクト

  • NSPhotoLibraryUsageDescription
     → 写真を取得する際は「NSPhotoLibraryUsageDescription」の設定が不要な、PHPickerViewControllerを使用する。
     「NSPhotoLibraryAddUsageDescription」のみの使用は引き続きOK。

  • NSLocationAlwaysUsageDescription、NSLocationAlwaysAndWhenInUseUsageDescription
     → 代わりに「NSLocationWhenInUseUsageDescription」を使用する

  • NSHomeKitUsageDescription
     → HomeKitへのアクセス禁止

  • NSBluetoothAlwaysUsageDescription
     → 代わりに「NSBluetoothWhileInUseUsageDescription」を使用

  • NSHealthShareUsageDescription、NSHealthUpdateUsageDescription
     → ヘルスデータへのアクセス禁止

参考