Skip to content

Commit

Permalink
Merge pull request #31 from Karibash/release/1.2.0
Browse files Browse the repository at this point in the history
Release/1.2.0
  • Loading branch information
Karibash authored Jul 23, 2020
2 parents 597b756 + acfb1c0 commit a33ab0d
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
- [ ] NFCTagReaderSession
- [x] NFCFeliCaTag
- [x] NFCMiFareTag
- [x] NFCISO7816Tag
- [ ] NFCISO15693Tag
- [ ] NFCISO7816Tag
- [ ] NFCNDEFReaderSession
- [ ] NFCVASReaderSession

Expand Down Expand Up @@ -98,6 +98,6 @@ Feel free to check [issues page](https://github.com/Karibash/RxCoreNFC/issues) i

## 📝 License

Copyright © 2019 [@Karibash](https://twitter.com/karibash).
Copyright © 2020 [@Karibash](https://twitter.com/karibash).

This project is [```MIT```](https://github.com/Karibash/RxCoreNFC/blob/master/LICENSE) licensed.
2 changes: 1 addition & 1 deletion RxCoreNFC.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = "RxCoreNFC"
spec.version = "1.1.1"
spec.version = "1.2.0"
spec.summary = "Reactive extension for the CoreNFC."
spec.description = <<-DESC
Reactive extension for the CoreNFC.
Expand Down
16 changes: 14 additions & 2 deletions RxCoreNFC.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
E6A6ADD824C46CFA0069F67B /* RxNFCFeliCaSendFeliCaCommandResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6A6ADD724C46CFA0069F67B /* RxNFCFeliCaSendFeliCaCommandResult.swift */; };
E6A6AE1024C5E1B60069F67B /* RxNFCMiFareSendMiFareCommandResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6A6AE0F24C5E1B60069F67B /* RxNFCMiFareSendMiFareCommandResult.swift */; };
E6A6AE1224C6AB640069F67B /* RxNFCMiFareSendMiFareISO7816CommandResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6A6AE1124C6AB640069F67B /* RxNFCMiFareSendMiFareISO7816CommandResult.swift */; };
E6A6AE1524C7C47C0069F67B /* RxNFCISO7816SendCommandResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6A6AE1424C7C47C0069F67B /* RxNFCISO7816SendCommandResult.swift */; };
E6BF06EC249C9D82007E84D3 /* RxCoreNFC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E6BF06E2249C9D82007E84D3 /* RxCoreNFC.framework */; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -79,6 +80,7 @@
E6A6ADD724C46CFA0069F67B /* RxNFCFeliCaSendFeliCaCommandResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RxNFCFeliCaSendFeliCaCommandResult.swift; sourceTree = "<group>"; };
E6A6AE0F24C5E1B60069F67B /* RxNFCMiFareSendMiFareCommandResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RxNFCMiFareSendMiFareCommandResult.swift; sourceTree = "<group>"; };
E6A6AE1124C6AB640069F67B /* RxNFCMiFareSendMiFareISO7816CommandResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RxNFCMiFareSendMiFareISO7816CommandResult.swift; sourceTree = "<group>"; };
E6A6AE1424C7C47C0069F67B /* RxNFCISO7816SendCommandResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RxNFCISO7816SendCommandResult.swift; sourceTree = "<group>"; };
E6BF06E2249C9D82007E84D3 /* RxCoreNFC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxCoreNFC.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E6BF06EB249C9D82007E84D3 /* RxCoreNFCTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RxCoreNFCTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -206,6 +208,7 @@
E6A6ADD324C302D30069F67B /* NFCISO7816Tag */ = {
isa = PBXGroup;
children = (
E6A6AE1324C7C45C0069F67B /* Entity */,
E6A2A61524A6275500282503 /* NFCISO7816Tag+Rx.swift */,
);
path = NFCISO7816Tag;
Expand Down Expand Up @@ -245,6 +248,14 @@
path = Entity;
sourceTree = "<group>";
};
E6A6AE1324C7C45C0069F67B /* Entity */ = {
isa = PBXGroup;
children = (
E6A6AE1424C7C47C0069F67B /* RxNFCISO7816SendCommandResult.swift */,
);
path = Entity;
sourceTree = "<group>";
};
E6BF06D8249C9D82007E84D3 = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -375,6 +386,7 @@
buildActionMask = 2147483647;
files = (
E6A2A62324AB4E9F00282503 /* RxNFCTagReaderSession+Rx.swift in Sources */,
E6A6AE1524C7C47C0069F67B /* RxNFCISO7816SendCommandResult.swift in Sources */,
E6A2A61824A62CDC00282503 /* NFCISO15693Tag+Rx.swift in Sources */,
E6A2A61424A6271000282503 /* NFCFeliCaTag+Rx.swift in Sources */,
E6A2A61F24A7878000282503 /* NFCTag+Rx.swift in Sources */,
Expand Down Expand Up @@ -561,7 +573,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.1.1;
MARKETING_VERSION = 1.2.0;
PRODUCT_BUNDLE_IDENTIFIER = karibash.RxCoreNFC;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -593,7 +605,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 1.1.1;
MARKETING_VERSION = 1.2.0;
PRODUCT_BUNDLE_IDENTIFIER = karibash.RxCoreNFC;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
Expand Down
16 changes: 16 additions & 0 deletions Sources/NFCISO7816Tag/Entity/RxNFCISO7816SendCommandResult.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// RxNFCISO7816SendCommandResult.swift
// RxCoreNFC
//
// Created by Karibash on 2020/07/22.
// Copyright © 2020 Karibash. All rights reserved.
//

import Foundation

@available(iOS 13.0, *)
public struct RxNFCISO7816SendCommandResult {
public let data: Data
public let sw1: UInt8
public let sw2: UInt8
}
27 changes: 27 additions & 0 deletions Sources/NFCISO7816Tag/NFCISO7816Tag+Rx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,33 @@
import CoreNFC
import RxSwift

// MARK: - Extensions -

@available(iOS 13.0, *)
extension ObservableType where Element == NFCISO7816Tag {

// MARK: - Commands -

/// Sends an application protocol data unit (APDU) to the tag and receives a response APDU.
/// - Parameter apdu: An application protocol data unit to send to the tag.
/// - Returns: An APDU response and command processing status byte.
public func sendCommand(apdu: NFCISO7816APDU) -> Observable<RxNFCISO7816SendCommandResult> {
flatMap { tag in
Single.create { observer in
tag.sendCommand(apdu: apdu) { data, sw1, sw2, error in
if error != nil {
observer(.error(error!))
} else {
observer(.success(RxNFCISO7816SendCommandResult(
data: data,
sw1: sw1,
sw2: sw2
)))
}
}
return Disposables.create()
}
}
}

}
2 changes: 2 additions & 0 deletions Sources/NFCMiFareTag/NFCMiFareTag+Rx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import CoreNFC
import RxSwift

// MARK: - Extensions -

@available(iOS 13.0, *)
extension ObservableType where Element == NFCMiFareTag {

Expand Down

0 comments on commit a33ab0d

Please sign in to comment.