Braintree降价Apple Pay崩溃 [英] Braintree Drop In Apple Pay crashing
问题描述
呈现PKPaymentAuthorizationViewController始终会导致完全崩溃,并指向我的AppDelegate:线程1:信号SIGABRT
Presenting PKPaymentAuthorizationViewController always results in a total crash with pointing to my AppDelegate: Thread 1: signal SIGABRT
let vc = PKPaymentAuthorizationViewController(paymentRequest: paymentRequest) as PKPaymentAuthorizationViewController?
if vc != nil{
vc!.delegate = self
self.present(vc!, animated: true, completion: nil)
}else{
print("error")
}
libc ++ abi.dylib:以类型为NSException的未捕获异常终止
btw .:我正在检查.canMakePayments ()(如果先提供)。
btw.: I am checking .canMakePayments() if it is available first.
例外消息是
受支持方向与应用程序没有通用方向,并且[PKPaymentAuthorizationViewController shouldAutorotate]返回YES
Supported orientations has no common orientation with the application, and [PKPaymentAuthorizationViewController shouldAutorotate] is returning YES
推荐答案
PKPaymentAuthorizationViewController
以纵向显示,以便FaceID正常运行。
The PKPaymentAuthorizationViewController
is presented in portrait orientation so that FaceID functions correctly.
您会遇到一个例外,因为您在项目的设备方向下仅选择了横向选项。您需要在此列表中添加肖像。
You are getting an exception as you have only landscape options selected under 'Device Orientation' in your project. You need to add portrait to this list.
如果需要的话,可以将其余的视图控制器限制为横向。
You can limit the rest of your view controllers to landscape orientation if that is what you want.
这篇关于Braintree降价Apple Pay崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!