Skip to content

Commit

Permalink
Remove legacy bootstrap script
Browse files Browse the repository at this point in the history
  • Loading branch information
markmur committed Sep 29, 2023
1 parent e2cdbe2 commit 705883d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
13 changes: 0 additions & 13 deletions Sources/ShopifyCheckout/CheckoutBridge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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))"
Expand Down
1 change: 0 additions & 1 deletion Sources/ShopifyCheckout/CheckoutView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 705883d

Please sign in to comment.