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.
Related
I'm getting this error trying to run a bare project from the react-native init command, on an iOS 7.1 device.
This works on the iOS simulator, so I wonder if its an iOS compatibility issue?
The Movies example app works ok on this device.
```
2016-01-08 16:34:33.224 CouchTest[1210:60b] -[__NSConcreteURLComponents queryItems]: unrecognized selector sent to instance 0x14dacc10
2016-01-08 16:34:33.226 CouchTest[1210:60b] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSConcreteURLComponents queryItems]: unrecognized selector sent to instance 0x14dacc10'
* First throw call stack:
(0x2edb0f83 0x39561ccf 0x2edb4917 0x2edb3203 0x2ed02768 0x10abaf 0xb47a1 0xb1735 0xb0c8b 0x39a49833 0x39a4981f 0x39a49777 0x2ed7b8a1 0x2ed7a175 0x2ece4ebf 0x2ece4ca3 0x33bea663 0x3163114d 0x9780d 0x39a6eab7)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
```
NSURLComponents queryItems is only available on iOS8+
That's why you are seeing the crash.
See the docs here for more info: https://developer.apple.com/library/ios/documentation/Foundation/Reference/NSURLComponents_class/index.html#//apple_ref/occ/instp/NSURLComponents/queryItems
Setting an exception breakpoint will show you which class/method is making that call. Otherwise, it sounds like react-native is calling queryItems when it shouldn't.
I've updated to Parse 1.9.1, Facebook SDK v4.x, iOS 9, Swift 2, and Xcode 7. Didn't change any code and added my .plist keys for LSApplicationQueriesSchemes and App Transport Security Settings.
Now, I can't log into Facebook using class func logInInBackgroundWithReadPermissions(permissions: [String]?, block: PFUserResultBlock?) because I get this error:
2015-10-30 15:24:22.433 [2905:830174] -[FBSDKLoginManager logInWithReadPermissions:fromViewController:handler:]: unrecognized selector sent to instance 0x15ee75d60
2015-10-30 15:24:22.437 [2905:830174] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FBSDKLoginManager logInWithReadPermissions:fromViewController:handler:]: unrecognized selector sent to instance 0x15ee75d60'
*** First throw call stack:
(0x182f60f48 0x197b13f80 0x182f67c5c 0x182f64c00 0x182e68cac 0x1003de54c 0x1003dd36c 0x1003dd1f0 0x10024d8dc 0x100253578 0x100253de0 0x1002f8864 0x1002fc8cc 0x1002fc618 0x1002f9504 0x1002fdc68 0x1002ad868 0x10013ade0 0x10013af50 0x1887a2f24 0x1887a2994 0x1887aaedc 0x1887b10c0 0x1887b04c4 0x18879af14 0x18879ab9c 0x18cd7f7c4 0x18cd7fb44 0x182f18544 0x182f17fd8 0x182f15cd8 0x182e44ca0 0x18e080088 0x18855cffc 0x10013c8a0 0x1983628b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
I'm not using IBuilder so I don't have anything that's not connected in my storyboard, it looks like I'm just missing that fromViewController parameter. Facebook briefly mentions it in the changelog, but the method isn't available in the ParseFacebookUtilsV4.framework and nothing like it exists for use with Parse.
What am I missing here? Why am I getting this exception everytime I log in and how can I fix it?
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.
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
I have updated to iOS6, and due to this have been trying to update to PhoneGap version 2.1.0. (As the camera etc. does not seem to work in versions previous to this - I have now got this part working) However when I try to access the filesystem by running the following line of code:
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, success, fail);
The app just crashes out, with no error etc. If I put this line on the main page and start from within the simulator then I receive the following error:
2012-09-25 11:26:38.741 MobileManager[4866:15b03] Multi-tasking -> Device: YES, App: YES
2012-09-25 11:26:59.756 MobileManager[4866:17f03] void SendDelegateMessage(NSInvocation *): delegate (webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:) failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode
2012-09-25 11:26:59.766 MobileManager[4866:15b03] -[NSNull intValue]: unrecognized selector sent to instance 0x275678
2012-09-25 11:26:59.767 MobileManager[4866:15b03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull intValue]: unrecognized selector sent to instance 0x275678'
*** First throw call stack:
(0x144012 0x257de7e 0x1cf4bd 0x133bbc 0x13394e 0xd953 0x60812 0x5ff9e 0x60379 0x25916b0 0x1119035 0xc7f3f 0xc796f 0xea734 0xe9f44 0xe9e1b 0x33ae7e3 0x33ae668 0x37f65c 0x22b6 0x21e5)
libc++abi.dylib: terminate called throwing an exception
What does this error mean, and how can I resolve it?
Thanks in advance.
I had accidentally set the LocalFileSystem variable to something else (LocalFileSystem.PERSISTENT was undefined.