<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SafariServices",
  "identifier" : "/documentation/SafariServices/SFSafariViewControllerDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Safari Services"
    ],
    "preciseIdentifier" : "c:objc(pl)SFSafariViewControllerDelegate"
  },
  "title" : "SFSafariViewControllerDelegate"
}
-->

# SFSafariViewControllerDelegate

A protocol used to implement custom event handling for a Safari view controller.

```
protocol SFSafariViewControllerDelegate : NSObjectProtocol
```

## Overview

For more information about the `SFSafariViewController` class, see [`SFSafariViewController`](/documentation/SafariServices/SFSafariViewController).

## Topics

### Working with the View Controller

[`safariViewController(_:didCompleteInitialLoad:)`](/documentation/SafariServices/SFSafariViewControllerDelegate/safariViewController(_:didCompleteInitialLoad:))

Tells the delegate that the initial URL load completed.

[`safariViewController(_:activityItemsFor:title:)`](/documentation/SafariServices/SFSafariViewControllerDelegate/safariViewController(_:activityItemsFor:title:))

Tells the delegate that the user tapped an Action button.

[`safariViewControllerDidFinish(_:)`](/documentation/SafariServices/SFSafariViewControllerDelegate/safariViewControllerDidFinish(_:))

Tells the delegate that the user dismissed the view.

[`safariViewController(_:excludedActivityTypesFor:title:)`](/documentation/SafariServices/SFSafariViewControllerDelegate/safariViewController(_:excludedActivityTypesFor:title:))

### Instance Methods

[`safariViewController(_:initialLoadDidRedirectTo:)`](/documentation/SafariServices/SFSafariViewControllerDelegate/safariViewController(_:initialLoadDidRedirectTo:))

[`safariViewControllerWillOpenInBrowser(_:)`](/documentation/SafariServices/SFSafariViewControllerDelegate/safariViewControllerWillOpenInBrowser(_:))



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)