@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.
@@ -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: { (current, _) in current }) as? [String: String] {
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
- let proxyUrl = new URL(url);
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
- const originalHost = encodeURIComponent(proxyUrl.host);
148
- const originalPathname = proxyUrl.pathname;
149
- proxyUrl = new URL((_b = (_a = win.Capacitor) === null || _a === void 0 ? void 0 : _a.getServerUrl()) !== null && _b !== void 0 ? _b : '');
150
- proxyUrl.pathname = `${isHttps ? CAPACITOR_HTTPS_INTERCEPTOR : CAPACITOR_HTTP_INTERCEPTOR}/${originalHost}${originalPathname}`;
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
- const modifiedResource = createProxyUrl(resource.toString(), win);
505
- const response = await win.CapacitorWebFetch(modifiedResource, options);
506
- return response;
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>
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/ios",
3
- "version": "5.7.2",
3
+ "version": "5.7.4",
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)",