iOS Phonegap app crashes after Card.io scans credit card - ios

My iOS Phonegap app is crashing after scanning credit card using Card.io SDK.
The card does scan and does proceed to screen showing the card with the numbers overlaid. At the app crashes and throws this error in the console:
[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)
There is a line in the CardIOPGPlugin.m file (A Card.io Phonegap plugin) that Xcode hightlights "Class method +displayStringForCardType: not found (return type defaults to 'id')":
[CardIOCreditCardInfo displayStringForCardType:info.cardType], #"card_type",
I'm building with Phonegap 2.7, iOS 6.1.3, Xcode 4.6.2, OS X 10.8.3 on an iPhone 4S device.

#Paul if you using latest card.io SDK just modify the CardIOPGPlugin.m file on line 101 from
[CardIOCreditCardInfo displayStringForCardType:info.cardType]
to
[CardIOCreditCardInfo displayStringForCardType:info.cardType usingLanguageOrLocale:[[NSLocale currentLocale] localeIdentifier]]
Hope it helps.

Related

Ionic, phonegap nfc Exception in iOS

I am developing an Ionic app which reads nfc tags. But when I am running it in iOS I am getting the result from the nfc tag, but after that I am getting NSExcetion.
Here is the part of the code where I am trying to read NFC Tag:
if(this.platform.is("ios")) {
this.nfc.beginSession().subscribe(() => {
this.nfc.addNdefListener((data) => {
console.log("IOS: ",data) // You will not see this, at this point the app will crash
})
});
}
I never get the console.log !!!!!
These are the errors that I am getting in Xcode (version 9.2):
2018-02-01 09:06:57.987510-0500 androidSDK[1819:852595] readerSessionDidBecomeActive
2018-02-01 09:07:03.035369-0500 androidSDK[1819:852705] NFCNDEFReaderSession didDetectNDEFs
2018-02-01 09:07:03.035641-0500 androidSDK[1819:852705] {"ndefMessage":[{"tnf":1,"id":[],"payload":[2,101,110,72,101,108,108,111,46,33],"type":[84]},{"tnf":1,"id":[],"payload":[2,101,110,72,101,108,108,111,32,119,111,114,108,100,33,32],"type":[84]}]}
2018-02-01 09:07:03.035975-0500 androidSDK[1819:852430] -[WKWebView stringByEvaluatingJavaScriptFromString:]: unrecognized selector sent to instance 0x15e046200
2018-02-01 09:07:03.036619-0500 androidSDK[1819:852430] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[WKWebView stringByEvaluatingJavaScriptFromString:]: unrecognized selector sent to instance 0x15e046200'
*** First throw call stack:
(0x18121b164 0x180464528 0x181228628 0x18ab933c8 0x181220b10 0x181105ccc 0x104b74880 0x105cfd2cc 0x105cfd28c 0x105d01ea0 0x1811c3344 0x1811c0f20 0x1810e0c58 0x182f8af84 0x18a836804 0x104b2b1cc 0x180c0056c)
libc++abi.dylib: terminating with uncaught exception of type NSException
2018-02-01 09:07:03.036798-0500 androidSDK[1819:852705] didInvalidateWithError Single tag read (null)
Ionic version: 3.19.1
iOS platform version: 4.5.4
Cordova version: 8.0.0
Phonegap-nfc plugin: phonegap-nfc 0.7.1 "NFC"
The problem is the plugin, it just works with UIWebView, but you are using WKWebView, so this line fails
[(UIWebView*)[self webView] stringByEvaluatingJavaScriptFromString: function];
There is a pull request available to fix this problem, so click on the thumbs up button so maybe it's taken into account and merged, or use the fork instead.

Error only on iOS 9 devices

I can't get my app to run now on certain devices.
int retVal = UIApplicationMain(argc, argv, nil, #"AppController"); <---SIGABRT
In the console I get...
-[BAPushCenter (null selector)]: unrecognized selector sent to instance 0x8a22960
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
'-[BAPushCenter (null selector)]: unrecognized selector sent to instance 0x8a22960'
*** First throw call stack:
(0x2502386b 0x369d6dff 0x25029035 0x369f1a4b 0x25028244 0x24f528e5 0x24f56377
0x1cfa1 0x25026b31 0x24f562b8 0x291baa29 0x293cd61d 0x293e0381 0x293ca91f
0x2d18dccd 0x2d18dfb90x24fe6827 0x24fe6417 0x24fe477f 0x24f371e9 0x24f36fdd
0x291a143f 0x2919c18d 0x2a70d3 0x37101873)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
I have no idea what BAPushCenter is, I did a project search and can't find it anywhere. I used an exception breakpoint but it didn't show me any more information then original error.
Update: After testing more devices the error only seems to occur on iOS 9 devices. But iOS 9 simulator devices and any other device below iOS 9 work fine. Any ideas?
In my case, because of the "Batch Framework" my app crashes
Figured it out. The class was coming from one of my static libs so i wasn't able to search it. When I figured out what lib was causing the issues I completely removed it from my app and it compiled fine. Once I get an updated version of that lib I'll put it back in my app, thanks.

Why am I getting an "unrecognized selector sent to class" error for CIFilter?

This code works on an iPad 2 simulator, but not on my physical iPad 2 (which is running on iOS 7.0.6):
var fade = CIFilter(name: "CIExposureAdjust", withInputParameters:["inputEV" : -2.0 ])
The full error message says:
[CIFilter filterWithName:withInputParameters:]: unrecognized selector
sent to class 0x392d8d9c 2015-07-05 23:12:37.106 *** Terminating app
due to uncaught exception 'NSInvalidArgumentException', reason:
'+[CIFilter filterWithName:withInputParameters:]: unrecognized
selector sent to class 0x392d8d9c'
Check the official documentation of + filterWithName:withInputParameters:
+ filterWithName:withInputParameters:
Availability
Available in iOS 8.0 and later.
Since your iPad is running on iOS 7, this method is not available, and therefore your app crashes.
A few possible solutions:
Use - respondsToSelector: to check if the method exists.
Check if the current foundation version number, NSFoundationVersionNumber is higher than NSFoundationVersionNumber_iOS_7_1.
Make iOS 8 a minimum requirement for your app.

NSInvalidUnarchiveOperationException occuring with no autolayout

When testing on device running iOS 5.1 there is an NSInvalidUnarchiveOperationException. I have searched on the issue and made sure that autoLayout is not checked for any of the nib files but the error is still there. Any ideas? Using xCode 4.5. This doesn't happen on a device running iOS 6 though.
Log:
*** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'
*** First throw call stack:
(0x325dc88f 0x34632259 0x325dc789 0x325dc7ab 0x322ea54d 0x322ea6bb 0x322ea423 0x3227b001 0x3227c861 0xce38b 0xa4009 0xa2f3b 0x32045b95 0x3209f8af 0x32048913 0x32048503 0x3203caff 0x2e2a2a7 0x3203c7d5 0x139929 0x1513d3 0x325363fd 0x3201ee07 0x3201edc3 0x3201eda1 0x3201eb11 0x3201e73d 0x32011b87 0x325b0b1b 0x325aed57 0x325af0b1 0x325324a5 0x3253236d 0x31689439 0x32031cd5 0x92e89 0x92e60)
Does the fact that Document Versioning Deployment is set to iOS 6.0 causes this issue?

Facebook sdk 3.1 on iOS 5?

my app has facebook sdk 3.1 integrated. It works well with iOS 6 but crashes on iOS 5. I get the following error in the console.
2012-11-08 12:57:04.529 FMB[3446:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FBSession handleDidBecomeActive]: unrecognized selector sent to instance 0x6977300'
*** First throw call stack: (0x1b54052 0x129bd0a 0x1b55ced 0x1abaf00 0x1abace2 0x695f 0x40922c 0x40aa66 0x419743 0x41a1f8 0x40daa9 0x22adfa9 0x1b281c5 0x1a8d022 0x1a8b90a 0x1a8adb4 0x1a8accb 0x40a2a7 0x40ba9b 0x2ed2 0x2e05) terminate called throwing an exception

Resources