Skip to content

Instantly share code, notes, and snippets.

@treastrain
Created October 9, 2022 20:10
Show Gist options
  • Save treastrain/6e9358d3e715720568004d99aabb25fc to your computer and use it in GitHub Desktop.
Save treastrain/6e9358d3e715720568004d99aabb25fc to your computer and use it in GitHub Desktop.
//
// 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