<!--
{
  "availability" : [
    "macOS: 10.12.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SafariServices",
  "identifier" : "/documentation/SafariServices/SFSafariExtensionViewController",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Safari Services"
    ],
    "preciseIdentifier" : "c:objc(cs)SFSafariExtensionViewController"
  },
  "title" : "SFSafariExtensionViewController"
}
-->

# SFSafariExtensionViewController

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

```
class SFSafariExtensionViewController
```

## Overview

If your toolbar item has a popover, your popover view controller should be a subclass of this class. As with other macOS development, typically you want to add your own outlets and actions to the view controller, and provide an XIB file for its user interface.

Your view controller’s contents must use Auto Layout.

## Topics

### Instance Methods

[`-  dismissPopover`](/documentation/SafariServices/SFSafariExtensionViewController/dismissPopover())

## Relationships

### Inherits From

[`NSViewController`](/documentation/AppKit/NSViewController)

### Conforms To

[`NSTouchBarProvider`](/documentation/AppKit/NSTouchBarProvider)

[`NSSeguePerforming`](/documentation/AppKit/NSSeguePerforming)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSStandardKeyBindingResponding`](/documentation/AppKit/NSStandardKeyBindingResponding)

[`NSEditor`](/documentation/AppKit/NSEditor)

[`NSExtensionRequestHandling`](/documentation/Foundation/NSExtensionRequestHandling)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSUserActivityRestoring`](/documentation/AppKit/NSUserActivityRestoring)

[`NSUserInterfaceItemIdentification`](/documentation/AppKit/NSUserInterfaceItemIdentification)

[`NSCoding`](/documentation/Foundation/NSCoding)

---

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)