App with CoreNFC.framework crashes on iOS 12.5 with Xcode 13.3.1

I'm developing an app using CoreNFC but it crashes when running on iPhone 6 with iOS 12.5 .

Trying to search for an answer I didn't find any solution. When launching the app, this is the error I read in the console:

dyld: Library not loaded: /System/Library/Frameworks/CoreNFC.framework/CoreNFC Referenced from: /var/containers/Bundle/Application/327CB0C3-4B7F-4B72-8F70-EEE985F688CD/myAppName.app/myAppName

Reason: image not found

I've already added CoreNFC.Framework in Targets -> General -> Frameworks, Libraries, and Embedded Content and set it to "Do Not Embed" but it doesn't work.

Is there any solution for this? Or is it a bug of Xcode? Please help. Thanks

Answered by Fabbri_ in 714042022

For everyone who needs the the solution:

In Targets -> Build Phases --> Link Binary With Libraries I set CoreNFC.framework as "Optional" in "Status" column.

It worked for me.

Accepted Answer

For everyone who needs the the solution:

In Targets -> Build Phases --> Link Binary With Libraries I set CoreNFC.framework as "Optional" in "Status" column.

It worked for me.

App with CoreNFC.framework crashes on iOS 12.5 with Xcode 13.3.1
 
 
Q