iOS ApplePay PKPaymentAuthorizationViewController不在Xcode11 / iOS 13中出现

问题描述 投票:2回答:1

我们的应用程序已经实施ApplePay已有多年了。就在最近,我按下了按钮以触发它,仅从PKPaymentAuthorizationViewController中找出工资单没有出现。它不会在沙盒(即连接到Xcode的模拟器或设备)环境中向上滑动,但是放置一个断点表明它已成功创建。自测试以来已经有一段时间了,但是我怀疑Xcode11或iOS 13会有所改变。

我的代码是非常标准的Apple Pay,但在下面发布。

        let item = PKPaymentSummaryItem()
        item.label = "Our Label"
        let price = NSDecimalNumber(mantissa: UInt64(totalPrice), exponent: -2, isNegative: false)
        item.amount = price

        items.append(item)

        request.paymentSummaryItems = items

        if let applePayController = PKPaymentAuthorizationViewController(paymentRequest: request) {
            applePayController.delegate = self
            present(applePayController, animated: true)
        }
ios swift applepay
1个回答
0
投票

我面临着同样的问题,Apple Pay突然停止在我们的应用程序中工作。我们也已经为此提供了至少一半的支持。

使用最新的Xcode(Xcode 11.2,Beta 2(11B44)),它似乎可以再次使用。

我猜那是Xcode错误。即使未在Xcode 11.1Xcode 11.2 beta 2的Xcode发行说明中列出。

© www.soinside.com 2019 - 2024. All rights reserved.