Created
October 9, 2022 20:10
-
-
Save treastrain/6e9358d3e715720568004d99aabb25fc to your computer and use it in GitHub Desktop.
Core NFC bug? - https://twitter.com/treastrain/status/1579195797652262912
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CoreNFCProblemApp.swift | |
// CoreNFCProblem | |
// | |
// Created by treastrain on 2022/10/10. | |
// | |
import CoreNFC | |
import SwiftUI | |
@main | |
struct CoreNFCProblemApp: App { | |
var body: some Scene { | |
WindowGroup { | |
Text("Hello, world!") | |
.padding() | |
} | |
} | |
} | |
protocol AwesomeProtocol: NFCReaderSession { | |
associatedtype Delegate: NSObjectProtocol // or `AnyObject` | |
} | |
extension NFCNDEFReaderSession: AwesomeProtocol { | |
typealias Delegate = NFCNDEFReaderSessionDelegate | |
} | |
extension NFCTagReaderSession: AwesomeProtocol { // Type 'NFCTagReaderSession' does not conform to protocol 'AwesomeProtocol' | |
typealias Delegate = NFCTagReaderSessionDelegate // 🤔 Possibly intended match 'NFCTagReaderSession.Delegate' (aka 'NFCTagReaderSessionDelegate') does not conform to 'NSObjectProtocol' | |
} | |
extension NFCVASReaderSession: AwesomeProtocol { | |
typealias Delegate = NFCVASReaderSessionDelegate | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment