Skip to content

Commit e3b171e

Browse files
committed
fix(capacitor-ios): use binary-framework-compatible Capacitor API calls
getBool single-arg optional variant and getArray generic variant are not exposed by the precompiled xcframework. Use two-arg getBool and cast-based getArray instead.
1 parent b7b81fd commit e3b171e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

capacitor/ios/Sources/PurchasePlugin/PurchasePlugin.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public class PurchasePlugin: CAPPlugin, CAPBridgedPlugin {
6262
// MARK: - Plugin Methods
6363

6464
@objc func `init`(_ call: CAPPluginCall) {
65-
debugEnabled = call.getBool("debug") ?? false
65+
debugEnabled = call.getBool("debug", false)
6666
debugLog("init")
6767

6868
// Process any pending transactions
@@ -77,7 +77,7 @@ public class PurchasePlugin: CAPPlugin, CAPBridgedPlugin {
7777
}
7878

7979
@objc func load(_ call: CAPPluginCall) {
80-
guard let productIds = call.getArray("productIds", String.self) else {
80+
guard let productIds = call.getArray("productIds") as? [String] else {
8181
call.reject("productIds is required")
8282
return
8383
}

0 commit comments

Comments
 (0)