Search code examples
ioscore-nfc

Apple Review – Library not loaded: CoreNFC: Image not found


My app cannot pass the Apple Review for over two weeks now because it crashes on the launch for them with the same reason:

Termination Description: DYLD, Library not loaded: /System/Library/Frameworks/CoreNFC.framework/CoreNFC | Referenced from: /var/containers/Bundle/Application/8DF8F26E-E793-481C-B387-6A64079C8E65/XXX.app/XXX | Reason: image not found

Unfortunately, I cannot see what device do they use, only know that it runs iOS 12.1

If I do otool -v -L on the binary I see

...
/System/Library/Frameworks/Foundation.framework/Foundation (compatibility version 300.0.0, current version 1560.10.0)
/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation (compatibility version 150.0.0, current version 1560.10.0)
/System/Library/Frameworks/CoreNFC.framework/CoreNFC (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/UIKit.framework/UIKit (compatibility version 1.0.0, current version 61000.0.0) 
...

so CoreNFC is linked, as well as the other system frameworks.

I found a couple answers here suggesting to link CoreNFC framework with Optional status to the project. Tried so, didn't help.

None of the "failing" builds crashes when they are installed from TestFlight on any of the test devices.

Does somebody have any idea? Should the framework be imported with absolute or @rpath?


Solution

  • Apparently the issue was (and sometimes still is) that Apple Review team is using iPads to test the apps that require an NFC capable device. I sent a developer support request, Apple dev told me that entitlements for the app are correct and:

    I am discussing this with App Review as I want to rule out the possibility of some transient condition in the review environment.

    Since that time I have submitted another version of the app, it got rejected once again, I pointed out that my app should not be tested iPad, the app got approved.

    So for anyone who's facing the same issue, the solution could be to ask which device is used for testing on their side.