Skip to content

Commit

Permalink
Add FeliCa tag request system code commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Karibash committed Jul 13, 2020
1 parent 4dbdcac commit 165468a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Sources/NFCTagReader/NFCFeliCaTag+Rx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,19 @@ extension ObservableType where Element == NFCFeliCaTag {
}
}

public func requestSystemCode() -> Observable<[Data]> {
flatMap { tag in
Single.create { observer in
tag.requestSystemCode { systemCodeList, error in
if error != nil {
observer(.error(error!))
} else {
observer(.success(systemCodeList))
}
}
return Disposables.create()
}
}
}

}

0 comments on commit 165468a

Please sign in to comment.