@tokamakdev/platform-ios-simulator-x64 0.1.1-beta.107 → 0.1.1-beta.114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios-simulator-x64/build/entrypoint +25 -5
- package/ios-simulator-x64/frameworks/TokamakRuntime.framework/Headers/TokamakRuntime.h +10 -4
- package/ios-simulator-x64/frameworks/TokamakRuntime.framework/TokamakRuntime +0 -0
- package/ios-simulator-x64/native-shell/TokamakApp.swift +81 -63
- package/ios-simulator-x64/native-shell/TokamakBindings.swift +347 -0
- package/ios-simulator-x64/native-shell/TokamakControls.swift +98 -0
- package/ios-simulator-x64/native-shell/TokamakOrigin.swift +7 -0
- package/ios-simulator-x64/native-shell/TokamakPlugins.swift +307 -156
- package/ios-simulator-x64/native-shell/TokamakResources.swift +74 -0
- package/ios-simulator-x64/native-shell/TokamakShell.swift +3 -20
- package/ios-simulator-x64/platform-pack.json +1 -0
- package/ios-simulator-x64/tools/tokamak-apple-signing +0 -0
- package/package.json +1 -1
|
@@ -14,18 +14,9 @@ private let failurePage =
|
|
|
14
14
|
|
|
15
15
|
private final class NavigationDelegate: NSObject, WKNavigationDelegate, WKUIDelegate {
|
|
16
16
|
private let runtime: RuntimeHandle
|
|
17
|
-
private let pluginBridge: TokamakPluginBridge
|
|
18
17
|
|
|
19
|
-
init(runtime: RuntimeHandle
|
|
18
|
+
init(runtime: RuntimeHandle) {
|
|
20
19
|
self.runtime = runtime
|
|
21
|
-
self.pluginBridge = pluginBridge
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
func webView(
|
|
25
|
-
_ webView: WKWebView,
|
|
26
|
-
didStartProvisionalNavigation navigation: WKNavigation?
|
|
27
|
-
) {
|
|
28
|
-
pluginBridge.close()
|
|
29
20
|
}
|
|
30
21
|
|
|
31
22
|
func webView(
|
|
@@ -223,7 +214,6 @@ private final class TokamakController {
|
|
|
223
214
|
private let app: TokamakApp
|
|
224
215
|
private var runtime: RuntimeHandle?
|
|
225
216
|
private var navigation: NavigationDelegate?
|
|
226
|
-
private var pluginBridge: TokamakPluginBridge?
|
|
227
217
|
private weak var activeWebView: WKWebView?
|
|
228
218
|
private var dataStore: WKWebsiteDataStore?
|
|
229
219
|
private var proxyPort: UInt16?
|
|
@@ -232,10 +222,6 @@ private final class TokamakController {
|
|
|
232
222
|
self.app = app
|
|
233
223
|
}
|
|
234
224
|
|
|
235
|
-
deinit {
|
|
236
|
-
pluginBridge?.close()
|
|
237
|
-
}
|
|
238
|
-
|
|
239
225
|
func start(frame: CGRect, completion: @escaping (WKWebView) -> Void) {
|
|
240
226
|
app.whenStarted { result in
|
|
241
227
|
switch result {
|
|
@@ -275,9 +261,7 @@ private final class TokamakController {
|
|
|
275
261
|
#endif
|
|
276
262
|
configuration.mediaTypesRequiringUserActionForPlayback = []
|
|
277
263
|
|
|
278
|
-
let
|
|
279
|
-
pluginBridge.install(in: configuration.userContentController)
|
|
280
|
-
let navigation = NavigationDelegate(runtime: runtime, pluginBridge: pluginBridge)
|
|
264
|
+
let navigation = NavigationDelegate(runtime: runtime)
|
|
281
265
|
self.navigation = navigation
|
|
282
266
|
let webView = WKWebView(frame: frame, configuration: configuration)
|
|
283
267
|
#if os(iOS)
|
|
@@ -285,8 +269,7 @@ private final class TokamakController {
|
|
|
285
269
|
#endif
|
|
286
270
|
webView.allowsLinkPreview = false
|
|
287
271
|
activeWebView = webView
|
|
288
|
-
|
|
289
|
-
self.pluginBridge = pluginBridge
|
|
272
|
+
app.webView = webView
|
|
290
273
|
webView.navigationDelegate = navigation
|
|
291
274
|
webView.uiDelegate = navigation
|
|
292
275
|
webView.load(URLRequest(url: URL(string: "https://\(runtime.appHost)/")!))
|
|
Binary file
|