Skip to content

Releases: treastrain/TRETJapanNFCReader

3.0.0-alpha.11

01 Dec 13:25
70b9419
Compare
Choose a tag to compare
3.0.0-alpha.11 Pre-release
Pre-release

Milestone

What's Changed

Full Changelog: 3.0.0-alpha.10...3.0.0-alpha.11

3.0.0-alpha.10

20 Oct 17:00
96cb10b
Compare
Choose a tag to compare
3.0.0-alpha.10 Pre-release
Pre-release

Milestone

What's Changed

Full Changelog: 3.0.0-alpha.9...3.0.0-alpha.10

TRETNFCKit 3.0.0-alpha.9

03 Feb 18:02
996ad15
Compare
Choose a tag to compare
Pre-release

Milestone

Topic

The new reader session wrappers include a new instance property that provides the reader session's events via AsyncSequence, inspired by the CardSession.eventStream, the new API provided for card emulation in Core NFC on iOS 17.4+.

Example

import SwiftUI
import TRETNFCKit_Async

struct FeliCaReaderView: View {
    @State private var readerSession: AsyncNFCTagReaderSession?
    
    var body: some View {
        List {
            Button {
                readerSession = AsyncNFCTagReaderSession(pollingOption: .iso18092)
            } label: {
                Text("Read")
            }
            .disabled(readerSession != nil)
        }
        .task(id: readerSession == nil) {
            defer { readerSession = nil }
            guard let readerSession else { return }
            guard AsyncNFCTagReaderSession.readingAvailable else { return }
            
            for await event in readerSession.eventStream {
                switch event {
                case .sessionIsReady:
                    readerSession.alertMessage = "Place the tag on a flat, non-metal surface and rest your iPhone on the tag."
                    readerSession.start()
                case .sessionStarted:
                    break
                case .sessionBecomeActive:
                    break
                case .sessionDetected(let tags):
                    do {
                        let tag = tags.first!
                        guard case .feliCa(let feliCaTag) = tag else { throw NFCReaderError(.readerErrorInvalidParameter) }
                        try await readerSession.connect(to: tag)
                        let (idm, systemCode) = try await feliCaTag.polling(systemCode: Data([0xFE, 0x00]), requestCode: .systemCode, timeSlot: .max1)
                        readerSession.alertMessage = "\(systemCode as NSData)\n\(idm as NSData)"
                        readerSession.stop()
                    } catch {
                        readerSession.stop(errorMessage: error.localizedDescription)
                    }
                case .sessionCreationFailed(let reason):
                    print(reason)
                case .sessionInvalidated(let reason):
                    print(reason)
                }
            }
        }
        .navigationTitle("FeliCa Reader")
    }
}

What's Changed

Full Changelog: 3.0.0-alpha.8...3.0.0-alpha.9

TRETNFCKit 3.0.0-alpha.8

28 Jan 09:07
6cb20c8
Compare
Choose a tag to compare
Pre-release

Milestone

What's Changed

Full Changelog: 3.0.0-alpha.7...3.0.0-alpha.8

TRETNFCKit 3.0.0-alpha.7

28 Jan 07:18
c715835
Compare
Choose a tag to compare
Pre-release

Projects

What's Changed

  • NFCReaderSessionAfterBeginProtocol.restartPolling() を unavailable にする by @treastrain in #123
  • CI に Example App のビルド、Ubuntu でのビルド・テスト実行を追加 by @treastrain in #124
  • 存在型に any を付ける by @treastrain in #125
  • Update CI to macOS Ventura & Xcode 14.3 by @treastrain in #127
  • Actor-wrapped NFCNDEFReaderSession, NFCTagReaderSession, and NFCVASReaderSession by @treastrain in #126
  • Use Swift tools version 5.8 by @treastrain in #128

Full Changelog: 3.0.0-alpha.6...3.0.0-alpha.7

TRETNFCKit 3.0.0-alpha.6

11 Feb 06:39
a8160c2
Compare
Choose a tag to compare
Pre-release

Projects

What's Changed

  • NFCReaderSessionDelegate のメソッドの TaskPriority を指定できるようにする by @treastrain in #113
  • NFCReaderSessionable.AfterBeginProtocolany NFCReaderSessionAfterBeginProtocol を削除する by @treastrain in #114
  • NDEFMessage.ReaderSessionProtocolany NFCNDEFMessageReaderSessionProtocol を削除する by @treastrain in #115
  • NDEFTag.ReaderSessionProtocolany NFCNDEFTagReaderSessionProtocol を削除する by @treastrain in #116
  • NativeTag.ReaderSessionProtocolany NFCNativeTagReaderSessionProtocol を削除する by @treastrain in #117
  • FeliCaTagReader.ReaderSessionProtocolany FeliCaTagReaderSessionProtocol を削除する by @treastrain in #118
  • ISO7816TagReader.ReaderSessionProtocolany ISO7816TagReaderSessionProtocol を削除する by @treastrain in #119
  • ISO15693TagReader.ReaderSessionProtocolany ISO15693TagReaderSessionProtocol を削除する by @treastrain in #120
  • MiFareTagReader.ReaderSessionProtocolany MiFareTagReaderSessionProtocol を削除する by @treastrain in #121
  • _NFCTagTypeOpaqueTypeBuilderProtocol に準拠するオブジェクトの見直し by @treastrain in #122

Full Changelog: 3.0.0-alpha.5...3.0.0-alpha.6

TRETNFCKit 3.0.0-alpha.5

28 Jan 19:11
b5c1333
Compare
Choose a tag to compare
Pre-release

Projects

What's Changed

  • NFCReader<NDEFMessage> 向けの SwiftUI.ViewModifier を追加 by @treastrain in #104
  • NFCReader<NDEFTag> 向けの SwiftUI.ViewModifier を追加 by @treastrain in #105
  • NFCReader<NativeTag> 向けの SwiftUI.ViewModifier を追加 by @treastrain in #106
  • FeliCaTagReader 向けの SwiftUI.ViewModifier を追加 by @treastrain in #107
  • ISO7816TagReader 向けの SwiftUI.ViewModifier を追加 by @treastrain in #108
  • ISO15693TagReader 向けの SwiftUI.ViewModifier を追加 by @treastrain in #109
  • MiFareTagReader 向けの SwiftUI.ViewModifier を追加 by @treastrain in #110
  • Update samples and README by @treastrain in #112

Full Changelog: 3.0.0-alpha.4...3.0.0-alpha.5

TRETNFCKit 3.0.0-alpha.4

14 Jan 18:28
95824bb
Compare
Choose a tag to compare
Pre-release

Projects

What's Changed

Full Changelog: 3.0.0-alpha.3...3.0.0-alpha.4

TRETNFCKit 3.0.0-alpha.3

25 Nov 20:26
ec89922
Compare
Choose a tag to compare
Pre-release

Projects

What's Changed

Full Changelog: 3.0.0-alpha.2...3.0.0-alpha.3

TRETNFCKit 3.0.0-alpha.2

20 Nov 19:04
82ca04f
Compare
Choose a tag to compare
Pre-release

Projects

What's Changed

Full Changelog: 3.0.0-alpha.1...3.0.0-alpha.2