呈现PKPaymentAuthorizationViewController始终会导致完全崩溃,并指向我的AppDelegate:线程1:信号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的未捕获异常终止
顺便说一句:我正在检查.canMakePayments()是否首先可用。
异常消息是
受支持的方向与应用程序没有共同的方向,并且[PKPaymentAuthorizationViewController shouldAutorotate]返回YES