使用中
"react": "16.9.0",
"react-native": "0.61.5",
"react-native-purchases": "^3.0.6",
[我们在通过iOS 13.3.1上的testflight运行的11英寸iPad上遇到问题。所有模拟器都可以正常运行,并且在testflight上运行的iPhone和其他iPad也可以正常工作。
问题是Purchases.purchasePackage返回的承诺既没有解决也没有拒绝-它挂起了。通过本地的Obj-C代码进行组合后,我在文件Pods / Purchases / RCPurchases.m中找到了相关的代码。方法
- (void)purchaseProduct:(SKProduct *)product withPayment:(SKMutablePayment *)payment withPresentedOfferingIdentifier:(nullable NSString *)presentedOfferingIdentifier completion:(RCPurchaseCompletedBlock)completion
正在被调用,并且行
[self.storeKitWrapper addPayment:[payment copy]];
被调用,但是回调方法
- (void)storeKitWrapper:(RCStoreKitWrapper *)storeKitWrapper
updatedTransaction:(SKPaymentTransaction *)transaction
从未被调用。这可能是SKPaymentQueue的潜在问题吗?
谢谢!
事实证明,我的iPad实际上使用的是旧版iOS。更新它可以解决问题。