7

Preparing Your App to be the Default Browser or Email Client

 2 years ago
source link: https://developer.apple.com/documentation/xcode/preparing-your-app-to-be-the-default-browser-or-email-client
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Overview

In iOS 14 and later, users can select an app to be their default web browser or email app. To make your app a choice, confirm that your app meets the requirements below, then request a managed entitlement.

Configure Your App to be a Default Browser

The system invokes the default web browser in iOS whenever the user opens an HTTP or HTTPS link. Because this app becomes the user’s primary gateway to the internet, Apple requires that web browsing apps meet specific functional criteria to protect user privacy and ensure proper access to internet resources.

Apps express their capability to be a default web browser by using the com.apple.developer.web-browser managed entitlement. Request permission to use this entitlement by emailing [email protected]. This starts the process of generating the necessary signing permission for your app.

Fulfilling Default Browser Requirements

Apps that register as a default web browser option must satisfy the following criteria:

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

  • Your app can’t use UIWebView.

  • 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.

When opening an HTTP or HTTPS URL in its default configuration:

  • 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.

  • 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.

Using Default Browser Capabilities

Apps that use the com.apple.developer.web-browser managed entitlement can:

  • 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.

Adhering to Browser Restrictions

Apps that have the com.apple.developer.web-browser managed entitlement may not claim to respond to Universal Links for specific domains. The system will ignore any such claims. Apps with the entitlement can still open Universal Links to other apps as usual.

Because of their privileged position in a user’s web browsing, browser apps should avoid unnecessary access to personal data. Apps that use any of the following Info.plist keys while using the com.apple.developer.web-browser managed entitlement will be rejected:

Configure Your App to be a Default Email App

The system launches the default mail client in iOS whenever a user opens a mailto: link. Since email is a critical avenue for communication, Apple requires that email apps must meet specific functional criteria aimed at ensuring private and accurate access for users.

Apps signal their intent to be used as a default mail app by using the com.apple.developer.mail-client managed entitlement. Request permission to use this entitlement by emailing [email protected].

Fulfilling Default Email App Requirements

Any app that registers as a default email client option must:

  • Specify the mailto: scheme in its Info.plist file.

  • Be able to send a message to any valid email recipient.

  • Be able to receive a message from any email sender. Apps that provide user-controlled incoming mail screening features are permitted.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK