@capacitor/ios 5.6.0 → 5.7.0
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.
|
@@ -24,6 +24,7 @@ CAP_PLUGIN(CAPConsolePlugin, "Console",
|
|
|
24
24
|
)
|
|
25
25
|
|
|
26
26
|
CAP_PLUGIN(CAPWebViewPlugin, "WebView",
|
|
27
|
+
CAP_PLUGIN_METHOD(setServerAssetPath, CAPPluginReturnPromise);
|
|
27
28
|
CAP_PLUGIN_METHOD(setServerBasePath, CAPPluginReturnPromise);
|
|
28
29
|
CAP_PLUGIN_METHOD(getServerBasePath, CAPPluginReturnPromise);
|
|
29
30
|
CAP_PLUGIN_METHOD(persistServerBasePath, CAPPluginReturnPromise);
|
|
@@ -3,6 +3,13 @@ import Foundation
|
|
|
3
3
|
@objc(CAPWebViewPlugin)
|
|
4
4
|
public class CAPWebViewPlugin: CAPPlugin {
|
|
5
5
|
|
|
6
|
+
@objc func setServerAssetPath(_ call: CAPPluginCall) {
|
|
7
|
+
if let path = call.getString("path"), let viewController = bridge?.viewController as? CAPBridgeViewController {
|
|
8
|
+
viewController.setServerBasePath(path: Bundle.main.url(forResource: path, withExtension: nil)?.path ?? path)
|
|
9
|
+
call.resolve()
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
6
13
|
@objc func setServerBasePath(_ call: CAPPluginCall) {
|
|
7
14
|
if let path = call.getString("path"), let viewController = bridge?.viewController as? CAPBridgeViewController {
|
|
8
15
|
viewController.setServerBasePath(path: path)
|
|
@@ -279,6 +279,10 @@ var nativeBridge = (function (exports) {
|
|
|
279
279
|
callback(result.path);
|
|
280
280
|
});
|
|
281
281
|
};
|
|
282
|
+
IonicWebView.setServerAssetPath = (path) => {
|
|
283
|
+
var _a;
|
|
284
|
+
(_a = Plugins === null || Plugins === void 0 ? void 0 : Plugins.WebView) === null || _a === void 0 ? void 0 : _a.setServerAssetPath({ path });
|
|
285
|
+
};
|
|
282
286
|
IonicWebView.setServerBasePath = (path) => {
|
|
283
287
|
var _a;
|
|
284
288
|
(_a = Plugins === null || Plugins === void 0 ? void 0 : Plugins.WebView) === null || _a === void 0 ? void 0 : _a.setServerBasePath({ path });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/ios",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"description": "Capacitor: Cross-platform apps with JavaScript and the web",
|
|
5
5
|
"homepage": "https://capacitorjs.com",
|
|
6
6
|
"author": "Ionic Team <hi@ionic.io> (https://ionic.io)",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"xc:build:CapacitorCordova": "cd CapacitorCordova && xcodebuild && cd .."
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@capacitor/core": "^5.
|
|
28
|
+
"@capacitor/core": "^5.7.0"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|