@apex-inc/capacitor-plugin 0.3.2 → 0.3.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.
@@ -87,9 +87,15 @@ public final class DefaultSkanUpdater: SkanUpdaterProtocol {
87
87
  SKAdNetwork.updatePostbackConversionValue(fineValue) { error in
88
88
  completion(error)
89
89
  }
90
- } else {
90
+ } else if #available(iOS 14.0, *) {
91
91
  SKAdNetwork.updateConversionValue(fineValue)
92
92
  completion(nil)
93
+ } else {
94
+ // SKAdNetwork conversion values are an iOS 14+ feature. On
95
+ // iOS 13 there's no API to call — silently no-op so the
96
+ // plugin still compiles for hosts that target iOS 13.0
97
+ // (Capacitor 7's default Podfile platform).
98
+ completion(nil)
93
99
  }
94
100
  }
95
101
  }
@@ -304,7 +304,11 @@ public class ApexCapacitorPlugin: CAPPlugin, CAPBridgedPlugin {
304
304
  let payloadDict = call.options.compactMapValues { $0 }
305
305
  var codablePayload: [String: AnyCodable] = [:]
306
306
  for (k, v) in payloadDict {
307
- codablePayload[k] = AnyCodable(v)
307
+ // call.options is [AnyHashable: Any] in modern Capacitor — every
308
+ // key is in practice a String, but the compiler can't prove that.
309
+ if let key = k as? String {
310
+ codablePayload[key] = AnyCodable(v)
311
+ }
308
312
  }
309
313
  let event = NativeQueuedEvent(
310
314
  id: id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apex-inc/capacitor-plugin",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "Apex Capacitor plugin — iOS/Android attribution, events, deep linking, SKAN, and offline-tolerant tracking for Capacitor apps.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/esm/index.js",