Contents

SFAddToHomeScreenActivityItem

A protocol that describes a bookmark someone can add to their Home Screen.

Declaration

protocol SFAddToHomeScreenActivityItem : NSObjectProtocol

Overview

To add a bookmark to someone’s Home Screen from your browser app, create an object that conforms to SFAddToHomeScreenActivityItem and present a UIActivityViewController that includes the activity item.

If your browser app uses WebKit, SFAddToHomeScreenActivityItem always represents a bookmark. To let someone add a web app to their Home Screen, add a WKWebView to the UIActivityViewController activity items instead of a SFAddToHomeScreenActivityItem. WebKit inspects the website’s metadata to decide whether the item represents a bookmark or a web app.

If your browser app includes an alternative browser engine, pass detailed information about the bookmark to getHomeScreenWebAppInfo(completionHandler:). If the bookmark represents a web app, include the web app manifest, and cookies that the system uses when someone opens the web app from their Home Screen.

Topics

Describing a bookmark or web app

Providing information about a web app to the system