Enable web views and services in your app.


Use the Safari Services framework to integrate Safari behaviors into your iOS or macOS app or to extend the behavior of Safari. You can:

  • Provide a user interface that is almost identical to the user interface provided by the Safari app. Users can browse the web in this view and then return to your app’s content. This view is more consistent with the Safari user interface than implementing your own custom browsing solution and can be done using fewer lines of code. (iOS)

  • Add items to the user’s Safari Reading List. (iOS)

  • Determine from your app whether your content blocker extension is loaded, and if it is, tell it to refresh its contents. (iOS and macOS)

  • Implement Safari app extensions. Determine from your app whether a Safari app extension is loaded. (macOS)

  • Allows the user to share cookies and website data between an app and Safari for a single sign-on (SSO) experience with SFAuthenticationSession.


Display Safari Content in Your App

class SFSafariViewController

An object that provides a standard interface for browsing the web.

class SFAuthenticationSession

A class that manages sharing a one-time web service login, along with cookies and website data, between Safari and an app, which can also be used for automatic login for other associated apps.

Safari Reading List

class SSReadingList

An object used to add items to a user’s Safari Reading List.

let SSReadingListErrorDomain: String

The domain for reading list errors.

enum SSReadingListError.Code

Messages that describe a Reading List error.

Content Blocker App Extensions

class SFContentBlockerManager

A class used by your app to interact with a content blocker extension.

class SFContentBlockerState

The state of a content blocker extension.

enum SFContentBlockerErrorCode

A content blocker error.


Safari App Extensions

class SFSafariExtensionManager

A class used by your app to find out the current state of a Safari app extension.

class SFSafariExtensionState

The state of a Safari app extension.

class SFSafariExtensionHandler

A base class that you subclass to handle events in your Safari app extension.

protocol SFSafariExtensionHandling

A protocol used to implement event handling in a Safari app extension.

class SFSafariExtensionViewController

The view controller for a popover associated with your app extension.

class SFSafariApplication

A proxy for the Safari app.

class SFSafariWindow

A proxy for a Safari window.

class SFSafariToolbarItem

A proxy for a Safari app extension toolbar item in a Safari window.

class SFSafariTab

A proxy for a tab in a Safari window.

class SFSafariPage

A proxy for a Safari webpage.

class SFSafariPageProperties

Information about a webpage.