chariotsolutions / phonegap-nfc

PhoneGap NFC Plugin
MIT License
706 stars 556 forks source link

App Crash at Apple Reviewers #355

Closed anderssmedman closed 4 years ago

anderssmedman commented 5 years ago

This summer I created the first version of an iOS app that reads NDEF formatted tags flawless. This November I did som UI updates, test build on local iPhone 7 and Phone X with iOS 12.1, works perfect so I sent it to App Store Connect for review.

Apple review rejected, they give me only the crash log that says it crashes on startup, from the log:

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Description: DYLD, Library not loaded: /System/Library/Frameworks/CoreNFC.framework/CoreNFC | Referenced from: /var/containers/Bundle/Application/1C2CF502-D05A-408B-AF51-ED10867F5FB4/twICEme.app/twICEme | Reason: image not found
Triggered by Thread:  0

Is this plugin supposed to work with iOS 12.1 ? Thanks!

halindrome commented 5 years ago

I have this same issue now. Does anyone have a work-around? They removed the library from non-NFC devices in iOS 12.

don commented 5 years ago

It would be helpful to know which calls are crashing the app.

If it is crashing on startup, maybe it is the call checking if NFC is available during plugin initialization. Maybe there's a better way to do that with iOS 12?

It would help if someone could provide instructions on how to cause crash.

anderssmedman commented 5 years ago

I do not know more than what I wrote in previous post. The app builds nicely and works as should in my dev env, it is Apple that says it crashes at startup. But, I dropped all iOS development and gave them away to an other company. No more Apple development because they change the gameplan over and over again.

mobidev111 commented 5 years ago
Jahrenski commented 5 years ago

Do you think it would be possible to automate this weak linking via cordova config.xml anyhow?

mobidev111 commented 5 years ago

As written (https://github.com/chariotsolutions/phonegap-nfc/issues/355#issuecomment-466500200): changing this plugin's plugin.xml#L137 will automate this.

maxfahl commented 5 years ago

I added the framework as optional to "Linked Frameworks and Libraries", but I still get the same error message:

dyld: Library not loaded: /System/Library/Frameworks/CoreNFC.framework/CoreNFC
  Referenced from: /private/var/containers/Bundle/Application/B97054D3-BF8B-4C7A-BFE2-631C1EF6B66C/App.app/Frameworks/CordovaPlugins.framework/CordovaPlugins
  Reason: image not found
(lldb) 

I have tried cleaning the build folder, no dice. Is there something else I'm missing here? I'm running 12.1 on iPhone SE.

AtanasChachev commented 4 years ago

@maxfahl I've managed to fix that by going into the xCode project -> Build Phases -> Link Binary With Libraries -> CoreNFC.framework should be Optional instead of Required. That's for xCode 11.

don commented 4 years ago

400 should fix this. Released in 1.1.1.