TechnologiesApp Extensions & System Integration

SafariServices

iOSmacOStvOSwatchOSvisionOS

SafariServices lets you embed Safari directly in your app through SFSafariViewController and respond to its lifecycle with SFSafariViewControllerDelegate. It also provides the management surfaces for Safari's extensibility model: register and query rule-based content blockers with SFContentBlockerManager and SFContentBlockerState, and inspect Safari app extensions through SFSafariExtensionManager and SFSafariExtensionState. Beyond embedding, you can add sites to the home screen using SFAddToHomeScreenInfo and SFAddToHomeScreenActivityItem, add entries to the Safari reading list with SSReadingList, and read Safari settings via SFSafariSettings. The framework is available on iOS, macOS, and visionOS.

Embedding Safari 2

Present a Safari browsing experience inside your app and respond to its lifecycle.

  • Cl
    SFSafariViewControlleriOS 9.0+
    @class SFSafariViewController
  • Pr
    SFSafariViewControllerDelegateiOS 9.0+
    A protocol for responding to navigation and lifecycle events of a Safari view controller.

Web Authentication 2

Run a web-based authentication session for OAuth and single sign-on flows.

  • Cl
    SFAuthenticationSession
    An object that manages a web-based authentication session, such as an OAuth or single sign-on flow.
  • St
    SFAuthenticationError
    A structure that describes errors that occur during a web authentication session.

Content Blockers 3

Register and query the state of rule-based Safari content blockers.

  • Cl
    SFContentBlockerManageriOS 9.0+
    An object that registers and reloads rule-based Safari content blocker extensions.
  • Cl
    SFContentBlockerStateiOS 10.0+
    An object that reports whether a content blocker extension is currently enabled.
  • En
    SFContentBlockerErrorCode
    Constants that identify errors encountered while loading or reloading a content blocker.

Safari App Extensions 2

Inspect and manage the state of Safari app extensions.

  • Cl
    SFSafariExtensionManageriOS 26.2+
    An object that queries and manages the state of Safari app extensions.
  • Cl
    SFSafariExtensionStateiOS 26.2+
    An object that reports whether a Safari app extension is currently enabled.

Add to Home Screen 2

Describe and share sites that the user can add to the home screen.

  • Cl
    SFAddToHomeScreenInfoiOS 18.2+
    An object that describes a website to be offered for adding to the home screen.
  • Pr
    SFAddToHomeScreenActivityItemiOS 17.4+
    @protocol SFAddToHomeScreenActivityItem

Reading List 2

Add web pages to the user's Safari reading list.

  • Cl
    SSReadingListiOS 7.0+
    @class SSReadingList
  • St
    SSReadingListErroriOS 7.0+
    A structure that describes errors that occur when adding items to the reading list.

Settings and Errors 2

Read Safari settings and handle framework-level errors.

  • Cl
    SFSafariSettingsiOS 26.0+
    An object that provides read access to the user's Safari settings.
  • St
    SFErroriOS 10.0+
    A structure that describes errors produced by the SafariServices framework.
← App Extensions & System Integration