相关疑难解决方法(0)

Xcode12 CoreNFC 模拟器库未加载

我们的应用程序使用 CoreNFC 来扫描 NFC 标签,如果不支持 NFC,您可以使用 QR。这工作得很好,我们能够在模拟器中运行该应用程序以进行 (ui) 测试。
直到 Xcode12 / iOS14 GM 构建。在 iOS13(或更低版本)中,我们在模拟器上运行它不会有任何问题。

但是在 iOS14 模拟器 iPhone11 上运行它的 Xcode12 中,我们会得到以下结果:

dyld: launch, loading dependent libraries
DYLD_SHARED_CACHE_DIR=/Users/xxx/Library/Developer/CoreSimulator/Caches/dyld/19G73/com.apple.CoreSimulator.SimRuntime.iOS-14-0.18A372
DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot
DYLD_LIBRARY_PATH=/Users/xxx/Library/Developer/Xcode/DerivedData/xxx-awnlestrbvesqqbynrhmluzhbcsc/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSi
dyld: Library not loaded: /usr/lib/libnfshared.dylib
  Referenced from: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CoreNFC.framework/CoreNFC
  Reason: no suitable image found.  Did find:
    /usr/lib/libnfshared.dylib: mach-o, but not built for platform iOS-sim
Run Code Online (Sandbox Code Playgroud)

模拟器崩溃对我来说很有意义,因为模拟器无法扫描 NFC 标签,但这就是我所做的:

ios swift core-nfc ios14 xcode12

45
推荐指数
3
解决办法
6380
查看次数

dyld:未加载库:@ rpath/CoreNFC.framework/CoreNFC,iOS11和Xcode 9 beta

CoreNFC sampleXcode 9.0 beta 2中运行代码时遇到此错误并且应用程序崩溃

dyld: Library not loaded: @rpath/CoreNFC.framework/CoreNFC
  Referenced from: /var/containers/Bundle/Application/2837709C-C852-4811-B696-38F2725554D4/iOS-11-by-Examples.app/iOS-11-by-Examples
  Reason: image not found
Run Code Online (Sandbox Code Playgroud)

有谁知道如何解决这个问题?

iphone swift ios11 xcode9-beta core-nfc

6
推荐指数
2
解决办法
2029
查看次数

核心NFC的设备支持?它在iPad上有效吗?

Core NFC可以在iPad上运行吗?

总而言之,iPad确实有NFC芯片,但Core NFC文档并没有说它支持它.

注意

iPhone 7和iPhone 7 Plus支持读取NFC NDEF标签.

在模拟器上运行此iOS11-NFC示例将始终Feature not supported在所有设备上运行.

nfc ios11 core-nfc

6
推荐指数
1
解决办法
2131
查看次数

标签 统计

core-nfc ×3

ios11 ×2

swift ×2

ios ×1

ios14 ×1

iphone ×1

nfc ×1

xcode12 ×1

xcode9-beta ×1