iOS Swift Paypal 集成崩溃与 NSInvalidArgumentException 应用程序试图在目标上呈现 nil 模态视图控制器

iOS Swift Paypal Integration Crash with NSInvalidArgumentException Application tried to present a nil modal view controller on target

从 link 下载的源代码:https://github.com/paypal/PayPal-iOS-SDK

payPalConfig.acceptCreditCards = false

如果我设置 payPalConfig.acceptCreditCards to true,应用程序崩溃并出现以下异常:

* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present a nil modal view controller on target <PayPalPaymentViewController: 0x10184ec00 Environment: mock languageOrLocale: en-IN

I'm getting crash when i clicking "pay with card" option

正在创建Project-Bridging-Header.h file

import "PayPalMobile.h"

import "CardIO.h"

在 viewcontroller.h 文件中,并在 class.

中添加 CardIOPaymentViewControllerDelegate