Sha256: 543b58ee693fde5161ddc4b29102865dab74936c83ce989f315a73e5b0e305c2

Contents?: true

Size: 640 Bytes

Versions: 18

Compression:

Stored size: 640 Bytes

Contents

import Foundation
import WebKit
import Strada

enum WebViewPool {
    static var shared = WKProcessPool()
}

extension WKWebViewConfiguration {
    static var appConfiguration: WKWebViewConfiguration {
        let stradaSubstring = Strada.userAgentSubstring(for: BridgeComponent.allTypes)
        let userAgent = "Turbo Native iOS \(stradaSubstring)"

        let configuration = WKWebViewConfiguration()
        configuration.processPool = WebViewPool.shared
        configuration.applicationNameForUserAgent = userAgent
        configuration.defaultWebpagePreferences?.preferredContentMode = .mobile

        return configuration
    }
}

Version data entries

18 entries across 9 versions & 1 rubygems

Version Path
turbo-native-initializer-0.0.19 lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Extensions/WKWebViewConfiguration+App.swift
turbo-native-initializer-0.0.19 lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Extensions/WKWebViewConfiguration+App.swift
turbo-native-initializer-0.0.18 lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Extensions/WKWebViewConfiguration+App.swift
turbo-native-initializer-0.0.18 lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Extensions/WKWebViewConfiguration+App.swift
turbo-native-initializer-0.0.17 lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Extensions/WKWebViewConfiguration+App.swift
turbo-native-initializer-0.0.17 lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Extensions/WKWebViewConfiguration+App.swift
turbo-native-initializer-0.0.16 lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/WKWebViewConfiguration+App.swift
turbo-native-initializer-0.0.16 lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/WKWebViewConfiguration+App.swift
turbo-native-initializer-0.0.15 lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/WKWebViewConfiguration+App.swift
turbo-native-initializer-0.0.15 lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/WKWebViewConfiguration+App.swift
turbo-native-initializer-0.0.14 lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/WKWebViewConfiguration+App.swift
turbo-native-initializer-0.0.14 lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/WKWebViewConfiguration+App.swift
turbo-native-initializer-0.0.13 lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/WKWebViewConfiguration+App.swift
turbo-native-initializer-0.0.13 lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/WKWebViewConfiguration+App.swift
turbo-native-initializer-0.0.12 lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/WKWebViewConfiguration+App.swift
turbo-native-initializer-0.0.12 lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/WKWebViewConfiguration+App.swift
turbo-native-initializer-0.0.11 lib/turbo_native_initializer/templates/ios_tabs/TurboNativeProject/Controllers/WKWebViewConfiguration+App.swift
turbo-native-initializer-0.0.11 lib/turbo_native_initializer/templates/ios_stack/TurboNativeProject/Controllers/WKWebViewConfiguration+App.swift