Xcode 10,带有CoreNFC的Swift 4应用在iOS 12上发生崩溃 [英] Xcode 10, Swift 4 app with CoreNFC crashes in review on iOS 12
问题描述
为iOS创建并提交给Appstoreconnect的我的应用因在审核过程中启动时崩溃而被拒绝.
我的应用程序使用 CoreNFC框架.因此,此应用程序与具有iOS 11或更高版本的iPhone 7、8,X ..设备兼容.我在物理设备上对App进行了测试,可以正常工作.在模拟器上也可以正常启动(NFC功能不起作用,但应用程序没有崩溃).
崩溃日志包含的信息使我可以看到CoreNFC框架在启动时未加载:
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/223F146A-DF69-43CC-89A1-CFDF323ACB45/SharpEnd NFC Scanner.app/SharpEnd NFC Scanner | Reason: image not found
我试图将CoreNFC框架嵌入应用程序的常规"选项卡-嵌入式二进制文件"中,但是它给我带来构建错误,因此我不确定是否有可能.
所以我的问题是:
- 是否可以在Xcode的Embedded Binaries部分中嵌入CoreNFC框架?
- 是否可以在加载设备之前检查设备是否支持此框架?
任何帮助或解决方法将不胜感激.
转到 项目设置->常规->链接的框架和库
添加状态为可选的CoreNFC.framework
My app created for iOS submitted to Appstoreconnect gets rejected as it crashes on launch in their review process.
My app uses CoreNFC framework. So this app is compatible with devices iPhone 7, 8, X.. with iOS 11 or higher. App was tested by me on physical device, working fine. Also launching on simulators was fine (NFC functions not working, but app didn't crash).
Crashlog contains info where I can see that CoreNFC framework was not loaded on their launch:
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/223F146A-DF69-43CC-89A1-CFDF323ACB45/SharpEnd NFC Scanner.app/SharpEnd NFC Scanner | Reason: image not found
I tried to embed CoreNFC framework in app General tab -- Embedded Binaries, but it gives me build errors so I'm not sure it is possible.
So my questions are:
- Is it possible to embed CoreNFC framework in Embedded Binaries section in Xcode?
- Is it possible to check whether device supports this framework before loading it?
Any help or workaround would be much appreciated..
Go to Project settings -> General -> Linked Frameworks and Libraries
Add CoreNFC.framework with status optional
这篇关于Xcode 10,带有CoreNFC的Swift 4应用在iOS 12上发生崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!