【问题标题】:ionic storekit Cannot finish a purchasing transaction , exception in webkitionic storekit 无法完成购买交易,webkit 中的异常
【发布时间】:2015-01-08 18:35:57
【问题描述】:

我正在使用 ionic 框架来构建 iOS 应用。目前,我正在为订阅添加应用购买。到目前为止,我已经:

  • 创建标识符
  • 创建开发配置文件
  • 创建一个新应用(使用标识符)
  • 创建购买
  • 添加了一个虚拟屏幕截图
  • 在沙盒模式下创建测试用户
  • 从设置中退出 iTunes(也尝试重置所有设置)
  • 按照此处的说明进行操作:https://github.com/AlexDisler/ng-storekit
  • cordova build ios
  • 用 XCode 打开并在我的设备上运行

运行以下代码正确列出了我的产品:

  $storekit
    .setLogging(true)
    .load(['com.insiderai.ios.basic1'])
    .then(function (products) {
      console.log('products loaded', JSON.stringify(products));
    })
    .catch(function () {
      console.log('no products loaded');
    });

当我从控制器执行$storekit.purchase("com.insiderai.ios.basic1"); 时出现以下错误:

2014-11-11 17:45:27.139 insider_ios[219:6335] InAppPurchase[objc]: About to do IAP
2014-11-11 17:45:27.140 insider_ios[219:6335] InAppPurchase[objc]: Transaction updated: com.insiderai.ios.basic1
2014-11-11 17:45:27.140 insider_ios[219:6335] InAppPurchase[objc]: Purchasing...
2014-11-11 17:45:27.141 insider_ios[219:6335] InAppPurchase[objc]: State: PaymentTransactionStatePurchasing
2014-11-11 17:45:27.145 insider_ios[219:6335] *** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: <NSInvalidArgumentException> Cannot finish a purchasing transaction

有什么想法吗?从哪里开始寻找?

【问题讨论】:

    标签: ios cordova ionic-framework storekit


    【解决方案1】:

    【讨论】:

    • 这行得通。现在我在 options.purchase 中遇到异常:“TypeError: undefined is not a function (evalating '_onPurchase(transactionId, productId)')”
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-02
    • 1970-01-01
    • 2015-02-18
    • 2018-09-08
    相关资源
    最近更新 更多