Contents

loadFileURL(_:allowingReadAccessTo:)

Loads the web content from the specified file and navigates to it.

Declaration

func loadFileURL(_ URL: URL, allowingReadAccessTo readAccessURL: URL) -> WKNavigation?

Parameters

  • URL:

    The URL of a file that contains web content. This URL must be a file-based URL.

  • readAccessURL:

    The URL of a file or directory containing web content that you grant the system permission to read. This URL must be a file-based URL and must not be empty. To prevent WebKit from reading any other content, specify the same value as the URL parameter. To read additional files related to the content file, specify a directory.

Return Value

A new navigation object you use to track the loading progress of the request.

Discussion

This method sets the source of this load request for app activity data to NSURLRequest.Attribution.developer. To specify the source of this load, use loadFileRequest(_:allowingReadAccessTo:) instead.

See Also

Loading web content