---
title: "safariViewController(_:didCompleteInitialLoad:)"
framework: safariservices
role: symbol
role_heading: Instance Method
path: "safariservices/sfsafariviewcontrollerdelegate/safariviewcontroller(_:didcompleteinitialload:)"
---

# safariViewController(_:didCompleteInitialLoad:)

Tells the delegate that the initial URL load completed.

## Declaration

```swift
optional func safariViewController(_ controller: SFSafariViewController, didCompleteInitialLoad didLoadSuccessfully: Bool)
```

## Parameters

- `controller`: The view controller.
- `didLoadSuccessfully`: doc://com.apple.documentation/documentation/Swift/true if loading completed successfully; otherwise, doc://com.apple.documentation/documentation/Swift/false.

## Discussion

Discussion This method is invoked when SFSafariViewController completes the loading of the URL that you pass to its initializer. The method is not invoked for any subsequent page loads in the same SFSafariViewController instance.

## See Also

### Working with the View Controller

- [safariViewController(_:activityItemsFor:title:)](safariservices/sfsafariviewcontrollerdelegate/safariviewcontroller(_:activityitemsfor:title:).md)
- [safariViewControllerDidFinish(_:)](safariservices/sfsafariviewcontrollerdelegate/safariviewcontrollerdidfinish(_:).md)
- [safariViewController(_:excludedActivityTypesFor:title:)](safariservices/sfsafariviewcontrollerdelegate/safariviewcontroller(_:excludedactivitytypesfor:title:).md)
