chariotsolutions / phonegap-nfc

PhoneGap NFC Plugin
MIT License
706 stars 556 forks source link

iphone 7 plus, NdefListener NSInvalidArgumentException #306

Closed zabuTNT closed 6 years ago

zabuTNT commented 6 years ago

Hi, I'm develop an app with Meteor+cordova with NFC reading feature. With iphone 7 plus I run into an exception in ios code. The NFC tag is read but the success of NdefListener throw exception for NSInvalidArgumentException. As you can see in the logs below in payload there are the bytes of the message, so i can't understand:

2018-01-29 12:11:53.169645+0100 MyApp[5066:1813192] enabled 2018-01-29 12:11:53.174392+0100 MyApp[5066:1813192] beginSession 2018-01-29 12:11:53.239462+0100 MyApp[5066:1813281] readerSessionDidBecomeActive 2018-01-29 12:11:53.275934+0100 MyApp[5066:1813192] registerNdef 2018-01-29 12:11:55.051512+0100 MyApp[5066:1813281] NFCNDEFReaderSession didDetectNDEFs 2018-01-29 12:11:55.051934+0100 MyApp[5066:1813281] {“ndefMessage”:[{“tnf”:1,“id”:[],“payload”:[2,105,116,84,84,49,50,51,52],“type”:[84]}]} 2018-01-29 12:11:55.052472+0100 MyApp[5066:1813192] -[WKWebView stringByEvaluatingJavaScriptFromString:]: unrecognized selector sent to instance 0x104012200 2018-01-29 12:11:55.053213+0100 MyApp[5066:1813192] Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[WKWebView stringByEvaluatingJavaScriptFromString:]: unrecognized selector sent to instance 0x104012200’ First throw call stack: (0x18371a364 0x182960528 0x183727828 0x18d09121c 0x18371fd10 0x183604ecc 0x102908070 0x1039212cc 0x10392128c 0x103925ea0 0x1836c2544 0x1836c0120 0x1835dfe58 0x18548cf84 0x18cd3467c 0x10289dc90 0x1830fc56c) libc++abi.dylib: terminating with uncaught exception of type NSException

Someone have any idea?


EDIT: Is it related to pulls #303 #288 ?

zabuTNT commented 6 years ago

I resolved with pull #303

please merge it

Thank you