Contents

requestExport(for:token:completionHandler:)

Requests that the system display the browsing-data transfer sheet to export data to another browser.

Declaration

func requestExport(for metadata: BEExportMetadata, token: UUID?, completionHandler: @escaping  @Sendable (BEExportOptions?, (any Error)?) -> Void)
func requestExport(for metadata: BEExportMetadata, token: UUID?) async throws -> BEExportOptions

Parameters

  • metadata:

    Metadata that describes the available data for export, including types, counts, and whether the sheet can include the option to export the data to files instead of directly to another browser.

  • token:

    A UUID that identifies the export operation. Pass nil if your app presents the export sheet through a person’s interaction with your app’s UI. If the system launches your app with the Useractivitytype 4ar5j activity, pass the token you retrieve from the activity’s info dictionary using the Exporttokenuserinfokey 1y5l1.

  • completionHandler:

    A closure that the system calls, passing in export options that contain the person’s selections in the sheet.

Mentioned in

Discussion

This method provides your completion handler with an object that describes the types of browsing data someone exports, and also indicates whether the export needs to send data to files rather than directly to another browser on the device.

See Also

Exporting browser data