我没有使用CocoaPods将Core-io添加到我的项目中 然后我按照正确的步骤:
这是mySimpleCode:
//用户确认扫描信息
func userDidProvideCreditCardInfo(cardInfo: CardIOCreditCardInfo!, inPaymentViewController paymentViewController: CardIOPaymentViewController!) {
if let card = cardInfo {
labelResult.text = "卡号:\(card.cardNumber)\n过期年月:\(card.expiryYear)年\(card.expiryMonth)月\nCVV:\(card.cvv)"
}
paymentViewController.dismissViewControllerAnimated(true, completion: nil)
}
开始扫描:
//begin scan
@IBAction func startScan(sender: UIButton) {
let cardVC = CardIOPaymentViewController(paymentDelegate: self)
cardVC.modalPresentationStyle = .FormSheet
presentViewController(cardVC, animated: true, completion: nil)
}
以下是例外:
2015-11-26 13:06:05.623 ScanCard [17161:930434] + [NSObject testForObjCLinkerFlag]:无法识别的选择器发送到类0x11107c170 2015-11-26 13:06:05.628 ScanCard [17161:930434] *由于未捕获的异常终止应用程序' CardIO-IncompleteIntegration',原因:'请将-ObjC添加到&# 39;其他Linker Flags'在您的项目设置中。 (+ [NSObject testForObjCLinkerFlag]:无法识别的选择器发送到类0x11107c170)' * 首先抛出调用堆栈:
我尝试将-ObjC
添加到Other Linker Flags
,但构建失败。