-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from fasihul-axway/NFC/bump-version
Rebase with NativeTagSupport branch and bumped version
- Loading branch information
Showing
39 changed files
with
2,543 additions
and
713 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Modules.Nfc.NativeTagTechnology | ||
summary: Native Tag Technology class will have the common methods. | ||
description: Common methods get called for all the native tags so that we can save the redundancy of the code. | ||
extends: Titanium.Proxy | ||
since: "1.1.0" | ||
platforms: [iphone] | ||
|
||
methods: | ||
- name: connect | ||
summary: calls the connected to tag method for NFC Tag reader session. | ||
|
||
- name: isConnected | ||
summary: if session is connected to any tag or not | ||
returns: | ||
summary: provides if session is connected | ||
type: Boolean | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Modules.Nfc.MifareTagTechnology | ||
summary: Provides access to MIFARE Ultralight properties and I/O operations on a <Modules.Nfc.NfcTag>. | ||
description: | | ||
Use the <Modules.Nfc.createTagTechnologyMifareUltralight> method to create this tag technology. | ||
See also: | ||
[Mifare Ultralight](https://developer.apple.com/documentation/corenfc/nfcmifaretag?language=objc) | ||
extends: Modules.Nfc.NativeTagTechnology | ||
since: "1.1.0" | ||
platforms: [iphone] | ||
|
||
methods: | ||
- name: mifareFamily | ||
summary: The MIFARE product family identifier for the tag. | ||
|
||
- name: identifier | ||
summary: The unique hardware identifier of the tag. | ||
|
||
- name: historicalBytes | ||
summary: The historical bytes extracted from an Answer To Select response. | ||
|
||
- name: sendMiFareCommand | ||
summary: Sends a native MIFARE command to the tag. | ||
parameters: | ||
- name: data | ||
summary: hex command with length will be sent in form of data | ||
type: Array<Number> | ||
- name: errorCode | ||
type: String | ||
summary: The error code; only present if an error occurred. | ||
- name: errorDomain | ||
type: String | ||
summary: The error domain; only present if an error occurred. | ||
- name: errorDescription | ||
type: String | ||
summary: The error description; only peresent if an error occurred. | ||
|
||
- name: sendMiFareISO7816Command | ||
summary: Sends a native MIFARE command to the tag along with other parameter. | ||
parameters: | ||
- name: data | ||
summary: hex command with length will be sent in form of data | ||
type: Array<Number> | ||
- name: sw1 | ||
summary: The SW1 command-processing status byte. | ||
type: Number | ||
- name: sw2 | ||
summary: The SW2 command-processing status byte. | ||
type: Number | ||
- name: apdu | ||
summary: An ISO 7816-4 command APDU object. | ||
type: Titanium.Buffer | ||
- name: errorCode | ||
type: String | ||
summary: The error code; only present if an error occurred. | ||
- name: errorDomain | ||
type: String | ||
summary: The error domain; only present if an error occurred. | ||
- name: errorDescription | ||
type: String | ||
summary: The error description; only peresent if an error occurred. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: Modules.Nfc.NfcNDEFTag | ||
summary: An interface for interacting with an NDEF tag. | ||
description: | | ||
It provide the interface for NFC Data Exchange Format (NDEF) tag. | ||
extends: Titanium.Proxy | ||
since: "3.0.1" | ||
platforms: [iphone, ipad] | ||
createable: false | ||
|
||
methods: | ||
- name: available | ||
summary: A value that determines whether the NDEF tag is available in the current reader session. | ||
platforms: [iphone] | ||
returns: | ||
type: Number | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
--- | ||
name: Modules.Nfc.NfcNDEFTagTechnology | ||
summary: Provides access to NDEF tag and I/O operations on a <Modules.Nfc.NfcNDEFTag> | ||
description: | | ||
Use the <Modules.Nfc.createTagTechNdef> method to create this NDEF tag technology. | ||
extends: Titanium.Proxy | ||
since: "3.0.1" | ||
platforms: [iphone, ipad] | ||
createable: false | ||
|
||
methods: | ||
- name: connect | ||
summary: Call to connect NfcNDEFTag from session NFCNDEFReaderSession, connection success or failure result in a didConnectTag event. | ||
returns: | ||
type: void | ||
|
||
- name: queryNDEFStatus | ||
summary: Asks the reader session for the NDEF support status of the tag. Success/Failure result in a didQueryNDEFStatus event. | ||
returns: | ||
type: void | ||
|
||
- name: readNDEF | ||
summary: Retrieves an NDEF message from the tag. Success/Failure result in a didReadNDEFMessage event. | ||
returns: | ||
type: void | ||
|
||
- name: writeNDEF | ||
summary: Saves an NDEF message to a writable tag. Success/Failure result in a didWirteNDEFMessage event. | ||
returns: | ||
type: void | ||
|
||
- name: writeLock | ||
summary: Changes the NDEF tag status to read-only, preventing future write operations. Success/Failure result in a didWriteLock event. | ||
returns: | ||
type: void | ||
|
||
events: | ||
- name: didConnectTag | ||
summary: A event called when NFCNDEFReaderSession try to connect with NDEF tag | ||
description: | | ||
A tag stays connected until your app connects to a different tag or restarts polling. Connecting to a tag that is already connected has no effect. | ||
platforms: [iphone, ipad] | ||
properties: | ||
- name: errorCode | ||
type: Number | ||
summary: The error code. | ||
- name: errorDescription | ||
type: String | ||
summary: A string containing the localized description of the error. | ||
- name: errorDomain | ||
type: String | ||
summary: A string containing the error domain. | ||
|
||
- name: didQueryNDEFStatus | ||
summary: Asks the reader session for the NDEF support status of the tag. | ||
description: | | ||
Asks the reader session (NFCNDEFReaderSession) for the NDEF support status of the tag. | ||
platforms: [iphone, ipad] | ||
properties: | ||
- name: errorCode | ||
type: Number | ||
summary: The error code. | ||
- name: errorDescription | ||
type: String | ||
summary: A string containing the localized description of the error. | ||
- name: errorDomain | ||
type: String | ||
summary: A string containing the error domain. | ||
- name: status | ||
type: Number | ||
summary: Constants that indicate status for an NDEF tag. | ||
- name: capacity | ||
type: Number | ||
summary: Indicates the maximum NDEF message size, in bytes, that you can store on the tag. | ||
|
||
- name: didReadNDEFMessage | ||
summary: Retrieves an NDEF message from the tag. | ||
description: | | ||
Retrieves an NDEF message from the tag. | ||
platforms: [iphone, ipad] | ||
properties: | ||
- name: errorCode | ||
type: Number | ||
summary: The error code. | ||
- name: errorDescription | ||
type: String | ||
summary: A string containing the localized description of the error. | ||
- name: errorDomain | ||
type: String | ||
summary: A string containing the error domain. | ||
- name: message | ||
type: Modules.Nfc.NdefMessage | ||
summary: An NFC NDEF message consisting of an array of payload records. | ||
|
||
- name: didWirteNDEFMessage | ||
summary: Saves an NDEF message to a writable tag. | ||
description: | | ||
To determine whether the tag is writable, call queryNDEFStatus and check that the status is NFC_NDEF_READ_WRITE. | ||
platforms: [iphone, ipad] | ||
properties: | ||
- name: errorCode | ||
type: Number | ||
summary: The error code. | ||
- name: errorDescription | ||
type: String | ||
summary: A string containing the localized description of the error. | ||
- name: errorDomain | ||
type: String | ||
summary: A string containing the error domain. | ||
|
||
- name: didWriteLock | ||
summary: Changes the NDEF tag status to read-only, preventing future write operations. | ||
description: | | ||
Calling this method updates the write access condition byte in the NDEF File Control of the tag's file system, thus locking the tag. This is a permanent action that you cannot undo. After locking the tag, you can no longer write data to it. | ||
platforms: [iphone, ipad] | ||
properties: | ||
- name: errorCode | ||
type: Number | ||
summary: The error code. | ||
- name: errorDescription | ||
type: String | ||
summary: A string containing the localized description of the error. | ||
- name: errorDomain | ||
type: String | ||
summary: A string containing the error domain. | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* Axway Titanium | ||
* Copyright (c) 2009-present by Axway Appcelerator. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
|
||
#import "TiNfcNativeTagTechnologyProxy.h" | ||
#import <CoreNFC/CoreNFC.h> | ||
#import <TitaniumKit/TitaniumKit.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface TiNfcFTagTechnology : TiNfcNativeTagTechnologyProxy | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* Axway Titanium | ||
* Copyright (c) 2009-present by Axway Appcelerator. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
|
||
#import "TiNfcFTagTechnology.h" | ||
|
||
@implementation TiNfcFTagTechnology | ||
|
||
@end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Axway Titanium | ||
* Copyright (c) 2009-present by Axway Appcelerator. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
|
||
#import "TiNfcNativeTagTechnologyProxy.h" | ||
#import <CoreNFC/CoreNFC.h> | ||
#import <TitaniumKit/TitaniumKit.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface TiNfcISODepTagTechnology : TiNfcNativeTagTechnologyProxy | ||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* Axway Titanium | ||
* Copyright (c) 2009-present by Axway Appcelerator. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
|
||
#import "TiNfcISODepTagTechnology.h" | ||
|
||
@implementation TiNfcISODepTagTechnology | ||
|
||
@end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* Axway Titanium | ||
* Copyright (c) 2009-present by Axway Appcelerator. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
|
||
#import "TiNfcNativeTagTechnologyProxy.h" | ||
#import <CoreNFC/CoreNFC.h> | ||
#import <TitaniumKit/TitaniumKit.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface TiNfcMiFareUltralightTagTechnology : TiNfcNativeTagTechnologyProxy | ||
|
||
- (NSNumber *)mifareFamily; | ||
|
||
- (TiBuffer *)identifier; | ||
|
||
- (TiBuffer *)historicalBytes; | ||
|
||
- (void)sendMiFareCommand:(id)args; | ||
|
||
- (void)sendMiFareISO7816Command:(id)args; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
Oops, something went wrong.