@capacitor/ios 5.7.2 → 5.7.4
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/Capacitor/Capacitor/PrivacyInfo.xcprivacy +23 -0
- package/Capacitor/Capacitor/WebViewAssetHandler.swift +1 -1
- package/Capacitor/Capacitor/assets/native-bridge.js +13 -9
- package/Capacitor.podspec +1 -1
- package/CapacitorCordova/CapacitorCordova/PrivacyInfo.xcprivacy +14 -0
- package/CapacitorCordova.podspec +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>NSPrivacyCollectedDataTypes</key>
|
|
6
|
+
<array/>
|
|
7
|
+
<key>NSPrivacyTrackingDomains</key>
|
|
8
|
+
<array/>
|
|
9
|
+
<key>NSPrivacyTracking</key>
|
|
10
|
+
<false/>
|
|
11
|
+
<key>NSPrivacyAccessedAPITypes</key>
|
|
12
|
+
<array>
|
|
13
|
+
<dict>
|
|
14
|
+
<key>NSPrivacyAccessedAPIType</key>
|
|
15
|
+
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
|
|
16
|
+
<key>NSPrivacyAccessedAPITypeReasons</key>
|
|
17
|
+
<array>
|
|
18
|
+
<string>CA92.1</string>
|
|
19
|
+
</array>
|
|
20
|
+
</dict>
|
|
21
|
+
</array>
|
|
22
|
+
</dict>
|
|
23
|
+
</plist>
|
|
@@ -172,7 +172,7 @@ internal class WebViewAssetHandler: NSObject, WKURLSchemeHandler {
|
|
|
172
172
|
]
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
if let mergedHeaders = existingHeaders.merging(newHeaders, uniquingKeysWith: { (
|
|
175
|
+
if let mergedHeaders = existingHeaders.merging(newHeaders, uniquingKeysWith: { (_, newHeaders) in newHeaders }) as? [String: String] {
|
|
176
176
|
|
|
177
177
|
if let responseUrl = response.url {
|
|
178
178
|
if let modifiedResponse = HTTPURLResponse(
|
|
@@ -142,13 +142,13 @@ var nativeBridge = (function (exports) {
|
|
|
142
142
|
var _a, _b;
|
|
143
143
|
if (isRelativeOrProxyUrl(url))
|
|
144
144
|
return url;
|
|
145
|
-
|
|
145
|
+
const proxyUrl = new URL(url);
|
|
146
|
+
const bridgeUrl = new URL((_b = (_a = win.Capacitor) === null || _a === void 0 ? void 0 : _a.getServerUrl()) !== null && _b !== void 0 ? _b : '');
|
|
146
147
|
const isHttps = proxyUrl.protocol === 'https:';
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
return proxyUrl.toString();
|
|
148
|
+
bridgeUrl.search = proxyUrl.search;
|
|
149
|
+
bridgeUrl.hash = proxyUrl.hash;
|
|
150
|
+
bridgeUrl.pathname = `${isHttps ? CAPACITOR_HTTPS_INTERCEPTOR : CAPACITOR_HTTP_INTERCEPTOR}/${encodeURIComponent(proxyUrl.host)}${proxyUrl.pathname}`;
|
|
151
|
+
return bridgeUrl.toString();
|
|
152
152
|
};
|
|
153
153
|
const initBridge = (w) => {
|
|
154
154
|
const getPlatformId = (win) => {
|
|
@@ -501,9 +501,13 @@ var nativeBridge = (function (exports) {
|
|
|
501
501
|
options.method.toLocaleUpperCase() === 'HEAD' ||
|
|
502
502
|
options.method.toLocaleUpperCase() === 'OPTIONS' ||
|
|
503
503
|
options.method.toLocaleUpperCase() === 'TRACE') {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
504
|
+
if (typeof resource === 'string') {
|
|
505
|
+
return await win.CapacitorWebFetch(createProxyUrl(resource, win), options);
|
|
506
|
+
}
|
|
507
|
+
else if (resource instanceof Request) {
|
|
508
|
+
const modifiedRequest = new Request(createProxyUrl(resource.url, win), resource);
|
|
509
|
+
return await win.CapacitorWebFetch(modifiedRequest, options);
|
|
510
|
+
}
|
|
507
511
|
}
|
|
508
512
|
const tag = `CapacitorHttp fetch ${Date.now()} ${resource}`;
|
|
509
513
|
console.time(tag);
|
package/Capacitor.podspec
CHANGED
|
@@ -19,7 +19,7 @@ Pod::Spec.new do |s|
|
|
|
19
19
|
s.source_files = "#{prefix}Capacitor/Capacitor/*.{swift,h,m}", "#{prefix}Capacitor/Capacitor/Plugins/*.{swift,h,m}",
|
|
20
20
|
"#{prefix}Capacitor/Capacitor/Plugins/**/*.{swift,h,m}"
|
|
21
21
|
s.module_map = "#{prefix}Capacitor/Capacitor/Capacitor.modulemap"
|
|
22
|
-
s.resources = ["#{prefix}Capacitor/Capacitor/assets/native-bridge.js"]
|
|
22
|
+
s.resources = ["#{prefix}Capacitor/Capacitor/assets/native-bridge.js", "#{prefix}Capacitor/Capacitor/PrivacyInfo.xcprivacy"]
|
|
23
23
|
s.dependency 'CapacitorCordova'
|
|
24
24
|
s.swift_version = '5.1'
|
|
25
25
|
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>NSPrivacyTrackingDomains</key>
|
|
6
|
+
<array/>
|
|
7
|
+
<key>NSPrivacyCollectedDataTypes</key>
|
|
8
|
+
<array/>
|
|
9
|
+
<key>NSPrivacyTracking</key>
|
|
10
|
+
<false/>
|
|
11
|
+
<key>NSPrivacyAccessedAPITypes</key>
|
|
12
|
+
<array/>
|
|
13
|
+
</dict>
|
|
14
|
+
</plist>
|
package/CapacitorCordova.podspec
CHANGED
|
@@ -20,6 +20,7 @@ Pod::Spec.new do |s|
|
|
|
20
20
|
s.public_header_files = "#{prefix}CapacitorCordova/CapacitorCordova/Classes/Public/*.h",
|
|
21
21
|
"#{prefix}CapacitorCordova/CapacitorCordova/CapacitorCordova.h"
|
|
22
22
|
s.module_map = "#{prefix}CapacitorCordova/CapacitorCordova/CapacitorCordova.modulemap"
|
|
23
|
+
s.resources = ["#{prefix}CapacitorCordova/CapacitorCordova/PrivacyInfo.xcprivacy"]
|
|
23
24
|
s.requires_arc = true
|
|
24
25
|
s.framework = 'WebKit'
|
|
25
26
|
end
|
package/package.json
CHANGED