---
sourceDocument: Australia API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/de-DE/api-reference

 Release :

    - australia

ft:locale :

    - de-DE

ft:publication_title :

    - Australia API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# NowWebViewControllerDelegate protocol - iOS

# NowWebViewControllerDelegate protocol - iOS {#ariaid-title1}

* Freigeben Version: Australia
* 
* Aktualisiert 12. März 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 Minuten Lesedauer

The NowWebViewControllerDelegate protocol provides callbacks for
notification of issues within the NowWebViewController processing such as
when a flow ends or a navigation fails.

## NowWebViewControllerDelegate - nowWebViewController(_ nowWebViewController:
NowWebViewController, didEndFlow flowName: String) {#ariaid-title2}

Callback that notifies the host application that the specified Cabrillo (mobile web)
flow has ended.
{#NWVCD-nowWebViewCont_EndFlow__table_fkt_tqv_wqb__entry__3}

| Name | Type | Description |
|-|-|-|
| nowWebViewController | [NowWebViewController](https://servicenow-prod.fluidtopics.net/aRXRcv92tzy_FkjrdPATpw#NWebViewControlleriOSAPI "The NowWebViewController class provides functions that enable you to manage a web viewer.") | Instance of NowWebViewController where the flow ended. |
| didEndFlow flowName | String | Name of the Cabrillo flow that ended |
[Tabelle : 1. Parameters]

{#NWVCD-nowWebViewCont_EndFlow__table_fkt_tqv_wqb} {#NWVCD-nowWebViewCont_EndFlow__table_gkt_tqv_wqb__entry__2}

| Type | Description |
|-|-|
| None |   |
[Tabelle : 2. Returns]

{#NWVCD-nowWebViewCont_EndFlow__table_gkt_tqv_wqb}  
The following code example shows how to call this method.

    func nowWebViewController(_ nowWebViewController: NowWebViewController, didEndFlow flowName: String) {
      debugPrint("ended flow named: \(flowName)")
    }

## NowWebViewControllerDelegate - nowWebViewController(_ nowWebViewController:
NowWebViewController, didFailNavigationWith error: Swift.Error) {#ariaid-title3}

Callback that notifies the host application that the web view navigation has
failed.
{#NWVCD-nowWebViewCont_FailNav__table_y4z_csv_wqb__entry__3}

| Name | Type | Description |
|-|-|-|
| nowWebViewController | [NowWebViewController](https://servicenow-prod.fluidtopics.net/aRXRcv92tzy_FkjrdPATpw#NWebViewControlleriOSAPI "The NowWebViewController class provides functions that enable you to manage a web viewer.") | Instance of NowWebViewController in which the navigation failed. |
| didFailNavigationWith error | Swift.Error | Error raised from the navigation failure. |
[Tabelle : 3. Parameters]

{#NWVCD-nowWebViewCont_FailNav__table_y4z_csv_wqb} {#NWVCD-nowWebViewCont_FailNav__table_z4z_csv_wqb__entry__2}

| Type | Description |
|-|-|
| None |   |
[Tabelle : 4. Returns]

{#NWVCD-nowWebViewCont_FailNav__table_z4z_csv_wqb}  
The following code example shows how to call this method.

    func nowWebViewController(_ nowWebViewController: NowWebViewController, didFailNavigationWith error: Error) {
      debugPrint("NowWebViewController encountered a navigation error: \(error.localizedDescription)")
    }

## NowWebViewControllerDelegate - nowWebViewController(_ nowWebViewController:
NowWebViewController, didReceive unsupportedUrl: URL) {#ariaid-title4}

Callback that notifies the host application that the web view attempted to load an
unsupported URL.
An unsupported URL could be one for a different ServiceNow instance or an absolute URL with an invalid scheme.  
Hinweis:  
Valid schemes are http and https.
{#NWVCD-nowWebViewCont_didReceive__table_xwc_vsv_wqb__entry__3}

| Name | Type | Description |
|-|-|-|
| nowWebViewController | [NowWebViewController](https://servicenow-prod.fluidtopics.net/aRXRcv92tzy_FkjrdPATpw#NWebViewControlleriOSAPI "The NowWebViewController class provides functions that enable you to manage a web viewer.") | Instance of NowWebViewController used when attempting to load the unsupported URL. |
| didReceive unsupportedUrl | URL | Invalid URL trying to be loaded. |
[Tabelle : 5. Parameters]

{#NWVCD-nowWebViewCont_didReceive__table_xwc_vsv_wqb} {#NWVCD-nowWebViewCont_didReceive__table_ywc_vsv_wqb__entry__2}

| Type | Description |
|-|-|
| None |   |
[Tabelle : 6. Returns]

{#NWVCD-nowWebViewCont_didReceive__table_ywc_vsv_wqb}  
The following code example shows how to call this method.

    func nowWebViewController(_ nowWebViewController: NowWebViewController, didReceive unsupportedUrl: URL) {
      debugPrint("nowWebViewController:receivedUnsupportedUrl: \(unsupportedUrl.absoluteString)")
    }

## NowWebViewControllerDelegate - nowWebViewControllerDidRequestDismissal(_
nowWebViewController: NowWebViewController) {#ariaid-title5}

Callback that notifies the host application that during a back navigation attempt, the
stack was exhausted. The host application can then decide whether to dismiss the
NowWebViewController instance.
{#NWVCD-nowWebViewContDidReqDismiss__table_xs2_4vv_wqb__entry__3}

| Name | Type | Description |
|-|-|-|
| nowWebViewController | [NowWebViewController](https://servicenow-prod.fluidtopics.net/aRXRcv92tzy_FkjrdPATpw#NWebViewControlleriOSAPI "The NowWebViewController class provides functions that enable you to manage a web viewer.") | Instance of NowWebViewController in which the back navigation was attempted. |
[Tabelle : 7. Parameters]

{#NWVCD-nowWebViewContDidReqDismiss__table_xs2_4vv_wqb} {#NWVCD-nowWebViewContDidReqDismiss__table_ys2_4vv_wqb__entry__2}

| Type | Description |
|-|-|
| None |   |
[Tabelle : 8. Returns]

{#NWVCD-nowWebViewContDidReqDismiss__table_ys2_4vv_wqb}  
The following code example shows how to call this method.

    func nowWebViewControllerDidRequestDismissal(_ nowWebViewController: NowWebViewController) {
      navigationController?.popViewController(animated: true)
    }

## NowWebViewControllerDelegate - nowWebViewController(_ nowWebViewController: NowWebViewController, systemThemeDidChange traitCollection: UITraitCollection) {#ariaid-title6}

Callback that notifies the host application that the system web UI theme changed.
{#NWVCD-nowWebViewCont_sysThmChg__table_tr3_4tw_x2c__entry__3}

| Name | Type | Description |
|-|-|-|
| nowWebViewController | [NowWebViewController](https://servicenow-prod.fluidtopics.net/aRXRcv92tzy_FkjrdPATpw#NWebViewControlleriOSAPI "The NowWebViewController class provides functions that enable you to manage a web viewer.") | Instance of NowWebViewController in which the web UI theme changed. |
| traitCollection | [UITraitCollection](https://developer.apple.com/documentation/uikit/uitraitcollection) | UITraitCollection object that contains the new theme. |
[Tabelle : 9. Parameters]

{#NWVCD-nowWebViewCont_sysThmChg__table_tr3_4tw_x2c} {#NWVCD-nowWebViewCont_sysThmChg__table_ur3_4tw_x2c__entry__2}

| Type | Description |
|-|-|
| None |   |
[Tabelle : 10. Returns]

{#NWVCD-nowWebViewCont_sysThmChg__table_ur3_4tw_x2c}  
The following code example shows how to override the systemThemeDidChange() delegate function to call the updateTheme() function to apply theme changes when the system theme changes.

    func nowWebViewController(_ nowWebViewController: NowWebViewController, systemThemeDidChange traitCollection: UITraitCollection) {

      /// Called when the system changes between dark and light mode

        /// You can call the corresponding updateTheme() method here to change the UI theme based on System Theme
        nowWebViewController.updateTheme(themeColors: traitCollection.userInterfaceStyle == .dark ? DarkNowWebTheme() : LightNowWebTheme())
          print("System Theme Did Change)
    }


