IOS 13,CoreNFC。 NFCError Code = 100“堆栈错误”是什么意思?

时间:2019-07-18 14:58:55

标签: ios swift core-nfc

我想使用coreNFC从eChip(UKR生物识别国际护照)中读取信息

我有带iOS13 beta3和XCode 11.0 beta 3的iPhone。 当我扫描护照时,我已经设法获得委托方法的响应:


    func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag])

但是当我打电话时:

session.connect(to: tag)

我收到错误消息:

[CoreNFC] 00000002 83bfcc80 -[NFCTagReaderSession _connectTag:error:]:553  Error Domain=NFCError Code=100 "Stack Error" UserInfo={NSLocalizedDescription=Stack Error, NSUnderlyingError=0x281bb0240 {Error Domain=nfcd Code=28 "Tag Not Found" UserInfo={NSLocalizedDescription=Tag Not Found}}}

这是我创建会话的方式

    @IBAction func buttonPressed() {

        guard NFCTagReaderSession.readingAvailable else {
            let alertController = UIAlertController(
                title: "Scanning Not Supported",
                message: "This device doesn't support tag scanning.",
                preferredStyle: .alert
            )
            alertController.addAction(UIAlertAction(title: "OK", style: .default, handler: nil))
            self.present(alertController, animated: true, completion: nil)
            return
        }

        sessionTAG = NFCTagReaderSession(pollingOption: [.iso14443, .iso15693, .iso18092], delegate: self, queue: DispatchQueue.main)
        sessionTAG?.alertMessage = "Hold your iPhone near the item to learn more about it."
        sessionTAG?.begin()

    }

这是我的应享权利

    <key>com.apple.developer.nfc.readersession.formats</key>
    <array>
        <string>TAG</string>
        <string>NDEF</string>
    </array>

和我的plist文件

    <key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
    <array>
        <string>A0000002471001</string>
        <string>00000000000000</string>
    </array>

您能帮我找出该错误是什么意思,我做错了什么吗?

0 个答案:

没有答案