iOS Question B4i App rejected Library not loaded: /System/Library/Frameworks/CoreNFC.framework/CoreNFC

Lisa I

Member
Licensed User
Our app created for iOS was rejected as it crashes on launch in their review process with error
Termination Description: DYLD, Library not loaded: /System/Library/Frameworks/CoreNFC.framework/CoreNFC

The app uses NFC and we followed the NFC example at https://www.b4x.com/android/forum/threads/nfc-reading-ndef-tags.84784/.
So this app is compatible with devices iPhone 7, 8, X.. with iOS 11 or higher. App works when we test it in house on ios 11 and 12 (we only have devices with NFC), we have the iNFC library in the main library folder for our B4i installation and is ticked in the library manager.

Apple tested in on iOS 12.1.3 and It looks like iOS12 does not include CoreNFC for older devices (iPhone 6s, SE and older).
I have seen posts on forums for Xcode developers which say they need to mark the CoreNFC as optional rather than required.
https://stackoverflow.com/questions...-app-with-corenfc-crashes-in-review-on-ios-12
https://stackoverflow.com/questions...orenfc-ios11-and-xcode-9-be/52868674#52868674

Can you help with a solution to this please.

Thank you
Lisa

Crashlog

OS Version: iPhone OS 12.1.3 (16D39)
Baseband Version: 7.32.00
Report Version: 104

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/E66E4873-44B0-45DC-A7F4-B76BBB441AFA/xxxx.app/xxxx | Reason: image not found
 

Lisa I

Member
Licensed User
Thanks Erel

I tried this on an older phone without nfc (using testflight) and it would not allow the app to be installed in the first place.
Just submitted for review again, fingers crossed.

Cheers
Lisa
 

Lisa I

Member
Licensed User
Hi Erel

Sorry to report but the NFC app has been rejected by the App store again with the same error.

Please help
Thank you
Lisa

Date/Time: 2019-02-04 13:45:08.8116 -0800
Launch Time: 2019-02-04 13:45:08.7280 -0800
OS Version: iPhone OS 12.1.1 (16C50)
Baseband Version: 7.32.00
Report Version: 104

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/67AFB8D3-370A-4D53-A805-A2E2C0845D8B/xxxx.app/xxxx | Reason: image not found
Triggered by Thread: 0

Thread 0 Crashed:
0 dyld 0x0000000100c142e8 0x100bd0000 + 279272
1 dyld 0x0000000100c13928 0x100bd0000 + 276776
2 dyld 0x0000000100c13958 0x100bd0000 + 276824
3 dyld 0x0000000100bd48f4 0x100bd0000 + 18676
4 dyld 0x0000000100bd77cc 0x100bd0000 + 30668
5 dyld 0x0000000100bd1044 0x100bd0000 + 4164

Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000006 x1: 0x0000000000000001 x2: 0x000000016f6fa980 x3: 0x00000000000000a7
x4: 0x000000016f6fa580 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000390
x8: 0x0000000000000020 x9: 0x0000000000000009 x10: 0x74614d6c6f6f502f x11: 0x7361655220200a65
x12: 0x20200a6574614d6c x13: 0x203a6e6f73616552 x14: 0x6f6e206567616d69 x15: 0x00646e756f662074
x16: 0x0000000000000209 x17: 0x0000000000000010 x18: 0x0000000000000000 x19: 0x0000000000000000
x20: 0x000000016f6fa580 x21: 0x00000000000000a7 x22: 0x000000016f6fa980 x23: 0x0000000000000001
x24: 0x0000000000000006 x25: 0x0000000000000000 x26: 0x0000000100c37000 x27: 0x0000000100c37aa0
x28: 0x0000000100c379e0 fp: 0x000000016f6fa550 lr: 0x0000000100c13928
sp: 0x000000016f6fa510 pc: 0x0000000100c142e8 cpsr: 0x00000000

Binary Images:
0x100704000 - 0x100797fff PoolMate arm64 <66c15af0e39a3584a810c892744d470d> /var/containers/Bundle/Application/67AFB8D3-370A-4D53-A805-A2E2C0845D8B/xxxx.app/xxxx
0x100bd0000 - 0x100c33fff dyld arm64 <30ff59036c17348cb2f0bb93dbc8f07a> /usr/lib/dyld
 

Erel

Administrator
Staff member
Licensed User
Try this:
Download B4i v5.5 from the same link you used before. The version will be 5.51.

Add this to the main module:
B4X:
#AdditionalLib: CoreNFC.framework, ReferenceOnly
#DeviceCapabilities: nfc
This makes the framework optional. If they still reject it then you should submit an appeal and explain that it is limited to NFC capable devices (it will not be available to other devices).
 
Top