Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
473 views
in Technique[技术] by (71.8m points)

beta - NFC iOS 13 read/write trouble

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
)

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...

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I had the same problem and solved it by adding

CoreNFC.framework

in

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

(xyz.xcodeproj is my Project Root File)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...