我试图在我的应用程序中实现 Apple Pay ,但出现错误,例如“应用程序试图在目标上显示nil模态视图控制器”
在以下代码段中,谁能说出我错了。

PKPaymentAuthorizationViewController *vc = [[PKPaymentAuthorizationViewController alloc] initWithPaymentRequest:payment];
vc.delegate = self;
[self presentViewController:vc animated:YES completion:nil];

最佳答案

实际上,当Apple Pay 在设备分配到的国家/地区不支持时,它将在Simulator上运行,但在实际设备上不起作用。请考虑一下。

10-08 06:05