openExportBrowsingDataSettings(completionHandler:)
Presents the Export Browsing Data sheet from Safari Settings.
Declaration
class func openExportBrowsingDataSettings(completionHandler: (@MainActor @Sendable ((any Error)?) -> Void)? = nil)class func openExportBrowsingDataSettings() async throwsParameters
- completionHandler:
A block the system calls after the operation completes, with an optional error parameter.
- error
nilif the export sheet opens successfully; otherwise, an error that indicates the reason for the failure.
Mentioned in
Discussion
This method presents the same data export sheet accessible in Safari’s settings, which enables someone to export their browsing data to a file. The data includes page visit history, reading list information, bookmarks, passwords, payment cards, and browser extensions.
The method returns an error unless you call it while your app is in the foreground.
For information on the file format and steps to import the data, see Importing data exported from Safari.