From 705883db4873754150c812d06b67819810843f5b Mon Sep 17 00:00:00 2001 From: Mark Murray Date: Thu, 28 Sep 2023 10:54:19 +0100 Subject: [PATCH] Remove legacy bootstrap script --- Sources/ShopifyCheckout/CheckoutBridge.swift | 13 ------------- Sources/ShopifyCheckout/CheckoutView.swift | 1 - 2 files changed, 14 deletions(-) diff --git a/Sources/ShopifyCheckout/CheckoutBridge.swift b/Sources/ShopifyCheckout/CheckoutBridge.swift index c4b5725f..36a9e1eb 100644 --- a/Sources/ShopifyCheckout/CheckoutBridge.swift +++ b/Sources/ShopifyCheckout/CheckoutBridge.swift @@ -28,19 +28,6 @@ enum CheckoutBridge { static let messageHandler = "mobileCheckoutSdk" - static let bootstrapScript: WKUserScript = { - let source = """ - window.mobileCheckoutSdkVariant = "standard"; - window.mobileCheckoutSdkSchemaVersion = "\(schemaVersion)"; - window.mobileCheckoutSdkVersion = "\(ShopifyCheckout.version)"; - """ - return WKUserScript( - source: source, - injectionTime: .atDocumentStart, - forMainFrameOnly: true - ) - }() - static var applicationName: String { let theme = ShopifyCheckout.configuration.colorScheme.rawValue return "ShopifyCheckoutSDK/\(ShopifyCheckout.version) (\(schemaVersion);\(theme))" diff --git a/Sources/ShopifyCheckout/CheckoutView.swift b/Sources/ShopifyCheckout/CheckoutView.swift index 86d395ac..620ab3bf 100644 --- a/Sources/ShopifyCheckout/CheckoutView.swift +++ b/Sources/ShopifyCheckout/CheckoutView.swift @@ -69,7 +69,6 @@ class CheckoutView: WKWebView { override init(frame: CGRect, configuration: WKWebViewConfiguration) { configuration.applicationNameForUserAgent = CheckoutBridge.applicationName - configuration.userContentController.addUserScript(CheckoutBridge.bootstrapScript) super.init(frame: frame, configuration: configuration)