craft-native 0.0.101 → 0.0.104
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/dist/cli.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/ios/templates/CraftApp.swift +24 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -4621,7 +4621,7 @@ function pinCraftNativeDependency(packagePath, craftVersion) {
|
|
|
4621
4621
|
`);
|
|
4622
4622
|
}
|
|
4623
4623
|
// package.json
|
|
4624
|
-
var version = "0.0.
|
|
4624
|
+
var version = "0.0.104";
|
|
4625
4625
|
|
|
4626
4626
|
// bin/cli.ts
|
|
4627
4627
|
var spawnedFrom = process6.env[CRAFT_CLI_SPAWN_MARKER];
|
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -1703,12 +1703,32 @@ struct CraftWebView: UIViewRepresentable {
|
|
|
1703
1703
|
decisionHandler(.allow)
|
|
1704
1704
|
return
|
|
1705
1705
|
}
|
|
1706
|
+
// An iframe the app's page embeds loads in place. Only the main
|
|
1707
|
+
// frame's navigations leave for Safari: cancelling the frame's
|
|
1708
|
+
// too left every embed blank, a YouTube or Vimeo player among them.
|
|
1709
|
+
if let frame = navigationAction.targetFrame, !frame.isMainFrame, isEmbeddableFrameURL(url) {
|
|
1710
|
+
decisionHandler(.allow)
|
|
1711
|
+
return
|
|
1712
|
+
}
|
|
1706
1713
|
if navigationAction.targetFrame?.isMainFrame != false {
|
|
1707
1714
|
UIApplication.shared.open(url)
|
|
1708
1715
|
}
|
|
1709
1716
|
decisionHandler(.cancel)
|
|
1710
1717
|
}
|
|
1711
1718
|
|
|
1719
|
+
/// What an iframe inside the app's page may load: a video player, a
|
|
1720
|
+
/// payment form, a map. It stays inside its frame, and the bridge
|
|
1721
|
+
/// answers only `isTrustedOrigin`, so loading one reaches nothing
|
|
1722
|
+
/// native. Plain http is left to the trusted local origins.
|
|
1723
|
+
private func isEmbeddableFrameURL(_ url: URL) -> Bool {
|
|
1724
|
+
switch url.scheme?.lowercased() {
|
|
1725
|
+
case "https", "about", "data", "blob":
|
|
1726
|
+
return true
|
|
1727
|
+
default:
|
|
1728
|
+
return false
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1712
1732
|
func webViewWebContentProcessDidTerminate(_ webView: WKWebView) {
|
|
1713
1733
|
webView.reload()
|
|
1714
1734
|
}
|
|
@@ -4244,6 +4264,10 @@ struct CraftWebView: UIViewRepresentable {
|
|
|
4244
4264
|
}
|
|
4245
4265
|
isLocationRecordingPaused = false
|
|
4246
4266
|
persistLocationRecordingState()
|
|
4267
|
+
// Set here too: a recording restored at launch while paused never
|
|
4268
|
+
// got a delegate, so resuming it started updates nobody received
|
|
4269
|
+
// and the route stopped at the pause.
|
|
4270
|
+
locationManager?.delegate = self
|
|
4247
4271
|
requestLocationAuthorization()
|
|
4248
4272
|
configureBackgroundLocationIfNeeded()
|
|
4249
4273
|
locationManager?.startUpdatingLocation()
|