Card.io 扫描信用卡后,iOS Phonegap 应用程序崩溃

标签 ios paypal cordova card.io

我的 iOS Phonegap 应用程序在使用 Card.io SDK 扫描信用卡后崩溃。

卡片确实进行了扫描,并继续显示卡片上覆盖了数字的屏幕。在应用程序崩溃并在控制台中抛出此错误时:

[CardIOCreditCardInfo displayStringForCardType:]: unrecognized selector sent to class         0x271c88
2013-06-09 23:33:37.767 Cardio_HolaWorld[49544:907] *** Terminating app due to uncaught     exception 'NSInvalidArgumentException', reason: '+[CardIOCreditCardInfo     displayStringForCardType:]: unrecognized selector sent to class 0x271c88'
*** First throw call stack:
(0x331312a3 0x3ae5997f 0x33134ca3 0x33133531 0x3308af68 0xb6479 0x13a5e7 0x350240c5     0x3502414d 0x350240c5 0x35024077 0x35024055 0x3502390b 0x35023e01 0x34f4c5f1 0x34f39801     0x34f3911b 0x36c515a3 0x36c511d3 0x33106173 0x33106117 0x33104f99 0x33077ebd 0x33077d49     0x36c502eb 0x34f8d301 0xb4f5f 0xb4f20)
libc++abi.dylib: terminate called throwing an exception
(lldb) 

CardIOPGPlugin.m 文件(Card.io Phonegap 插件)中有一行 Xcode 高亮显示“Class method +displayStringForCardType: not found (return type defaults to 'id')”:

[CardIOCreditCardInfo displayStringForCardType:info.cardType], @"card_type",

我在 iPhone 4S 设备上使用 Phonegap 2.7、iOS 6.1.3、Xcode 4.6.2、OS X 10.8.3 进行构建。

最佳答案

@Paul 如果您使用最新的 card.io SDK,只需修改第 101 行的 CardIOPGPlugin.m 文件

[CardIOCreditCardInfo displayStringForCardType:info.cardType]

[CardIOCreditCardInfo displayStringForCardType:info.cardType usingLanguageOrLocale:[[NSLocale currentLocale] localeIdentifier]]

希望对您有所帮助。

关于Card.io 扫描信用卡后,iOS Phonegap 应用程序崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17017197/

相关文章:

javascript - Paypal 登录按钮,阻止新窗口或自动关闭?

javascript - 在phonegap应用程序中使用浏览器本地存储

ios - 在 viewController 之间传递 facebook 信息

multithreading - iOS 线程 "Modifying layer that is being finalized"

ios - 从自定义可编辑的 UITableViewCell 更新另一个字符串 - 在 swift 中通过引用传递?

xcode - locationManager didFailWithError null phonegap 模拟器

javascript - 在 cordova 中构建并加载一个简单的 Angular2 应用程序

ios - UIView 作为@EnvironmentObject 的订阅者

paypal - `Notify_URL` 会覆盖之前设置的 IPN 数据吗

php - Paypal : Get a response of "txn_type= recurring payment " instead of "txn_type= recurring_payment_profile_created" for the first Time