NFC iOS 13读/写问题 [英] NFC iOS 13 read/write trouble

查看:118
本文介绍了NFC iOS 13读/写问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我阅读了有关CoreNFC的所有文档,看过有关WWDC 2019读写标签的所有视频,但我没有发现有关我的问题的任何信息.我需要写一些带有办公室开门/窗户数据的标签.我用读取的NFC标签迅速创建了一个简单的项目,但是当我将手机固定在USB阅读器上时,日志中就会遇到下一个麻烦:

I read all documentation about CoreNFC, saw all videos about read and write tags from WWDC 2019 but i didn't find no one information about my problem. I need to write tag with some data for open door/window at office. I create simple project on swift with read NFC tags but when i hold my phone to USB reader i have the next trouble in my log:

2019-06-28 13:45:10.994351+0300 officeProj[872:62700] [xpc.exceptions] <NSXPCConnection: 0x283cec120> connection to service on pid 90 named com.apple.nfcd.service.corenfc: Exception caught during decoding of received selector didDetectExternalReaderWithNotification:, dropping incoming message.
Exception: Exception while decoding argument 0 (#2 of invocation):
Exception: decodeObjectForKey: class "NFFieldNotification" not loaded or does not exist
(
    0   CoreFoundation                      0x00000001a324aa04 2D4D4E9A-884C-31FE-90BE-B324E7B02A3F + 1223172
    1   libobjc.A.dylib                     0x00000001a37574fc objc_exception_throw + 56
    2   Foundation                          0x00000001a2f806dc 6511D0A1-2D67-36FA-BA0E-8FB08A6380FE + 2324188
    3   Foundation                          0x00000001a2d5d6f4 6511D0A1-2D67-36FA-BA0E-8FB08A6380FE + 83700
    4   Foundation                          0x00000001a2fa2410 6511D0A1-2D67-36FA-BA0E-8FB08A6380FE + 2462736
    5   Foundation                          0x00000001a2db22b8 6511D0A1-2D67-36FA-BA0E-8FB08A6380FE + 430776
    6   Foundation                          0x00000001a2db2624 6511D0A1-2D67-36FA-BA0E-8FB08A6380FE + 431652
    7   Foundation                          0x00000001a2d9cc20 6511D0A1-2D67-36FA-BA0E-8FB08A6380FE + 343072
    8   Foundation                          0x00000001a2f7e580 6511D0A1-2D67-36FA-BA0E-8FB08A6380FE + 2315648
    9   libxpc.dylib                        0x00000001a378e63c AC3BE951-8497-3F21-8844-8319F2577646 + 50748
    10  libxpc.dylib                        0x00000001a378e9b4 AC3BE951-8497-3F21-8844-8319F2577646 + 51636
    11  libdispatch.dylib                   0x00000001011d6d10 _dispatch_client_callout4 + 16
    12  libdispatch.dylib                   0x00000001011f0b1c _dispatch_mach_msg_invoke + 420
    13  libdispatch.dylib                   0x00000001011dda10 _dispatch_lane_serial_drain + 304
    14  libdispatch.dylib                   0x00000001011f196c _dispatch_mach_invoke + 520
    15  libdispatch.dylib                   0x00000001011dda10 _dispatch_lane_serial_drain + 304
    16  libdispatch.dylib                   0x00000001011de7a0 _dispatch_lane_invoke + 508
    17  libdispatch.dylib                   0x00000001011e9b74 _dispatch_workloop_worker_thread + 1364
    18  libsystem_pthread.dylib             0x00000001a3a97f5c _pthread_wqthread + 304
    19  libsystem_pthread.dylib             0x00000001a3a9aaa0 start_wqthread + 8
)
(
    0   CoreFoundation                      0x00000001a324aa04 2D4D4E9A-884C-31FE-90BE-B324E7B02A3F + 1223172
    1   libobjc.A.dylib                     0x00000001a37574fc objc_exception_throw + 56
    2   Foundation                          0x00000001a2fa2658 6511D0A1-2D67-36FA-BA0E-8FB08A6380FE + 2463320
    3   Foundation                          0x00000001a2db22b8 6511D0A1-2D67-36FA-BA0E-8FB08A6380FE + 430776
    4   Foundation                          0x00000001a2db2624 6511D0A1-2D67-36FA-BA0E-8FB08A6380FE + 431652
    5   Foundation                          0x00000001a2d9cc20 6511D0A1-2D67-36FA-BA0E-8FB08A6380FE + 343072
    6   Foundation                          0x00000001a2f7e580 6511D0A1-2D67-36FA-BA0E-8FB08A6380FE + 2315648
    7   libxpc.dylib                        0x00000001a378e63c AC3BE951-8497-3F21-8844-8319F2577646 + 50748
    8   libxpc.dylib                        0x00000001a378e9b4 AC3BE951-8497-3F21-8844-8319F2577646 + 51636
    9   libdispatch.dylib                   0x00000001011d6d10 _dispatch_client_callout4 + 16
    10  libdispatch.dylib                   0x00000001011f0b1c _dispatch_mach_msg_invoke + 420
    11  libdispatch.dylib                   0x00000001011dda10 _dispatch_lane_serial_drain + 304
    12  libdispatch.dylib                   0x00000001011f196c _dispatch_mach_invoke + 520
    13  libdispatch.dylib                   0x00000001011dda10 _dispatch_lane_serial_drain + 304
    14  libdispatch.dylib                   0x00000001011de7a0 _dispatch_lane_invoke + 508
    15  libdispatch.dylib                   0x00000001011e9b74 _dispatch_workloop_worker_thread + 1364
    16  libsystem_pthread.dylib             0x00000001a3a97f5c _pthread_wqthread + 304
    17  libsystem_pthread.dylib             0x00000001a3a9aaa0 start_wqthread + 8
)

我试图找到一些有关decodeObjectForKey的信息:类"NFFieldNotification",但在Google页面上确实没有任何信息.也许有人可以帮我吗?还是iOS 13 beta 2或xCode 11 beta 2只是原始产品?假设这个问题对将来有帮助...

I tried to find something about decodeObjectForKey: class "NFFieldNotification" but realy no one info on google pages. Maybe someone can help me? Or maybe iOS 13 beta 2 or xCode 11 beta 2 just so raw product? Suppose this question will be helpful on future...

推荐答案

我遇到了同样的问题,并通过添加解决了该问题

I had the same problem and solved it by adding

CoreNFC.framework

xyz.xcodeproj->构建阶段->将二进制文件与库链接

xyz.xcodeproj -> Build Phases -> Link Binary With Libraries

(xyz.xcodeproj是我的项目根文件)

(xyz.xcodeproj is my Project Root File)

这篇关于NFC iOS 13读/写问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆