Skip to content

Commit

Permalink
add webview inspection
Browse files Browse the repository at this point in the history
  • Loading branch information
Apekka committed Jul 25, 2024
1 parent 0b9392f commit 6c4d406
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ios/MessageWebViewWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ class _MessageWebViewWrapper: NSObject, UANavigationDelegate, NativeBridgeDelega
self.nativeBridge.nativeBridgeDelegate = self
self.webView.navigationDelegate = self.nativeBridge
self.webView.configuration.dataDetectorTypes = .all

if #available(iOS 16.4, *) {
self.webView.isInspectable = Airship.isFlying && Airship.config.isWebViewInspectionEnabled
}
}

@MainActor
Expand Down
6 changes: 5 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,11 +481,15 @@ export interface AirshipConfig {
*/
itunesId?: string;


/**
* If set to `true`, the SDK will use the preferred locale. Otherwise it will use the app's locale.
*/
useUserPreferredLocale?: boolean;

/**
* Allows the WebViews to be inspected in Safari.
*/
isWebViewInspectionEnabled?: boolean;
};

/**
Expand Down

0 comments on commit 6c4d406

Please sign in to comment.