From 981a35a59aa4c5b80c6e2ae721829fbc85e514b9 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Thu, 17 Dec 2020 14:47:50 +0530 Subject: [PATCH 01/59] feat(ios): added all the required empty methods to inherit them at required place --- Jenkinsfile | 2 +- ios/Classes/TagTechnologyProxy.h | 27 +++++++++++++++++++ ios/Classes/TagTechnologyProxy.m | 39 ++++++++++++++++++++++++++++ ios/manifest | 2 +- ios/ti.nfc.xcodeproj/project.pbxproj | 16 ++++++++++++ 5 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 ios/Classes/TagTechnologyProxy.h create mode 100644 ios/Classes/TagTechnologyProxy.m diff --git a/Jenkinsfile b/Jenkinsfile index b85d90f..f49fed8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ library 'pipeline-library' buildModule { // defaults: //nodeVersion = '4.7.3' // Must have version set up on Jenkins master before it can be changed - sdkVersion = '9.2.0.v20200921095451' + sdkVersion = '9.2.0.GA' androidAPILevel = '25' // if changed, must install on build nodes iosLabels = 'osx && xcode-12' } diff --git a/ios/Classes/TagTechnologyProxy.h b/ios/Classes/TagTechnologyProxy.h new file mode 100644 index 0000000..da4ca4b --- /dev/null +++ b/ios/Classes/TagTechnologyProxy.h @@ -0,0 +1,27 @@ +/** + * 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 "TiProxy.h" +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TagTechnology : TiProxy + +- (void)connect:(id)unused; + +- (void)close:(id)unused; + +- (void)restartPolling:(id)unused; + +- (NSNumber *)isEnabled:(id)unused; + +- (NSNumber *)isConnected:(id)unused; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/TagTechnologyProxy.m b/ios/Classes/TagTechnologyProxy.m new file mode 100644 index 0000000..8757e8e --- /dev/null +++ b/ios/Classes/TagTechnologyProxy.m @@ -0,0 +1,39 @@ +/** + * 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 "TagTechnologyProxy.h" +#import "TiBlob.h" +#import "TiNfcUtilities.h" +#import "TiUtils.h" + +@implementation TagTechnology + +#pragma mark Public API's + +- (void)connect:(id)unused +{ +} + +- (void)close:(id)unused +{ +} + +- (void)restartPolling:(id)unused +{ +} + +- (NSNumber *)isConnected:(id)unused +{ + return [NSNumber numberWithBool:NO]; +} + +- (NSNumber *)isEnabled:(id)unused +{ + return [NSNumber numberWithBool:NO]; +} + +@end diff --git a/ios/manifest b/ios/manifest index 522870e..5aa0db6 100644 --- a/ios/manifest +++ b/ios/manifest @@ -13,6 +13,6 @@ copyright: Copyright (c) 2017-present by Appcelerator # these should not be edited name: ti.nfc moduleid: ti.nfc -guid: e6caa17f-c084-402c-be84-8df242d94eba +guid: 50513178-f1da-40e1-8031-75c08db86d6f platform: iphone minsdk: 9.2.0 diff --git a/ios/ti.nfc.xcodeproj/project.pbxproj b/ios/ti.nfc.xcodeproj/project.pbxproj index c33cc95..8f13f77 100644 --- a/ios/ti.nfc.xcodeproj/project.pbxproj +++ b/ios/ti.nfc.xcodeproj/project.pbxproj @@ -37,6 +37,8 @@ DBF688341EEB4B3500009357 /* TiNfcNdefMessageProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = DBF688321EEB4B3500009357 /* TiNfcNdefMessageProxy.m */; }; DBF688371EEB4CB300009357 /* TiNfcNdefRecordProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = DBF688351EEB4CB300009357 /* TiNfcNdefRecordProxy.h */; }; DBF688381EEB4CB300009357 /* TiNfcNdefRecordProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = DBF688361EEB4CB300009357 /* TiNfcNdefRecordProxy.m */; }; + E22E2A2725808C33004C52F1 /* TagTechnologyProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E22E2A2525808C33004C52F1 /* TagTechnologyProxy.h */; }; + E22E2A2825808C33004C52F1 /* TagTechnologyProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E22E2A2625808C33004C52F1 /* TagTechnologyProxy.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -67,6 +69,8 @@ DBF688321EEB4B3500009357 /* TiNfcNdefMessageProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcNdefMessageProxy.m; path = Classes/TiNfcNdefMessageProxy.m; sourceTree = ""; }; DBF688351EEB4CB300009357 /* TiNfcNdefRecordProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcNdefRecordProxy.h; path = Classes/TiNfcNdefRecordProxy.h; sourceTree = ""; }; DBF688361EEB4CB300009357 /* TiNfcNdefRecordProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcNdefRecordProxy.m; path = Classes/TiNfcNdefRecordProxy.m; sourceTree = ""; }; + E22E2A2525808C33004C52F1 /* TagTechnologyProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TagTechnologyProxy.h; path = Classes/TagTechnologyProxy.h; sourceTree = ""; }; + E22E2A2625808C33004C52F1 /* TagTechnologyProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TagTechnologyProxy.m; path = Classes/TagTechnologyProxy.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -113,6 +117,7 @@ 08FB77AEFE84172EC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( + E22E2A2425808BD2004C52F1 /* NFC Proxy class */, DB6F99951EEB4AC2004F18FE /* NFC Record */, DB6F99941EEB4ABC004F18FE /* NFC Message */, DB6F99931EEB4AB2004F18FE /* NFC Adapter */, @@ -162,6 +167,15 @@ name = "NFC Record"; sourceTree = ""; }; + E22E2A2425808BD2004C52F1 /* NFC Proxy class */ = { + isa = PBXGroup; + children = ( + E22E2A2525808C33004C52F1 /* TagTechnologyProxy.h */, + E22E2A2625808C33004C52F1 /* TagTechnologyProxy.m */, + ); + name = "NFC Proxy class"; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -173,6 +187,7 @@ DB4613971F8CEF2A003956CF /* TiNfcUtilities.h in Headers */, DBF688331EEB4B3500009357 /* TiNfcNdefMessageProxy.h in Headers */, 24DD6CF91134B3F500162E58 /* TiNfcModule.h in Headers */, + E22E2A2725808C33004C52F1 /* TagTechnologyProxy.h in Headers */, DB856C461EE98C3B00DE4334 /* TiNfcNfcAdapterProxy.h in Headers */, DBF688371EEB4CB300009357 /* TiNfcNdefRecordProxy.h in Headers */, 24DE9E1111C5FE74003F90F6 /* TiNfcModuleAssets.h in Headers */, @@ -253,6 +268,7 @@ DBF688381EEB4CB300009357 /* TiNfcNdefRecordProxy.m in Sources */, DB856C471EE98C3B00DE4334 /* TiNfcNfcAdapterProxy.m in Sources */, DBF688341EEB4B3500009357 /* TiNfcNdefMessageProxy.m in Sources */, + E22E2A2825808C33004C52F1 /* TagTechnologyProxy.m in Sources */, 24DE9E1211C5FE74003F90F6 /* TiNfcModuleAssets.m in Sources */, DB4613981F8CEF2A003956CF /* TiNfcUtilities.m in Sources */, ); From ca653fb54d303f8f333d56a8da1c32c706992f4c Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Wed, 23 Dec 2020 14:48:44 +0530 Subject: [PATCH 02/59] update(ios): removed unused methods --- ios/Classes/TagTechnologyProxy.h | 10 ++-------- ios/Classes/TagTechnologyProxy.m | 17 ++--------------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/ios/Classes/TagTechnologyProxy.h b/ios/Classes/TagTechnologyProxy.h index da4ca4b..88b24e1 100644 --- a/ios/Classes/TagTechnologyProxy.h +++ b/ios/Classes/TagTechnologyProxy.h @@ -12,15 +12,9 @@ NS_ASSUME_NONNULL_BEGIN @interface TagTechnology : TiProxy -- (void)connect:(id)unused; +- (void)connect:(id)args; -- (void)close:(id)unused; - -- (void)restartPolling:(id)unused; - -- (NSNumber *)isEnabled:(id)unused; - -- (NSNumber *)isConnected:(id)unused; +- (NSNumber *)isConnected:(id)args; @end diff --git a/ios/Classes/TagTechnologyProxy.m b/ios/Classes/TagTechnologyProxy.m index 8757e8e..f10047f 100644 --- a/ios/Classes/TagTechnologyProxy.m +++ b/ios/Classes/TagTechnologyProxy.m @@ -14,24 +14,11 @@ @implementation TagTechnology #pragma mark Public API's -- (void)connect:(id)unused +- (void)connect:(id)args { } -- (void)close:(id)unused -{ -} - -- (void)restartPolling:(id)unused -{ -} - -- (NSNumber *)isConnected:(id)unused -{ - return [NSNumber numberWithBool:NO]; -} - -- (NSNumber *)isEnabled:(id)unused +- (NSNumber *)isConnected:(id)args { return [NSNumber numberWithBool:NO]; } From 9672a8c99c0db7187e95eadf97e42f54a60c546f Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Thu, 17 Dec 2020 11:21:15 +0530 Subject: [PATCH 03/59] feat(ios): added all the required empty methods to inherit them at required place --- ios/Classes/TagTechnologyProxy.h | 7 +++++++ ios/Classes/TagTechnologyProxy.m | 14 ++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/ios/Classes/TagTechnologyProxy.h b/ios/Classes/TagTechnologyProxy.h index 88b24e1..a8923e4 100644 --- a/ios/Classes/TagTechnologyProxy.h +++ b/ios/Classes/TagTechnologyProxy.h @@ -16,6 +16,13 @@ NS_ASSUME_NONNULL_BEGIN - (NSNumber *)isConnected:(id)args; +- (void)close:(id)unused; + +- (void)restartPolling:(id)unused; + +- (NSNumber *)isEnabled:(id)unused; + + @end NS_ASSUME_NONNULL_END diff --git a/ios/Classes/TagTechnologyProxy.m b/ios/Classes/TagTechnologyProxy.m index f10047f..44c4eed 100644 --- a/ios/Classes/TagTechnologyProxy.m +++ b/ios/Classes/TagTechnologyProxy.m @@ -23,4 +23,18 @@ - (NSNumber *)isConnected:(id)args return [NSNumber numberWithBool:NO]; } +- (void)close:(id)unused +{ +} + +- (void)restartPolling:(id)unused +{ +} + + +- (NSNumber *)isEnabled:(id)unused +{ + return; +} + @end From 41952e7627f4a001c9a9b0fbc3aca0217f291978 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Wed, 23 Dec 2020 11:35:45 +0530 Subject: [PATCH 04/59] feat(ios): added method and properties for native tag technology class --- apidoc/NativeTagTechnology.yml | 18 ++++++++++ ios/Classes/NativeTagTechnologyProxy.h | 19 +++++++++++ ios/Classes/NativeTagTechnologyProxy.m | 47 ++++++++++++++++++++++++++ ios/ti.nfc.xcodeproj/project.pbxproj | 8 +++++ 4 files changed, 92 insertions(+) create mode 100644 apidoc/NativeTagTechnology.yml create mode 100644 ios/Classes/NativeTagTechnologyProxy.h create mode 100644 ios/Classes/NativeTagTechnologyProxy.m diff --git a/apidoc/NativeTagTechnology.yml b/apidoc/NativeTagTechnology.yml new file mode 100644 index 0000000..46b7037 --- /dev/null +++ b/apidoc/NativeTagTechnology.yml @@ -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 + + diff --git a/ios/Classes/NativeTagTechnologyProxy.h b/ios/Classes/NativeTagTechnologyProxy.h new file mode 100644 index 0000000..de4913e --- /dev/null +++ b/ios/Classes/NativeTagTechnologyProxy.h @@ -0,0 +1,19 @@ +/** + * 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 "TagTechnologyProxy.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface NativeTagTechnology : TagTechnology { + NFCTagReaderSession *session; + id tag; +} + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/NativeTagTechnologyProxy.m b/ios/Classes/NativeTagTechnologyProxy.m new file mode 100644 index 0000000..875f797 --- /dev/null +++ b/ios/Classes/NativeTagTechnologyProxy.m @@ -0,0 +1,47 @@ +/** + * 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 "NativeTagTechnologyProxy.h" +#import "TiBlob.h" +#import "TiNfcUtilities.h" +#import "TiUtils.h" + +@implementation NativeTagTechnology + +#pragma mark Public API's + +- (void)connect:(id)unused +{ + [session connectToTag:tag + completionHandler:^(NSError *_Nullable error) { + if (error != nil) { + [self fireEvent:@"didDetectTags" + withObject:@{ + @"errorCode" : NUMINTEGER([error code]), + @"errorDescription" : [error localizedDescription], + }]; + } else { + [self fireEvent:@"didDetectTags" + withObject:@{ + @"tag" : tag, + @"errorCode" : NUMINTEGER([error code]), + @"errorDescription" : [error localizedDescription], + }]; + } + }]; +} + +- (NSNumber *)isConnected:(id)unused +{ + if (session.connectedTag != nil) { + return [NSNumber numberWithBool:YES]; + } else { + return [NSNumber numberWithBool:NO]; + ; + } +} +@end diff --git a/ios/ti.nfc.xcodeproj/project.pbxproj b/ios/ti.nfc.xcodeproj/project.pbxproj index 8f13f77..76de697 100644 --- a/ios/ti.nfc.xcodeproj/project.pbxproj +++ b/ios/ti.nfc.xcodeproj/project.pbxproj @@ -39,6 +39,8 @@ DBF688381EEB4CB300009357 /* TiNfcNdefRecordProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = DBF688361EEB4CB300009357 /* TiNfcNdefRecordProxy.m */; }; E22E2A2725808C33004C52F1 /* TagTechnologyProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E22E2A2525808C33004C52F1 /* TagTechnologyProxy.h */; }; E22E2A2825808C33004C52F1 /* TagTechnologyProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E22E2A2625808C33004C52F1 /* TagTechnologyProxy.m */; }; + E22E2A372580B206004C52F1 /* NativeTagTechnologyProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E22E2A352580B206004C52F1 /* NativeTagTechnologyProxy.h */; }; + E22E2A382580B206004C52F1 /* NativeTagTechnologyProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E22E2A362580B206004C52F1 /* NativeTagTechnologyProxy.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -71,6 +73,8 @@ DBF688361EEB4CB300009357 /* TiNfcNdefRecordProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcNdefRecordProxy.m; path = Classes/TiNfcNdefRecordProxy.m; sourceTree = ""; }; E22E2A2525808C33004C52F1 /* TagTechnologyProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TagTechnologyProxy.h; path = Classes/TagTechnologyProxy.h; sourceTree = ""; }; E22E2A2625808C33004C52F1 /* TagTechnologyProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TagTechnologyProxy.m; path = Classes/TagTechnologyProxy.m; sourceTree = ""; }; + E22E2A352580B206004C52F1 /* NativeTagTechnologyProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NativeTagTechnologyProxy.h; path = Classes/NativeTagTechnologyProxy.h; sourceTree = ""; }; + E22E2A362580B206004C52F1 /* NativeTagTechnologyProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = NativeTagTechnologyProxy.m; path = Classes/NativeTagTechnologyProxy.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -172,6 +176,8 @@ children = ( E22E2A2525808C33004C52F1 /* TagTechnologyProxy.h */, E22E2A2625808C33004C52F1 /* TagTechnologyProxy.m */, + E22E2A352580B206004C52F1 /* NativeTagTechnologyProxy.h */, + E22E2A362580B206004C52F1 /* NativeTagTechnologyProxy.m */, ); name = "NFC Proxy class"; sourceTree = ""; @@ -186,6 +192,7 @@ AA747D9F0F9514B9006C5449 /* TiNfc_Prefix.pch in Headers */, DB4613971F8CEF2A003956CF /* TiNfcUtilities.h in Headers */, DBF688331EEB4B3500009357 /* TiNfcNdefMessageProxy.h in Headers */, + E22E2A372580B206004C52F1 /* NativeTagTechnologyProxy.h in Headers */, 24DD6CF91134B3F500162E58 /* TiNfcModule.h in Headers */, E22E2A2725808C33004C52F1 /* TagTechnologyProxy.h in Headers */, DB856C461EE98C3B00DE4334 /* TiNfcNfcAdapterProxy.h in Headers */, @@ -264,6 +271,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + E22E2A382580B206004C52F1 /* NativeTagTechnologyProxy.m in Sources */, 24DD6CFA1134B3F500162E58 /* TiNfcModule.m in Sources */, DBF688381EEB4CB300009357 /* TiNfcNdefRecordProxy.m in Sources */, DB856C471EE98C3B00DE4334 /* TiNfcNfcAdapterProxy.m in Sources */, From aae3f73324c091776e4251bb72589ad0c1a4a78e Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Thu, 24 Dec 2020 10:42:13 +0530 Subject: [PATCH 05/59] feat(ios): added nfc tag proxy class and updated methods for native tag tech class --- apidoc/NfcTag.yml | 2 +- ios/Classes/NativeTagTechnologyProxy.m | 8 +++---- ios/Classes/TagTechnologyProxy.h | 7 ------ ios/Classes/TagTechnologyProxy.m | 14 ------------ ios/Classes/TiNFCTagProxy.h | 25 +++++++++++++++++++++ ios/Classes/TiNFCTagProxy.m | 30 ++++++++++++++++++++++++++ ios/ti.nfc.xcodeproj/project.pbxproj | 8 +++++++ 7 files changed, 67 insertions(+), 27 deletions(-) create mode 100644 ios/Classes/TiNFCTagProxy.h create mode 100644 ios/Classes/TiNFCTagProxy.m diff --git a/apidoc/NfcTag.yml b/apidoc/NfcTag.yml index 574ea33..cf79cb1 100644 --- a/apidoc/NfcTag.yml +++ b/apidoc/NfcTag.yml @@ -6,7 +6,7 @@ description: | [Tag](http://developer.android.com/reference/android/nfc/Tag.html) extends: Titanium.Proxy since: "1.0.0" -platforms: [android] +platforms: [android, iphone] createable: false methods: diff --git a/ios/Classes/NativeTagTechnologyProxy.m b/ios/Classes/NativeTagTechnologyProxy.m index 875f797..6aa3443 100644 --- a/ios/Classes/NativeTagTechnologyProxy.m +++ b/ios/Classes/NativeTagTechnologyProxy.m @@ -7,6 +7,7 @@ #import "NativeTagTechnologyProxy.h" #import "TiBlob.h" +#import "TiNFCTagProxy.h" #import "TiNfcUtilities.h" #import "TiUtils.h" @@ -27,9 +28,7 @@ - (void)connect:(id)unused } else { [self fireEvent:@"didDetectTags" withObject:@{ - @"tag" : tag, - @"errorCode" : NUMINTEGER([error code]), - @"errorDescription" : [error localizedDescription], + @"tag" : [[TiNFCTagProxy alloc] _initWithPageContext:[self pageContext] andTag:tag] }]; } }]; @@ -37,11 +36,10 @@ - (void)connect:(id)unused - (NSNumber *)isConnected:(id)unused { - if (session.connectedTag != nil) { + if (session.connectedTag == tag) { return [NSNumber numberWithBool:YES]; } else { return [NSNumber numberWithBool:NO]; - ; } } @end diff --git a/ios/Classes/TagTechnologyProxy.h b/ios/Classes/TagTechnologyProxy.h index a8923e4..88b24e1 100644 --- a/ios/Classes/TagTechnologyProxy.h +++ b/ios/Classes/TagTechnologyProxy.h @@ -16,13 +16,6 @@ NS_ASSUME_NONNULL_BEGIN - (NSNumber *)isConnected:(id)args; -- (void)close:(id)unused; - -- (void)restartPolling:(id)unused; - -- (NSNumber *)isEnabled:(id)unused; - - @end NS_ASSUME_NONNULL_END diff --git a/ios/Classes/TagTechnologyProxy.m b/ios/Classes/TagTechnologyProxy.m index 44c4eed..f10047f 100644 --- a/ios/Classes/TagTechnologyProxy.m +++ b/ios/Classes/TagTechnologyProxy.m @@ -23,18 +23,4 @@ - (NSNumber *)isConnected:(id)args return [NSNumber numberWithBool:NO]; } -- (void)close:(id)unused -{ -} - -- (void)restartPolling:(id)unused -{ -} - - -- (NSNumber *)isEnabled:(id)unused -{ - return; -} - @end diff --git a/ios/Classes/TiNFCTagProxy.h b/ios/Classes/TiNFCTagProxy.h new file mode 100644 index 0000000..6a90e71 --- /dev/null +++ b/ios/Classes/TiNFCTagProxy.h @@ -0,0 +1,25 @@ + +/** + * 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 +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TiNFCTagProxy : TiProxy { + id _tag; +} + +#pragma mark Public API's + +- (id)_initWithPageContext:(id)context andTag:(id)tag; + +- (NSNumber *)available; +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/TiNFCTagProxy.m b/ios/Classes/TiNFCTagProxy.m new file mode 100644 index 0000000..cc46fc7 --- /dev/null +++ b/ios/Classes/TiNFCTagProxy.m @@ -0,0 +1,30 @@ +/** + * 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 "TiNFCTagProxy.h" +#import "TiProxy.h" + +@implementation TiNFCTagProxy + +#pragma mark Internal + +- (id)_initWithPageContext:(id)context andTag:(id)tag +{ + if (self = [super _initWithPageContext:context]) { + _tag = tag; + } + return self; +} + +#pragma mark Public API's + +- (NSNumber *)available +{ + return NUMINT([_tag isAvailable]); +} + +@end diff --git a/ios/ti.nfc.xcodeproj/project.pbxproj b/ios/ti.nfc.xcodeproj/project.pbxproj index 76de697..ec239e1 100644 --- a/ios/ti.nfc.xcodeproj/project.pbxproj +++ b/ios/ti.nfc.xcodeproj/project.pbxproj @@ -41,6 +41,8 @@ E22E2A2825808C33004C52F1 /* TagTechnologyProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E22E2A2625808C33004C52F1 /* TagTechnologyProxy.m */; }; E22E2A372580B206004C52F1 /* NativeTagTechnologyProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E22E2A352580B206004C52F1 /* NativeTagTechnologyProxy.h */; }; E22E2A382580B206004C52F1 /* NativeTagTechnologyProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E22E2A362580B206004C52F1 /* NativeTagTechnologyProxy.m */; }; + E22F911A25934BFC0001ADBC /* TiNFCTagProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E22F911825934BFC0001ADBC /* TiNFCTagProxy.h */; }; + E22F911B25934BFC0001ADBC /* TiNFCTagProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E22F911925934BFC0001ADBC /* TiNFCTagProxy.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -75,6 +77,8 @@ E22E2A2625808C33004C52F1 /* TagTechnologyProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TagTechnologyProxy.m; path = Classes/TagTechnologyProxy.m; sourceTree = ""; }; E22E2A352580B206004C52F1 /* NativeTagTechnologyProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NativeTagTechnologyProxy.h; path = Classes/NativeTagTechnologyProxy.h; sourceTree = ""; }; E22E2A362580B206004C52F1 /* NativeTagTechnologyProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = NativeTagTechnologyProxy.m; path = Classes/NativeTagTechnologyProxy.m; sourceTree = ""; }; + E22F911825934BFC0001ADBC /* TiNFCTagProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNFCTagProxy.h; path = Classes/TiNFCTagProxy.h; sourceTree = ""; }; + E22F911925934BFC0001ADBC /* TiNFCTagProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNFCTagProxy.m; path = Classes/TiNFCTagProxy.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -178,6 +182,8 @@ E22E2A2625808C33004C52F1 /* TagTechnologyProxy.m */, E22E2A352580B206004C52F1 /* NativeTagTechnologyProxy.h */, E22E2A362580B206004C52F1 /* NativeTagTechnologyProxy.m */, + E22F911825934BFC0001ADBC /* TiNFCTagProxy.h */, + E22F911925934BFC0001ADBC /* TiNFCTagProxy.m */, ); name = "NFC Proxy class"; sourceTree = ""; @@ -196,6 +202,7 @@ 24DD6CF91134B3F500162E58 /* TiNfcModule.h in Headers */, E22E2A2725808C33004C52F1 /* TagTechnologyProxy.h in Headers */, DB856C461EE98C3B00DE4334 /* TiNfcNfcAdapterProxy.h in Headers */, + E22F911A25934BFC0001ADBC /* TiNFCTagProxy.h in Headers */, DBF688371EEB4CB300009357 /* TiNfcNdefRecordProxy.h in Headers */, 24DE9E1111C5FE74003F90F6 /* TiNfcModuleAssets.h in Headers */, ); @@ -279,6 +286,7 @@ E22E2A2825808C33004C52F1 /* TagTechnologyProxy.m in Sources */, 24DE9E1211C5FE74003F90F6 /* TiNfcModuleAssets.m in Sources */, DB4613981F8CEF2A003956CF /* TiNfcUtilities.m in Sources */, + E22F911B25934BFC0001ADBC /* TiNFCTagProxy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From 3e095b78ec78a94930374b76cef79536bb99bf7c Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Wed, 13 Jan 2021 14:10:35 +0530 Subject: [PATCH 06/59] feat(ios): added prefix, updated connect to tag method and update Yml doc --- apidoc/NfcTag.yml | 8 ++++ ios/Classes/NativeTagTechnologyProxy.m | 45 ----------------- ios/Classes/TiNFCTagProxy.h | 7 +-- ios/Classes/TiNFCTagProxy.m | 4 +- ...roxy.h => TiNfcNativeTagTechnologyProxy.h} | 5 +- ios/Classes/TiNfcNativeTagTechnologyProxy.m | 40 ++++++++++++++++ ...ologyProxy.h => TiNfcTagTechnologyProxy.h} | 2 +- ...ologyProxy.m => TiNfcTagTechnologyProxy.m} | 7 +-- ios/ti.nfc.xcodeproj/project.pbxproj | 48 +++++++++---------- 9 files changed, 84 insertions(+), 82 deletions(-) delete mode 100644 ios/Classes/NativeTagTechnologyProxy.m rename ios/Classes/{NativeTagTechnologyProxy.h => TiNfcNativeTagTechnologyProxy.h} (71%) create mode 100644 ios/Classes/TiNfcNativeTagTechnologyProxy.m rename ios/Classes/{TagTechnologyProxy.h => TiNfcTagTechnologyProxy.h} (89%) rename ios/Classes/{TagTechnologyProxy.m => TiNfcTagTechnologyProxy.m} (74%) diff --git a/apidoc/NfcTag.yml b/apidoc/NfcTag.yml index cf79cb1..c946ac1 100644 --- a/apidoc/NfcTag.yml +++ b/apidoc/NfcTag.yml @@ -20,6 +20,14 @@ methods: returns: type: Array + - name: available + summary: Returns if the tag is available in current session + platforms: [iphone] + returns: + type: Number + + + properties: - name: id summary: Tag identifier (if it has one) diff --git a/ios/Classes/NativeTagTechnologyProxy.m b/ios/Classes/NativeTagTechnologyProxy.m deleted file mode 100644 index 6aa3443..0000000 --- a/ios/Classes/NativeTagTechnologyProxy.m +++ /dev/null @@ -1,45 +0,0 @@ -/** - * 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 "NativeTagTechnologyProxy.h" -#import "TiBlob.h" -#import "TiNFCTagProxy.h" -#import "TiNfcUtilities.h" -#import "TiUtils.h" - -@implementation NativeTagTechnology - -#pragma mark Public API's - -- (void)connect:(id)unused -{ - [session connectToTag:tag - completionHandler:^(NSError *_Nullable error) { - if (error != nil) { - [self fireEvent:@"didDetectTags" - withObject:@{ - @"errorCode" : NUMINTEGER([error code]), - @"errorDescription" : [error localizedDescription], - }]; - } else { - [self fireEvent:@"didDetectTags" - withObject:@{ - @"tag" : [[TiNFCTagProxy alloc] _initWithPageContext:[self pageContext] andTag:tag] - }]; - } - }]; -} - -- (NSNumber *)isConnected:(id)unused -{ - if (session.connectedTag == tag) { - return [NSNumber numberWithBool:YES]; - } else { - return [NSNumber numberWithBool:NO]; - } -} -@end diff --git a/ios/Classes/TiNFCTagProxy.h b/ios/Classes/TiNFCTagProxy.h index 6a90e71..866e593 100644 --- a/ios/Classes/TiNFCTagProxy.h +++ b/ios/Classes/TiNFCTagProxy.h @@ -11,15 +11,16 @@ NS_ASSUME_NONNULL_BEGIN -@interface TiNFCTagProxy : TiProxy { +@interface TiNfcTagProxy : TiProxy { id _tag; } -#pragma mark Public API's - - (id)_initWithPageContext:(id)context andTag:(id)tag; +#pragma mark Public API's + - (NSNumber *)available; + @end NS_ASSUME_NONNULL_END diff --git a/ios/Classes/TiNFCTagProxy.m b/ios/Classes/TiNFCTagProxy.m index cc46fc7..683ea15 100644 --- a/ios/Classes/TiNFCTagProxy.m +++ b/ios/Classes/TiNFCTagProxy.m @@ -5,10 +5,10 @@ * Please see the LICENSE included with this distribution for details. */ -#import "TiNFCTagProxy.h" +#import "TiNfcTagProxy.h" #import "TiProxy.h" -@implementation TiNFCTagProxy +@implementation TiNfcTagProxy #pragma mark Internal diff --git a/ios/Classes/NativeTagTechnologyProxy.h b/ios/Classes/TiNfcNativeTagTechnologyProxy.h similarity index 71% rename from ios/Classes/NativeTagTechnologyProxy.h rename to ios/Classes/TiNfcNativeTagTechnologyProxy.h index de4913e..f936d54 100644 --- a/ios/Classes/NativeTagTechnologyProxy.h +++ b/ios/Classes/TiNfcNativeTagTechnologyProxy.h @@ -5,11 +5,12 @@ * Please see the LICENSE included with this distribution for details. */ -#import "TagTechnologyProxy.h" +#import "TiNfcTagProxy.h" +#import "TiNfcTagTechnologyProxy.h" NS_ASSUME_NONNULL_BEGIN -@interface NativeTagTechnology : TagTechnology { +@interface TiNfcNativeTagTechnologyProxy : TiNfcTagTechnologyProxy { NFCTagReaderSession *session; id tag; } diff --git a/ios/Classes/TiNfcNativeTagTechnologyProxy.m b/ios/Classes/TiNfcNativeTagTechnologyProxy.m new file mode 100644 index 0000000..8b93e09 --- /dev/null +++ b/ios/Classes/TiNfcNativeTagTechnologyProxy.m @@ -0,0 +1,40 @@ +// +// TiNfcNativeTagTechnologyProxy.m +// ti.nfc +// +// Created by Anil Shukla on 13/01/21. +// + +#import "TiNfcNativeTagTechnologyProxy.h" +#import "TiBlob.h" +#import "TiNfcTagProxy.h" +#import "TiNfcUtilities.h" +#import "TiUtils.h" + +@implementation TiNfcNativeTagTechnologyProxy + +#pragma mark Public API's + +- (void)connect:(id)unused +{ + [session connectToTag:tag + completionHandler:^(NSError *_Nullable error) { + if (![self _hasListeners:@"didConnectTag"]) { + return; + } + [self fireEvent:@"didConnectTag" + withObject:@{ + @"errorCode" : NUMINTEGER([error code]), + @"errorDescription" : [error localizedDescription], + @"errorDomain" : [error domain], + @"tag" : [[TiNfcTagProxy alloc] _initWithPageContext:[self pageContext] andTag:tag] + }]; + }]; +} + +- (NSNumber *)isConnected:(id)unused +{ + return [NSNumber numberWithBool:session.connectedTag == tag ? YES : NO]; +} + +@end diff --git a/ios/Classes/TagTechnologyProxy.h b/ios/Classes/TiNfcTagTechnologyProxy.h similarity index 89% rename from ios/Classes/TagTechnologyProxy.h rename to ios/Classes/TiNfcTagTechnologyProxy.h index 88b24e1..4a8cf9d 100644 --- a/ios/Classes/TagTechnologyProxy.h +++ b/ios/Classes/TiNfcTagTechnologyProxy.h @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface TagTechnology : TiProxy +@interface TiNfcTagTechnologyProxy : TiProxy - (void)connect:(id)args; diff --git a/ios/Classes/TagTechnologyProxy.m b/ios/Classes/TiNfcTagTechnologyProxy.m similarity index 74% rename from ios/Classes/TagTechnologyProxy.m rename to ios/Classes/TiNfcTagTechnologyProxy.m index f10047f..6da4137 100644 --- a/ios/Classes/TagTechnologyProxy.m +++ b/ios/Classes/TiNfcTagTechnologyProxy.m @@ -5,12 +5,9 @@ * Please see the LICENSE included with this distribution for details. */ -#import "TagTechnologyProxy.h" -#import "TiBlob.h" -#import "TiNfcUtilities.h" -#import "TiUtils.h" +#import "TiNfcTagTechnologyProxy.h" -@implementation TagTechnology +@implementation TiNfcTagTechnologyProxy #pragma mark Public API's diff --git a/ios/ti.nfc.xcodeproj/project.pbxproj b/ios/ti.nfc.xcodeproj/project.pbxproj index ec239e1..d54b772 100644 --- a/ios/ti.nfc.xcodeproj/project.pbxproj +++ b/ios/ti.nfc.xcodeproj/project.pbxproj @@ -37,12 +37,12 @@ DBF688341EEB4B3500009357 /* TiNfcNdefMessageProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = DBF688321EEB4B3500009357 /* TiNfcNdefMessageProxy.m */; }; DBF688371EEB4CB300009357 /* TiNfcNdefRecordProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = DBF688351EEB4CB300009357 /* TiNfcNdefRecordProxy.h */; }; DBF688381EEB4CB300009357 /* TiNfcNdefRecordProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = DBF688361EEB4CB300009357 /* TiNfcNdefRecordProxy.m */; }; - E22E2A2725808C33004C52F1 /* TagTechnologyProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E22E2A2525808C33004C52F1 /* TagTechnologyProxy.h */; }; - E22E2A2825808C33004C52F1 /* TagTechnologyProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E22E2A2625808C33004C52F1 /* TagTechnologyProxy.m */; }; - E22E2A372580B206004C52F1 /* NativeTagTechnologyProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E22E2A352580B206004C52F1 /* NativeTagTechnologyProxy.h */; }; - E22E2A382580B206004C52F1 /* NativeTagTechnologyProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E22E2A362580B206004C52F1 /* NativeTagTechnologyProxy.m */; }; - E22F911A25934BFC0001ADBC /* TiNFCTagProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E22F911825934BFC0001ADBC /* TiNFCTagProxy.h */; }; - E22F911B25934BFC0001ADBC /* TiNFCTagProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E22F911925934BFC0001ADBC /* TiNFCTagProxy.m */; }; + E2DA8DF825AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8DF625AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.h */; }; + E2DA8DF925AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8DF725AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.m */; }; + E2DA8DFE25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8DFC25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.h */; }; + E2DA8DFF25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8DFD25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m */; }; + E2DA8E0C25AEE6AE006F1DFA /* TiNfcTagProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8E0A25AEE6AD006F1DFA /* TiNfcTagProxy.h */; }; + E2DA8E0D25AEE6AE006F1DFA /* TiNfcTagProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8E0B25AEE6AD006F1DFA /* TiNfcTagProxy.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -73,12 +73,12 @@ DBF688321EEB4B3500009357 /* TiNfcNdefMessageProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcNdefMessageProxy.m; path = Classes/TiNfcNdefMessageProxy.m; sourceTree = ""; }; DBF688351EEB4CB300009357 /* TiNfcNdefRecordProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcNdefRecordProxy.h; path = Classes/TiNfcNdefRecordProxy.h; sourceTree = ""; }; DBF688361EEB4CB300009357 /* TiNfcNdefRecordProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcNdefRecordProxy.m; path = Classes/TiNfcNdefRecordProxy.m; sourceTree = ""; }; - E22E2A2525808C33004C52F1 /* TagTechnologyProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TagTechnologyProxy.h; path = Classes/TagTechnologyProxy.h; sourceTree = ""; }; - E22E2A2625808C33004C52F1 /* TagTechnologyProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TagTechnologyProxy.m; path = Classes/TagTechnologyProxy.m; sourceTree = ""; }; - E22E2A352580B206004C52F1 /* NativeTagTechnologyProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NativeTagTechnologyProxy.h; path = Classes/NativeTagTechnologyProxy.h; sourceTree = ""; }; - E22E2A362580B206004C52F1 /* NativeTagTechnologyProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = NativeTagTechnologyProxy.m; path = Classes/NativeTagTechnologyProxy.m; sourceTree = ""; }; - E22F911825934BFC0001ADBC /* TiNFCTagProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNFCTagProxy.h; path = Classes/TiNFCTagProxy.h; sourceTree = ""; }; - E22F911925934BFC0001ADBC /* TiNFCTagProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNFCTagProxy.m; path = Classes/TiNFCTagProxy.m; sourceTree = ""; }; + E2DA8DF625AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcTagTechnologyProxy.h; path = Classes/TiNfcTagTechnologyProxy.h; sourceTree = ""; }; + E2DA8DF725AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcTagTechnologyProxy.m; path = Classes/TiNfcTagTechnologyProxy.m; sourceTree = ""; }; + E2DA8DFC25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcNativeTagTechnologyProxy.h; path = Classes/TiNfcNativeTagTechnologyProxy.h; sourceTree = ""; }; + E2DA8DFD25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcNativeTagTechnologyProxy.m; path = Classes/TiNfcNativeTagTechnologyProxy.m; sourceTree = ""; }; + E2DA8E0A25AEE6AD006F1DFA /* TiNfcTagProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcTagProxy.h; path = Classes/TiNfcTagProxy.h; sourceTree = ""; }; + E2DA8E0B25AEE6AD006F1DFA /* TiNfcTagProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcTagProxy.m; path = Classes/TiNfcTagProxy.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -178,12 +178,12 @@ E22E2A2425808BD2004C52F1 /* NFC Proxy class */ = { isa = PBXGroup; children = ( - E22E2A2525808C33004C52F1 /* TagTechnologyProxy.h */, - E22E2A2625808C33004C52F1 /* TagTechnologyProxy.m */, - E22E2A352580B206004C52F1 /* NativeTagTechnologyProxy.h */, - E22E2A362580B206004C52F1 /* NativeTagTechnologyProxy.m */, - E22F911825934BFC0001ADBC /* TiNFCTagProxy.h */, - E22F911925934BFC0001ADBC /* TiNFCTagProxy.m */, + E2DA8DF625AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.h */, + E2DA8DF725AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.m */, + E2DA8DFC25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.h */, + E2DA8DFD25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m */, + E2DA8E0A25AEE6AD006F1DFA /* TiNfcTagProxy.h */, + E2DA8E0B25AEE6AD006F1DFA /* TiNfcTagProxy.m */, ); name = "NFC Proxy class"; sourceTree = ""; @@ -196,13 +196,13 @@ buildActionMask = 2147483647; files = ( AA747D9F0F9514B9006C5449 /* TiNfc_Prefix.pch in Headers */, + E2DA8DF825AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.h in Headers */, DB4613971F8CEF2A003956CF /* TiNfcUtilities.h in Headers */, DBF688331EEB4B3500009357 /* TiNfcNdefMessageProxy.h in Headers */, - E22E2A372580B206004C52F1 /* NativeTagTechnologyProxy.h in Headers */, 24DD6CF91134B3F500162E58 /* TiNfcModule.h in Headers */, - E22E2A2725808C33004C52F1 /* TagTechnologyProxy.h in Headers */, + E2DA8E0C25AEE6AE006F1DFA /* TiNfcTagProxy.h in Headers */, DB856C461EE98C3B00DE4334 /* TiNfcNfcAdapterProxy.h in Headers */, - E22F911A25934BFC0001ADBC /* TiNFCTagProxy.h in Headers */, + E2DA8DFE25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.h in Headers */, DBF688371EEB4CB300009357 /* TiNfcNdefRecordProxy.h in Headers */, 24DE9E1111C5FE74003F90F6 /* TiNfcModuleAssets.h in Headers */, ); @@ -278,15 +278,15 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - E22E2A382580B206004C52F1 /* NativeTagTechnologyProxy.m in Sources */, 24DD6CFA1134B3F500162E58 /* TiNfcModule.m in Sources */, DBF688381EEB4CB300009357 /* TiNfcNdefRecordProxy.m in Sources */, + E2DA8DFF25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m in Sources */, + E2DA8E0D25AEE6AE006F1DFA /* TiNfcTagProxy.m in Sources */, DB856C471EE98C3B00DE4334 /* TiNfcNfcAdapterProxy.m in Sources */, DBF688341EEB4B3500009357 /* TiNfcNdefMessageProxy.m in Sources */, - E22E2A2825808C33004C52F1 /* TagTechnologyProxy.m in Sources */, 24DE9E1211C5FE74003F90F6 /* TiNfcModuleAssets.m in Sources */, DB4613981F8CEF2A003956CF /* TiNfcUtilities.m in Sources */, - E22F911B25934BFC0001ADBC /* TiNFCTagProxy.m in Sources */, + E2DA8DF925AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; From e1debf71b35ba4dafd34cfd6daab4a5a62861432 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Wed, 13 Jan 2021 17:36:10 +0530 Subject: [PATCH 07/59] update(ios): updated incorrect licence --- ios/Classes/TiNfcNativeTagTechnologyProxy.m | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ios/Classes/TiNfcNativeTagTechnologyProxy.m b/ios/Classes/TiNfcNativeTagTechnologyProxy.m index 8b93e09..2723548 100644 --- a/ios/Classes/TiNfcNativeTagTechnologyProxy.m +++ b/ios/Classes/TiNfcNativeTagTechnologyProxy.m @@ -1,9 +1,9 @@ -// -// TiNfcNativeTagTechnologyProxy.m -// ti.nfc -// -// Created by Anil Shukla on 13/01/21. -// +/** + * 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 "TiBlob.h" From 2b9edfc89f8736c2ab7bdf1f30b2b3293bb9c499 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Thu, 24 Dec 2020 13:54:26 +0530 Subject: [PATCH 08/59] feat(ios): added required methods for adapter class --- ios/Classes/TiNfcNfcAdapterProxy.h | 5 +- ios/Classes/TiNfcNfcAdapterProxy.m | 94 +++++++++++++++++++++++++++--- 2 files changed, 91 insertions(+), 8 deletions(-) diff --git a/ios/Classes/TiNfcNfcAdapterProxy.h b/ios/Classes/TiNfcNfcAdapterProxy.h index 357a4b2..302af0a 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.h +++ b/ios/Classes/TiNfcNfcAdapterProxy.h @@ -7,13 +7,16 @@ #if IS_IOS_11 +#import "NativeTagTechnologyProxy.h" #import "TiProxy.h" #import -@interface TiNfcNfcAdapterProxy : TiProxy { +@interface TiNfcNfcAdapterProxy : TiProxy { NFCNDEFReaderSession *_nfcSession; + NFCTagReaderSession *_nfcTagReadersession; KrollCallback *_ndefDiscoveredCallback; KrollCallback *_nNdefInvalidated; + NativeTagTechnology *tagTech; } #pragma mark Public API's diff --git a/ios/Classes/TiNfcNfcAdapterProxy.m b/ios/Classes/TiNfcNfcAdapterProxy.m index 6d9d9f4..f11f5b8 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.m +++ b/ios/Classes/TiNfcNfcAdapterProxy.m @@ -19,7 +19,7 @@ - (NFCNDEFReaderSession *)nfcSession { // Guard older iOS versions already. The developer will use "isEnabled" later to actually guard the functionality // e.g. an iPad running iOS 11, but without NFC capabilities - if (![TiUtils isIOS11OrGreater]) { + if (![TiUtils isIOSVersionOrGreater:@"13.0"]) { return nil; } @@ -32,26 +32,84 @@ - (NFCNDEFReaderSession *)nfcSession return _nfcSession; } +- (NFCTagReaderSession *)nfcTagReadersession +{ + tagTech = [[NativeTagTechnology alloc] init]; + if (_nfcTagReadersession == nil) { + _nfcTagReadersession = [[NFCTagReaderSession alloc] initWithPollingOption:NFCPollingISO14443 delegate:self queue:nil]; + } + + return _nfcTagReadersession; +} + #pragma mark Public API's - (NSNumber *)isEnabled:(id)unused { - if (![TiUtils isIOS11OrGreater]) { + if (![TiUtils isIOSVersionOrGreater:@"13.0"]) { return @(NO); } - - return @([NFCNDEFReaderSession readingAvailable]); + ENSURE_SINGLE_ARG(unused, NSArray); + NSString *sessionType = [unused objectAtIndex:0]; + if ([sessionType isEqualToString:@"NFCNDEFReaderSession"]) { + return @([NFCNDEFReaderSession readingAvailable]); + } else if ([sessionType isEqualToString:@"NFCTagReaderSession"]) { + return @([NFCTagReaderSession readingAvailable]); + } } - (void)begin:(id)unused { - [[self nfcSession] beginSession]; + ENSURE_SINGLE_ARG(unused, NSArray); + NSString *sessionType = [unused objectAtIndex:0]; + if ([sessionType isEqualToString:@"NFCNDEFReaderSession"]) { + [[self nfcSession] beginSession]; + } else if ([sessionType isEqualToString:@"NFCTagReaderSession"]) { + [[self nfcTagReadersession] beginSession]; + } } - (void)invalidate:(id)unused { - [[self nfcSession] invalidateSession]; - _nfcSession = nil; + ENSURE_SINGLE_ARG(unused, NSArray); + NSString *sessionType = [unused objectAtIndex:0]; + if ([sessionType isEqualToString:@"NFCNDEFReaderSession"]) { + [[self nfcSession] invalidateSession]; + _nfcSession = nil; + } else if ([sessionType isEqualToString:@"NFCTagReaderSession"]) { + [[self nfcTagReadersession] invalidateSession]; + _nfcTagReadersession = nil; + } +} + +- (void)createTagTechMifareUltralight:(id)tag +{ + [[self nfcTagReadersession] beginSession]; + [tagTech connect:(tag)]; +} + +- (void)createTagTechNdef:(id)tag +{ + [[self nfcTagReadersession] beginSession]; + [tagTech connect:(tag)]; +} + +- (void)createTagTechNfcV:(id)tag +{ + [[self nfcTagReadersession] beginSession]; + [tagTech connect:(tag)]; +} + +- (void)createTagTechISODep:(id)tag +{ + [[self nfcTagReadersession] beginSession]; + [tagTech connect:(tag)]; +} + +- (void)createTagTechNfcF:(id)tag +{ + [[self nfcTagReadersession] beginSession]; + [tagTech connect:(tag)]; } - (void)setOnNdefDiscovered:(KrollCallback *)callback @@ -112,6 +170,28 @@ - (void)readerSession:(NFCNDEFReaderSession *)session didInvalidateWithError:(NS NO); } +#pragma mark NFCReaderSessionDelegate + +- (void)tagReaderSession:(NFCTagReaderSession *)session didInvalidateWithError:(NSError *)error +{ + [self fireEvent:@"didInvalidateWithError" withObject:@{ @"error" : error.localizedDescription, @"cancelled" : @(error.code == 200) }]; +} + +- (void)tagReaderSessionDidBecomeActive:(NFCTagReaderSession *)session +{ + [self fireEvent:@"tagReaderSessionDidBecomeActive"]; +} + +- (void)tagReaderSession:(NFCTagReaderSession *)session didDetectTags:(NSArray<__kindof id> *)tags +{ + + id tag = tags[0].asNFCMiFareTag; + [self fireEvent:@"didDetectTags" + withObject:@{ + @"tag" : tag, + }]; +} + @end #endif From ec03ad14791f1f3370805b43501afca59bd5d710 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Thu, 14 Jan 2021 10:25:02 +0530 Subject: [PATCH 09/59] feat(ios): added all required classes for NFC adapter class --- ios/Classes/TiMiFareUltralightTagTechnology.h | 23 +++++ ios/Classes/TiMiFareUltralightTagTechnology.m | 25 ++++++ ios/Classes/TiNDEFTagTechnology.h | 23 +++++ ios/Classes/TiNDEFTagTechnology.m | 25 ++++++ ios/Classes/TiNFCTagProxy.h | 2 + ios/Classes/TiNFCTagProxy.m | 5 ++ ios/Classes/TiNfcFTagTechnology.h | 23 +++++ ios/Classes/TiNfcFTagTechnology.m | 25 ++++++ ios/Classes/TiNfcISODepTagTechnology.h | 23 +++++ ios/Classes/TiNfcISODepTagTechnology.m | 25 ++++++ ios/Classes/TiNfcModule.h | 3 + ios/Classes/TiNfcNativeTagTechnologyProxy.h | 2 +- ios/Classes/TiNfcNfcAdapterProxy.h | 3 +- ios/Classes/TiNfcNfcAdapterProxy.m | 84 ++++++++++++++----- ios/Classes/TiNfcVTagTechnology.h | 23 +++++ ios/Classes/TiNfcVTagTechnology.m | 25 ++++++ ios/ti.nfc.xcodeproj/project.pbxproj | 43 ++++++++++ 17 files changed, 360 insertions(+), 22 deletions(-) create mode 100644 ios/Classes/TiMiFareUltralightTagTechnology.h create mode 100644 ios/Classes/TiMiFareUltralightTagTechnology.m create mode 100644 ios/Classes/TiNDEFTagTechnology.h create mode 100644 ios/Classes/TiNDEFTagTechnology.m create mode 100644 ios/Classes/TiNfcFTagTechnology.h create mode 100644 ios/Classes/TiNfcFTagTechnology.m create mode 100644 ios/Classes/TiNfcISODepTagTechnology.h create mode 100644 ios/Classes/TiNfcISODepTagTechnology.m create mode 100644 ios/Classes/TiNfcVTagTechnology.h create mode 100644 ios/Classes/TiNfcVTagTechnology.m diff --git a/ios/Classes/TiMiFareUltralightTagTechnology.h b/ios/Classes/TiMiFareUltralightTagTechnology.h new file mode 100644 index 0000000..d2537f5 --- /dev/null +++ b/ios/Classes/TiMiFareUltralightTagTechnology.h @@ -0,0 +1,23 @@ +/** + * 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 +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TiMiFareUltralightTagTechnology : TiProxy { + id _mifareTag; +} + +- (id)_initWithPageContext:(id)context andMiFareTag:(id)mifareTag; + +- (id)mifareTag; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/TiMiFareUltralightTagTechnology.m b/ios/Classes/TiMiFareUltralightTagTechnology.m new file mode 100644 index 0000000..b7ca86e --- /dev/null +++ b/ios/Classes/TiMiFareUltralightTagTechnology.m @@ -0,0 +1,25 @@ +/** + * 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 "TiMiFareUltralightTagTechnology.h" + +@implementation TiMiFareUltralightTagTechnology + +- (id)_initWithPageContext:(id)context andMiFareTag:(id)mifareTag +{ + if (self = [super _initWithPageContext:context]) { + _mifareTag = mifareTag; + } + return self; +} + +- (id)mifareTag; +{ + return _mifareTag; +} + +@end diff --git a/ios/Classes/TiNDEFTagTechnology.h b/ios/Classes/TiNDEFTagTechnology.h new file mode 100644 index 0000000..38468dd --- /dev/null +++ b/ios/Classes/TiNDEFTagTechnology.h @@ -0,0 +1,23 @@ +/** + * 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 +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TiNDEFTagTechnology : TiProxy { + id _ndefTag; +} + +- (id)_initWithPageContext:(id)context andNDEFTag:(id)ndefTag; + +- (id)ndefTag; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/TiNDEFTagTechnology.m b/ios/Classes/TiNDEFTagTechnology.m new file mode 100644 index 0000000..6a22620 --- /dev/null +++ b/ios/Classes/TiNDEFTagTechnology.m @@ -0,0 +1,25 @@ +/** + * 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 "TiNDEFTagTechnology.h" + +@implementation TiNDEFTagTechnology + +- (id)_initWithPageContext:(id)context andNDEFTag:(id)ndefTag +{ + if (self = [super _initWithPageContext:context]) { + _ndefTag = ndefTag; + } + return self; +} + +- (id)ndefTag +{ + return _ndefTag; +} + +@end diff --git a/ios/Classes/TiNFCTagProxy.h b/ios/Classes/TiNFCTagProxy.h index 866e593..2da4968 100644 --- a/ios/Classes/TiNFCTagProxy.h +++ b/ios/Classes/TiNFCTagProxy.h @@ -19,6 +19,8 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark Public API's +- (id)tag; + - (NSNumber *)available; @end diff --git a/ios/Classes/TiNFCTagProxy.m b/ios/Classes/TiNFCTagProxy.m index 683ea15..c4ddc6f 100644 --- a/ios/Classes/TiNFCTagProxy.m +++ b/ios/Classes/TiNFCTagProxy.m @@ -27,4 +27,9 @@ - (NSNumber *)available return NUMINT([_tag isAvailable]); } +- (id)tag +{ + return _tag; +} + @end diff --git a/ios/Classes/TiNfcFTagTechnology.h b/ios/Classes/TiNfcFTagTechnology.h new file mode 100644 index 0000000..a37ecea --- /dev/null +++ b/ios/Classes/TiNfcFTagTechnology.h @@ -0,0 +1,23 @@ +/** + * 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 +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TiNfcFTagTechnology : TiProxy { + id _felicaTag; +} + +- (id)_initWithPageContext:(id)context andNFCFeliCaTag:(id)felicaTag; + +- (id)felicaTag; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/TiNfcFTagTechnology.m b/ios/Classes/TiNfcFTagTechnology.m new file mode 100644 index 0000000..63638be --- /dev/null +++ b/ios/Classes/TiNfcFTagTechnology.m @@ -0,0 +1,25 @@ +/** + * 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 + +- (id)_initWithPageContext:(id)context andNFCFeliCaTag:(id)felicaTag +{ + if (self = [super _initWithPageContext:context]) { + _felicaTag = felicaTag; + } + return self; +} + +- (id)felicaTag; +{ + return _felicaTag; +} + +@end diff --git a/ios/Classes/TiNfcISODepTagTechnology.h b/ios/Classes/TiNfcISODepTagTechnology.h new file mode 100644 index 0000000..7c605b6 --- /dev/null +++ b/ios/Classes/TiNfcISODepTagTechnology.h @@ -0,0 +1,23 @@ +/** + * 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 +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TiNfcISODepTagTechnology : TiProxy { + id _iso7816Tag; +} + +- (id)_initWithPageContext:(id)context andNFCISO7816Tag:(id)iso7816Tag; + +- (id)iso7816Tag; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/TiNfcISODepTagTechnology.m b/ios/Classes/TiNfcISODepTagTechnology.m new file mode 100644 index 0000000..fbbd3ea --- /dev/null +++ b/ios/Classes/TiNfcISODepTagTechnology.m @@ -0,0 +1,25 @@ +/** + * 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 + +- (id)_initWithPageContext:(id)context andNFCISO7816Tag:(id)iso7816Tag +{ + if (self = [super _initWithPageContext:context]) { + _iso7816Tag = iso7816Tag; + } + return self; +} + +- (id)iso7816Tag; +{ + return _iso7816Tag; +} + +@end diff --git a/ios/Classes/TiNfcModule.h b/ios/Classes/TiNfcModule.h index ed868b7..ba67e2e 100644 --- a/ios/Classes/TiNfcModule.h +++ b/ios/Classes/TiNfcModule.h @@ -7,6 +7,9 @@ #import "TiModule.h" +#define NDEF_READER_SESSION @"NFCNDEFReaderSession" +#define NFC_TAG_READER_SESSION @"NFCTagReaderSession" + @interface TiNfcModule : TiModule { } diff --git a/ios/Classes/TiNfcNativeTagTechnologyProxy.h b/ios/Classes/TiNfcNativeTagTechnologyProxy.h index f936d54..36b4ae1 100644 --- a/ios/Classes/TiNfcNativeTagTechnologyProxy.h +++ b/ios/Classes/TiNfcNativeTagTechnologyProxy.h @@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN @interface TiNfcNativeTagTechnologyProxy : TiNfcTagTechnologyProxy { NFCTagReaderSession *session; - id tag; + TiNFCTagProxy *tag; } @end diff --git a/ios/Classes/TiNfcNfcAdapterProxy.h b/ios/Classes/TiNfcNfcAdapterProxy.h index 302af0a..5753139 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.h +++ b/ios/Classes/TiNfcNfcAdapterProxy.h @@ -16,9 +16,10 @@ NFCTagReaderSession *_nfcTagReadersession; KrollCallback *_ndefDiscoveredCallback; KrollCallback *_nNdefInvalidated; - NativeTagTechnology *tagTech; } +@property (nonatomic, strong) TagTechnology *tagTech; + #pragma mark Public API's - (NSNumber *)isEnabled:(id)unused; diff --git a/ios/Classes/TiNfcNfcAdapterProxy.m b/ios/Classes/TiNfcNfcAdapterProxy.m index f11f5b8..24b4e04 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.m +++ b/ios/Classes/TiNfcNfcAdapterProxy.m @@ -8,7 +8,14 @@ #if IS_IOS_11 #import "TiNfcNfcAdapterProxy.h" +#import "TiMiFareUltralightTagTechnology.h" +#import "TiNDEFTagTechnology.h" +#import "TiNFCTagProxy.h" +#import "TiNfcFTagTechnology.h" +#import "TiNfcISODepTagTechnology.h" +#import "TiNfcModule.h" #import "TiNfcNdefMessageProxy.h" +#import "TiNfcVTagTechnology.h" #import "TiUtils.h" @implementation TiNfcNfcAdapterProxy @@ -34,7 +41,6 @@ - (NFCNDEFReaderSession *)nfcSession - (NFCTagReaderSession *)nfcTagReadersession { - tagTech = [[NativeTagTechnology alloc] init]; if (_nfcTagReadersession == nil) { _nfcTagReadersession = [[NFCTagReaderSession alloc] initWithPollingOption:NFCPollingISO14443 delegate:self queue:nil]; } @@ -82,34 +88,45 @@ - (void)invalidate:(id)unused } } -- (void)createTagTechMifareUltralight:(id)tag +- (TiMiFareUltralightTagTechnology *)createTagTechMifareUltralight:(id)args { - [[self nfcTagReadersession] beginSession]; - [tagTech connect:(tag)]; + ENSURE_SINGLE_ARG(args, NSArray); + TiNFCTagProxy *tag = [args objectAtIndex:0]; + TiMiFareUltralightTagTechnology *mifareTag = [[TiMiFareUltralightTagTechnology alloc] init]; + mifareTag.session + return mifareTag; } -- (void)createTagTechNdef:(id)tag +- (TiNDEFTagTechnology *)createTagTechNdef:(id)args { - [[self nfcTagReadersession] beginSession]; - [tagTech connect:(tag)]; + ENSURE_SINGLE_ARG(args, NSArray); + TiNFCTagProxy *tag = [args objectAtIndex:0]; + TiNDEFTagTechnology *ndefTag = [[TiNDEFTagTechnology alloc] init]; + return ndefTag; } -- (void)createTagTechNfcV:(id)tag +- (TiNfcVTagTechnology *)createTagTechNfcV:(id)args { - [[self nfcTagReadersession] beginSession]; - [tagTech connect:(tag)]; + ENSURE_SINGLE_ARG(args, NSArray); + TiNFCTagProxy *tag = [args objectAtIndex:0]; + TiNfcVTagTechnology *nfcvTag = [[TiNfcVTagTechnology alloc] init]; + return nfcvTag; } -- (void)createTagTechISODep:(id)tag +- (TiNfcISODepTagTechnology *)createTagTechISODep:(id)args { - [[self nfcTagReadersession] beginSession]; - [tagTech connect:(tag)]; + ENSURE_SINGLE_ARG(args, NSArray); + TiNFCTagProxy *tag = [args objectAtIndex:0]; + TiNfcISODepTagTechnology *isodepTag = [[TiNfcISODepTagTechnology alloc] init]; + return isodepTag; } -- (void)createTagTechNfcF:(id)tag +- (TiNfcFTagTechnology *)createTagTechNfcF:(id)args { - [[self nfcTagReadersession] beginSession]; - [tagTech connect:(tag)]; + ENSURE_SINGLE_ARG(args, NSArray); + TiNFCTagProxy *tag = [args objectAtIndex:0]; + TiNfcFTagTechnology *nfcfTag = [[TiNfcFTagTechnology alloc] init]; + return nfcfTag; } - (void)setOnNdefDiscovered:(KrollCallback *)callback @@ -163,7 +180,8 @@ - (void)readerSession:(NFCNDEFReaderSession *)session didInvalidateWithError:(NS [_nNdefInvalidated call:@[ @{ @"cancelled" : @(error.code == 200), @"message" : [error localizedDescription], - @"code" : NUMINTEGER([error code]) + @"code" : NUMINTEGER([error code]), + @"type" : NDEF_READER_SESSION } ] thisObject:self]; }, @@ -174,21 +192,47 @@ - (void)readerSession:(NFCNDEFReaderSession *)session didInvalidateWithError:(NS - (void)tagReaderSession:(NFCTagReaderSession *)session didInvalidateWithError:(NSError *)error { - [self fireEvent:@"didInvalidateWithError" withObject:@{ @"error" : error.localizedDescription, @"cancelled" : @(error.code == 200) }]; + _nfcTagReadersession = nil; + + if (!_nNdefInvalidated) { + return; + } + TiThreadPerformOnMainThread( + ^{ + [_nNdefInvalidated call:@[ @{ + @"cancelled" : @(error.code == 200), + @"message" : [error localizedDescription], + @"code" : NUMINTEGER([error code]), + @"type" : NFC_TAG_READER_SESSION + } ] + thisObject:self]; + }, + NO); } - (void)tagReaderSessionDidBecomeActive:(NFCTagReaderSession *)session { + + if (![self _hasListeners:@"tagReaderSessionDidBecomeActive"]) { + return; + } + [self fireEvent:@"tagReaderSessionDidBecomeActive" + withObject:@{ + @"type" : NFC_TAG_READER_SESSION + }]; [self fireEvent:@"tagReaderSessionDidBecomeActive"]; } - (void)tagReaderSession:(NFCTagReaderSession *)session didDetectTags:(NSArray<__kindof id> *)tags { - + if (![self _hasListeners:@"didDetectTags"]) { + return; + } id tag = tags[0].asNFCMiFareTag; [self fireEvent:@"didDetectTags" withObject:@{ - @"tag" : tag, + @"tag" : [[TiNFCTagProxy alloc] _initWithPageContext:[self pageContext] andTag:tag], + @"type" : NFC_TAG_READER_SESSION }]; } diff --git a/ios/Classes/TiNfcVTagTechnology.h b/ios/Classes/TiNfcVTagTechnology.h new file mode 100644 index 0000000..09ea684 --- /dev/null +++ b/ios/Classes/TiNfcVTagTechnology.h @@ -0,0 +1,23 @@ +/** + * 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 +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TiNfcVTagTechnology : TiProxy { + id _iso15693Tag; +} + +- (id)_initWithPageContext:(id)context andNFCISO15693Tag:(id)iso15693Tag; + +- (id)iso15693Tag; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/TiNfcVTagTechnology.m b/ios/Classes/TiNfcVTagTechnology.m new file mode 100644 index 0000000..9256400 --- /dev/null +++ b/ios/Classes/TiNfcVTagTechnology.m @@ -0,0 +1,25 @@ +/** + * 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 "TiNfcVTagTechnology.h" + +@implementation TiNfcVTagTechnology + +- (id)_initWithPageContext:(id)context andNFCISO15693Tag:(id)iso15693Tag +{ + if (self = [super _initWithPageContext:context]) { + _iso15693Tag = iso15693Tag; + } + return self; +} + +- (id)iso15693Tag +{ + return _iso15693Tag; +} + +@end diff --git a/ios/ti.nfc.xcodeproj/project.pbxproj b/ios/ti.nfc.xcodeproj/project.pbxproj index d54b772..dc3e99c 100644 --- a/ios/ti.nfc.xcodeproj/project.pbxproj +++ b/ios/ti.nfc.xcodeproj/project.pbxproj @@ -43,6 +43,16 @@ E2DA8DFF25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8DFD25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m */; }; E2DA8E0C25AEE6AE006F1DFA /* TiNfcTagProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8E0A25AEE6AD006F1DFA /* TiNfcTagProxy.h */; }; E2DA8E0D25AEE6AE006F1DFA /* TiNfcTagProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8E0B25AEE6AD006F1DFA /* TiNfcTagProxy.m */; }; + E2DA8DD025A3526B006F1DFA /* TiMiFareUltralightTagTechnology.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8DCE25A3526B006F1DFA /* TiMiFareUltralightTagTechnology.h */; }; + E2DA8DD125A3526B006F1DFA /* TiMiFareUltralightTagTechnology.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8DCF25A3526B006F1DFA /* TiMiFareUltralightTagTechnology.m */; }; + E2DA8E2225AF1705006F1DFA /* TiNDEFTagTechnology.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8E2025AF1705006F1DFA /* TiNDEFTagTechnology.h */; }; + E2DA8E2325AF1705006F1DFA /* TiNDEFTagTechnology.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8E2125AF1705006F1DFA /* TiNDEFTagTechnology.m */; }; + E2DA8E3025AF1AB7006F1DFA /* TiNfcVTagTechnology.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8E2E25AF1AB7006F1DFA /* TiNfcVTagTechnology.h */; }; + E2DA8E3125AF1AB7006F1DFA /* TiNfcVTagTechnology.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8E2F25AF1AB7006F1DFA /* TiNfcVTagTechnology.m */; }; + E2DA8E3625AF1BA2006F1DFA /* TiNfcISODepTagTechnology.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8E3425AF1BA2006F1DFA /* TiNfcISODepTagTechnology.h */; }; + E2DA8E3725AF1BA2006F1DFA /* TiNfcISODepTagTechnology.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8E3525AF1BA2006F1DFA /* TiNfcISODepTagTechnology.m */; }; + E2DA8E4225AF1EBA006F1DFA /* TiNfcFTagTechnology.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8E4025AF1EBA006F1DFA /* TiNfcFTagTechnology.h */; }; + E2DA8E4325AF1EBA006F1DFA /* TiNfcFTagTechnology.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8E4125AF1EBA006F1DFA /* TiNfcFTagTechnology.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -79,6 +89,16 @@ E2DA8DFD25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcNativeTagTechnologyProxy.m; path = Classes/TiNfcNativeTagTechnologyProxy.m; sourceTree = ""; }; E2DA8E0A25AEE6AD006F1DFA /* TiNfcTagProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcTagProxy.h; path = Classes/TiNfcTagProxy.h; sourceTree = ""; }; E2DA8E0B25AEE6AD006F1DFA /* TiNfcTagProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcTagProxy.m; path = Classes/TiNfcTagProxy.m; sourceTree = ""; }; + E2DA8DCE25A3526B006F1DFA /* TiMiFareUltralightTagTechnology.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiMiFareUltralightTagTechnology.h; path = Classes/TiMiFareUltralightTagTechnology.h; sourceTree = ""; }; + E2DA8DCF25A3526B006F1DFA /* TiMiFareUltralightTagTechnology.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiMiFareUltralightTagTechnology.m; path = Classes/TiMiFareUltralightTagTechnology.m; sourceTree = ""; }; + E2DA8E2025AF1705006F1DFA /* TiNDEFTagTechnology.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNDEFTagTechnology.h; path = Classes/TiNDEFTagTechnology.h; sourceTree = ""; }; + E2DA8E2125AF1705006F1DFA /* TiNDEFTagTechnology.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNDEFTagTechnology.m; path = Classes/TiNDEFTagTechnology.m; sourceTree = ""; }; + E2DA8E2E25AF1AB7006F1DFA /* TiNfcVTagTechnology.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcVTagTechnology.h; path = Classes/TiNfcVTagTechnology.h; sourceTree = ""; }; + E2DA8E2F25AF1AB7006F1DFA /* TiNfcVTagTechnology.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcVTagTechnology.m; path = Classes/TiNfcVTagTechnology.m; sourceTree = ""; }; + E2DA8E3425AF1BA2006F1DFA /* TiNfcISODepTagTechnology.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcISODepTagTechnology.h; path = Classes/TiNfcISODepTagTechnology.h; sourceTree = ""; }; + E2DA8E3525AF1BA2006F1DFA /* TiNfcISODepTagTechnology.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcISODepTagTechnology.m; path = Classes/TiNfcISODepTagTechnology.m; sourceTree = ""; }; + E2DA8E4025AF1EBA006F1DFA /* TiNfcFTagTechnology.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcFTagTechnology.h; path = Classes/TiNfcFTagTechnology.h; sourceTree = ""; }; + E2DA8E4125AF1EBA006F1DFA /* TiNfcFTagTechnology.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcFTagTechnology.m; path = Classes/TiNfcFTagTechnology.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -184,6 +204,16 @@ E2DA8DFD25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m */, E2DA8E0A25AEE6AD006F1DFA /* TiNfcTagProxy.h */, E2DA8E0B25AEE6AD006F1DFA /* TiNfcTagProxy.m */, + E2DA8DCE25A3526B006F1DFA /* TiMiFareUltralightTagTechnology.h */, + E2DA8DCF25A3526B006F1DFA /* TiMiFareUltralightTagTechnology.m */, + E2DA8E2025AF1705006F1DFA /* TiNDEFTagTechnology.h */, + E2DA8E2125AF1705006F1DFA /* TiNDEFTagTechnology.m */, + E2DA8E2E25AF1AB7006F1DFA /* TiNfcVTagTechnology.h */, + E2DA8E2F25AF1AB7006F1DFA /* TiNfcVTagTechnology.m */, + E2DA8E3425AF1BA2006F1DFA /* TiNfcISODepTagTechnology.h */, + E2DA8E3525AF1BA2006F1DFA /* TiNfcISODepTagTechnology.m */, + E2DA8E4025AF1EBA006F1DFA /* TiNfcFTagTechnology.h */, + E2DA8E4125AF1EBA006F1DFA /* TiNfcFTagTechnology.m */, ); name = "NFC Proxy class"; sourceTree = ""; @@ -195,12 +225,20 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + E2DA8E4225AF1EBA006F1DFA /* TiNfcFTagTechnology.h in Headers */, + E2DA8E3025AF1AB7006F1DFA /* TiNfcVTagTechnology.h in Headers */, AA747D9F0F9514B9006C5449 /* TiNfc_Prefix.pch in Headers */, E2DA8DF825AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.h in Headers */, DB4613971F8CEF2A003956CF /* TiNfcUtilities.h in Headers */, DBF688331EEB4B3500009357 /* TiNfcNdefMessageProxy.h in Headers */, 24DD6CF91134B3F500162E58 /* TiNfcModule.h in Headers */, E2DA8E0C25AEE6AE006F1DFA /* TiNfcTagProxy.h in Headers */, + E2DA8E3625AF1BA2006F1DFA /* TiNfcISODepTagTechnology.h in Headers */, + E22E2A372580B206004C52F1 /* NativeTagTechnologyProxy.h in Headers */, + 24DD6CF91134B3F500162E58 /* TiNfcModule.h in Headers */, + E2DA8E2225AF1705006F1DFA /* TiNDEFTagTechnology.h in Headers */, + E2DA8DD025A3526B006F1DFA /* TiMiFareUltralightTagTechnology.h in Headers */, + E22E2A2725808C33004C52F1 /* TagTechnologyProxy.h in Headers */, DB856C461EE98C3B00DE4334 /* TiNfcNfcAdapterProxy.h in Headers */, E2DA8DFE25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.h in Headers */, DBF688371EEB4CB300009357 /* TiNfcNdefRecordProxy.h in Headers */, @@ -279,11 +317,16 @@ buildActionMask = 2147483647; files = ( 24DD6CFA1134B3F500162E58 /* TiNfcModule.m in Sources */, + E2DA8E4325AF1EBA006F1DFA /* TiNfcFTagTechnology.m in Sources */, + E2DA8E3125AF1AB7006F1DFA /* TiNfcVTagTechnology.m in Sources */, + E2DA8E2325AF1705006F1DFA /* TiNDEFTagTechnology.m in Sources */, + E2DA8E3725AF1BA2006F1DFA /* TiNfcISODepTagTechnology.m in Sources */, DBF688381EEB4CB300009357 /* TiNfcNdefRecordProxy.m in Sources */, E2DA8DFF25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m in Sources */, E2DA8E0D25AEE6AE006F1DFA /* TiNfcTagProxy.m in Sources */, DB856C471EE98C3B00DE4334 /* TiNfcNfcAdapterProxy.m in Sources */, DBF688341EEB4B3500009357 /* TiNfcNdefMessageProxy.m in Sources */, + E2DA8DD125A3526B006F1DFA /* TiMiFareUltralightTagTechnology.m in Sources */, 24DE9E1211C5FE74003F90F6 /* TiNfcModuleAssets.m in Sources */, DB4613981F8CEF2A003956CF /* TiNfcUtilities.m in Sources */, E2DA8DF925AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.m in Sources */, From 23f1db2f2f6bc30f3a50ed918be865f3576262cb Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Thu, 14 Jan 2021 10:44:47 +0530 Subject: [PATCH 10/59] feat(ios): updated the class name with required prefix --- ios/Classes/TiNfcNativeTagTechnologyProxy.h | 2 +- ios/Classes/TiNfcNfcAdapterProxy.h | 3 --- ios/Classes/TiNfcNfcAdapterProxy.m | 16 ++++++++-------- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/ios/Classes/TiNfcNativeTagTechnologyProxy.h b/ios/Classes/TiNfcNativeTagTechnologyProxy.h index 36b4ae1..acfa0a0 100644 --- a/ios/Classes/TiNfcNativeTagTechnologyProxy.h +++ b/ios/Classes/TiNfcNativeTagTechnologyProxy.h @@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN @interface TiNfcNativeTagTechnologyProxy : TiNfcTagTechnologyProxy { NFCTagReaderSession *session; - TiNFCTagProxy *tag; + TiNfcTagProxy *tag; } @end diff --git a/ios/Classes/TiNfcNfcAdapterProxy.h b/ios/Classes/TiNfcNfcAdapterProxy.h index 5753139..82304b3 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.h +++ b/ios/Classes/TiNfcNfcAdapterProxy.h @@ -7,7 +7,6 @@ #if IS_IOS_11 -#import "NativeTagTechnologyProxy.h" #import "TiProxy.h" #import @@ -18,8 +17,6 @@ KrollCallback *_nNdefInvalidated; } -@property (nonatomic, strong) TagTechnology *tagTech; - #pragma mark Public API's - (NSNumber *)isEnabled:(id)unused; diff --git a/ios/Classes/TiNfcNfcAdapterProxy.m b/ios/Classes/TiNfcNfcAdapterProxy.m index 24b4e04..4c12748 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.m +++ b/ios/Classes/TiNfcNfcAdapterProxy.m @@ -10,7 +10,7 @@ #import "TiNfcNfcAdapterProxy.h" #import "TiMiFareUltralightTagTechnology.h" #import "TiNDEFTagTechnology.h" -#import "TiNFCTagProxy.h" +#import "TiNfcTagProxy.h" #import "TiNfcFTagTechnology.h" #import "TiNfcISODepTagTechnology.h" #import "TiNfcModule.h" @@ -91,16 +91,16 @@ - (void)invalidate:(id)unused - (TiMiFareUltralightTagTechnology *)createTagTechMifareUltralight:(id)args { ENSURE_SINGLE_ARG(args, NSArray); - TiNFCTagProxy *tag = [args objectAtIndex:0]; + TiNfcTagProxy *tag = [args objectAtIndex:0]; TiMiFareUltralightTagTechnology *mifareTag = [[TiMiFareUltralightTagTechnology alloc] init]; - mifareTag.session + //mifareTag.session return mifareTag; } - (TiNDEFTagTechnology *)createTagTechNdef:(id)args { ENSURE_SINGLE_ARG(args, NSArray); - TiNFCTagProxy *tag = [args objectAtIndex:0]; + TiNfcTagProxy *tag = [args objectAtIndex:0]; TiNDEFTagTechnology *ndefTag = [[TiNDEFTagTechnology alloc] init]; return ndefTag; } @@ -108,7 +108,7 @@ - (TiNDEFTagTechnology *)createTagTechNdef:(id)args - (TiNfcVTagTechnology *)createTagTechNfcV:(id)args { ENSURE_SINGLE_ARG(args, NSArray); - TiNFCTagProxy *tag = [args objectAtIndex:0]; + TiNfcTagProxy *tag = [args objectAtIndex:0]; TiNfcVTagTechnology *nfcvTag = [[TiNfcVTagTechnology alloc] init]; return nfcvTag; } @@ -116,7 +116,7 @@ - (TiNfcVTagTechnology *)createTagTechNfcV:(id)args - (TiNfcISODepTagTechnology *)createTagTechISODep:(id)args { ENSURE_SINGLE_ARG(args, NSArray); - TiNFCTagProxy *tag = [args objectAtIndex:0]; + TiNfcTagProxy *tag = [args objectAtIndex:0]; TiNfcISODepTagTechnology *isodepTag = [[TiNfcISODepTagTechnology alloc] init]; return isodepTag; } @@ -124,7 +124,7 @@ - (TiNfcISODepTagTechnology *)createTagTechISODep:(id)args - (TiNfcFTagTechnology *)createTagTechNfcF:(id)args { ENSURE_SINGLE_ARG(args, NSArray); - TiNFCTagProxy *tag = [args objectAtIndex:0]; + TiNfcTagProxy *tag = [args objectAtIndex:0]; TiNfcFTagTechnology *nfcfTag = [[TiNfcFTagTechnology alloc] init]; return nfcfTag; } @@ -231,7 +231,7 @@ - (void)tagReaderSession:(NFCTagReaderSession *)session didDetectTags:(NSArray<_ id tag = tags[0].asNFCMiFareTag; [self fireEvent:@"didDetectTags" withObject:@{ - @"tag" : [[TiNFCTagProxy alloc] _initWithPageContext:[self pageContext] andTag:tag], + @"tag" : [[TiNfcTagProxy alloc] _initWithPageContext:[self pageContext] andTag:tag], @"type" : NFC_TAG_READER_SESSION }]; } From ad464b3702cb426616f052b68f742e9e938c6710 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Thu, 14 Jan 2021 12:33:45 +0530 Subject: [PATCH 11/59] feat(ios): updated each tag class and adapter class --- ios/Classes/TiMiFareUltralightTagTechnology.h | 9 ++------- ios/Classes/TiMiFareUltralightTagTechnology.m | 13 ------------- ios/Classes/TiNDEFTagTechnology.h | 9 ++------- ios/Classes/TiNDEFTagTechnology.m | 13 ------------- ios/Classes/TiNfcFTagTechnology.h | 9 ++------- ios/Classes/TiNfcFTagTechnology.m | 13 ------------- ios/Classes/TiNfcISODepTagTechnology.h | 10 ++-------- ios/Classes/TiNfcISODepTagTechnology.m | 13 ------------- ios/Classes/TiNfcNfcAdapterProxy.m | 13 ++++++------- ios/Classes/TiNfcVTagTechnology.h | 10 ++-------- ios/Classes/TiNfcVTagTechnology.m | 13 ------------- 11 files changed, 16 insertions(+), 109 deletions(-) diff --git a/ios/Classes/TiMiFareUltralightTagTechnology.h b/ios/Classes/TiMiFareUltralightTagTechnology.h index d2537f5..620ac3f 100644 --- a/ios/Classes/TiMiFareUltralightTagTechnology.h +++ b/ios/Classes/TiMiFareUltralightTagTechnology.h @@ -5,18 +5,13 @@ * Please see the LICENSE included with this distribution for details. */ +#import "TiNfcTagProxy.h" #import #import NS_ASSUME_NONNULL_BEGIN -@interface TiMiFareUltralightTagTechnology : TiProxy { - id _mifareTag; -} - -- (id)_initWithPageContext:(id)context andMiFareTag:(id)mifareTag; - -- (id)mifareTag; +@interface TiMiFareUltralightTagTechnology : TiNfcTagProxy @end diff --git a/ios/Classes/TiMiFareUltralightTagTechnology.m b/ios/Classes/TiMiFareUltralightTagTechnology.m index b7ca86e..48fe621 100644 --- a/ios/Classes/TiMiFareUltralightTagTechnology.m +++ b/ios/Classes/TiMiFareUltralightTagTechnology.m @@ -9,17 +9,4 @@ @implementation TiMiFareUltralightTagTechnology -- (id)_initWithPageContext:(id)context andMiFareTag:(id)mifareTag -{ - if (self = [super _initWithPageContext:context]) { - _mifareTag = mifareTag; - } - return self; -} - -- (id)mifareTag; -{ - return _mifareTag; -} - @end diff --git a/ios/Classes/TiNDEFTagTechnology.h b/ios/Classes/TiNDEFTagTechnology.h index 38468dd..d680ad5 100644 --- a/ios/Classes/TiNDEFTagTechnology.h +++ b/ios/Classes/TiNDEFTagTechnology.h @@ -5,18 +5,13 @@ * Please see the LICENSE included with this distribution for details. */ +#import "TiNfcTagProxy.h" #import #import NS_ASSUME_NONNULL_BEGIN -@interface TiNDEFTagTechnology : TiProxy { - id _ndefTag; -} - -- (id)_initWithPageContext:(id)context andNDEFTag:(id)ndefTag; - -- (id)ndefTag; +@interface TiNDEFTagTechnology : TiNfcTagProxy @end diff --git a/ios/Classes/TiNDEFTagTechnology.m b/ios/Classes/TiNDEFTagTechnology.m index 6a22620..34b0e34 100644 --- a/ios/Classes/TiNDEFTagTechnology.m +++ b/ios/Classes/TiNDEFTagTechnology.m @@ -9,17 +9,4 @@ @implementation TiNDEFTagTechnology -- (id)_initWithPageContext:(id)context andNDEFTag:(id)ndefTag -{ - if (self = [super _initWithPageContext:context]) { - _ndefTag = ndefTag; - } - return self; -} - -- (id)ndefTag -{ - return _ndefTag; -} - @end diff --git a/ios/Classes/TiNfcFTagTechnology.h b/ios/Classes/TiNfcFTagTechnology.h index a37ecea..04635db 100644 --- a/ios/Classes/TiNfcFTagTechnology.h +++ b/ios/Classes/TiNfcFTagTechnology.h @@ -5,18 +5,13 @@ * Please see the LICENSE included with this distribution for details. */ +#import "TiNfcTagProxy.h" #import #import NS_ASSUME_NONNULL_BEGIN -@interface TiNfcFTagTechnology : TiProxy { - id _felicaTag; -} - -- (id)_initWithPageContext:(id)context andNFCFeliCaTag:(id)felicaTag; - -- (id)felicaTag; +@interface TiNfcFTagTechnology : TiNfcTagProxy @end diff --git a/ios/Classes/TiNfcFTagTechnology.m b/ios/Classes/TiNfcFTagTechnology.m index 63638be..dc9186e 100644 --- a/ios/Classes/TiNfcFTagTechnology.m +++ b/ios/Classes/TiNfcFTagTechnology.m @@ -9,17 +9,4 @@ @implementation TiNfcFTagTechnology -- (id)_initWithPageContext:(id)context andNFCFeliCaTag:(id)felicaTag -{ - if (self = [super _initWithPageContext:context]) { - _felicaTag = felicaTag; - } - return self; -} - -- (id)felicaTag; -{ - return _felicaTag; -} - @end diff --git a/ios/Classes/TiNfcISODepTagTechnology.h b/ios/Classes/TiNfcISODepTagTechnology.h index 7c605b6..93bf1e9 100644 --- a/ios/Classes/TiNfcISODepTagTechnology.h +++ b/ios/Classes/TiNfcISODepTagTechnology.h @@ -5,19 +5,13 @@ * Please see the LICENSE included with this distribution for details. */ +#import "TiNfcTagProxy.h" #import #import NS_ASSUME_NONNULL_BEGIN -@interface TiNfcISODepTagTechnology : TiProxy { - id _iso7816Tag; -} - -- (id)_initWithPageContext:(id)context andNFCISO7816Tag:(id)iso7816Tag; - -- (id)iso7816Tag; - +@interface TiNfcISODepTagTechnology : TiNfcTagProxy @end NS_ASSUME_NONNULL_END diff --git a/ios/Classes/TiNfcISODepTagTechnology.m b/ios/Classes/TiNfcISODepTagTechnology.m index fbbd3ea..980ef44 100644 --- a/ios/Classes/TiNfcISODepTagTechnology.m +++ b/ios/Classes/TiNfcISODepTagTechnology.m @@ -9,17 +9,4 @@ @implementation TiNfcISODepTagTechnology -- (id)_initWithPageContext:(id)context andNFCISO7816Tag:(id)iso7816Tag -{ - if (self = [super _initWithPageContext:context]) { - _iso7816Tag = iso7816Tag; - } - return self; -} - -- (id)iso7816Tag; -{ - return _iso7816Tag; -} - @end diff --git a/ios/Classes/TiNfcNfcAdapterProxy.m b/ios/Classes/TiNfcNfcAdapterProxy.m index 4c12748..0011572 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.m +++ b/ios/Classes/TiNfcNfcAdapterProxy.m @@ -10,11 +10,11 @@ #import "TiNfcNfcAdapterProxy.h" #import "TiMiFareUltralightTagTechnology.h" #import "TiNDEFTagTechnology.h" -#import "TiNfcTagProxy.h" #import "TiNfcFTagTechnology.h" #import "TiNfcISODepTagTechnology.h" #import "TiNfcModule.h" #import "TiNfcNdefMessageProxy.h" +#import "TiNfcTagProxy.h" #import "TiNfcVTagTechnology.h" #import "TiUtils.h" @@ -92,8 +92,7 @@ - (TiMiFareUltralightTagTechnology *)createTagTechMifareUltralight:(id)args { ENSURE_SINGLE_ARG(args, NSArray); TiNfcTagProxy *tag = [args objectAtIndex:0]; - TiMiFareUltralightTagTechnology *mifareTag = [[TiMiFareUltralightTagTechnology alloc] init]; - //mifareTag.session + TiMiFareUltralightTagTechnology *mifareTag = [[TiMiFareUltralightTagTechnology alloc] _initWithPageContext:[self pageContext] andTag:tag.tag]; return mifareTag; } @@ -101,7 +100,7 @@ - (TiNDEFTagTechnology *)createTagTechNdef:(id)args { ENSURE_SINGLE_ARG(args, NSArray); TiNfcTagProxy *tag = [args objectAtIndex:0]; - TiNDEFTagTechnology *ndefTag = [[TiNDEFTagTechnology alloc] init]; + TiNDEFTagTechnology *ndefTag = [[TiNDEFTagTechnology alloc] _initWithPageContext:[self pageContext] andTag:tag.tag]; return ndefTag; } @@ -109,7 +108,7 @@ - (TiNfcVTagTechnology *)createTagTechNfcV:(id)args { ENSURE_SINGLE_ARG(args, NSArray); TiNfcTagProxy *tag = [args objectAtIndex:0]; - TiNfcVTagTechnology *nfcvTag = [[TiNfcVTagTechnology alloc] init]; + TiNfcVTagTechnology *nfcvTag = [[TiNfcVTagTechnology alloc] _initWithPageContext:[self pageContext] andTag:tag.tag]; return nfcvTag; } @@ -117,7 +116,7 @@ - (TiNfcISODepTagTechnology *)createTagTechISODep:(id)args { ENSURE_SINGLE_ARG(args, NSArray); TiNfcTagProxy *tag = [args objectAtIndex:0]; - TiNfcISODepTagTechnology *isodepTag = [[TiNfcISODepTagTechnology alloc] init]; + TiNfcISODepTagTechnology *isodepTag = [[TiNfcISODepTagTechnology alloc] _initWithPageContext:[self pageContext] andTag:tag.tag]; return isodepTag; } @@ -125,7 +124,7 @@ - (TiNfcFTagTechnology *)createTagTechNfcF:(id)args { ENSURE_SINGLE_ARG(args, NSArray); TiNfcTagProxy *tag = [args objectAtIndex:0]; - TiNfcFTagTechnology *nfcfTag = [[TiNfcFTagTechnology alloc] init]; + TiNfcFTagTechnology *nfcfTag = [[TiNfcFTagTechnology alloc] _initWithPageContext:[self pageContext] andTag:tag.tag]; return nfcfTag; } diff --git a/ios/Classes/TiNfcVTagTechnology.h b/ios/Classes/TiNfcVTagTechnology.h index 09ea684..1fc903b 100644 --- a/ios/Classes/TiNfcVTagTechnology.h +++ b/ios/Classes/TiNfcVTagTechnology.h @@ -5,19 +5,13 @@ * Please see the LICENSE included with this distribution for details. */ +#import "TiNfcTagProxy.h" #import #import NS_ASSUME_NONNULL_BEGIN -@interface TiNfcVTagTechnology : TiProxy { - id _iso15693Tag; -} - -- (id)_initWithPageContext:(id)context andNFCISO15693Tag:(id)iso15693Tag; - -- (id)iso15693Tag; - +@interface TiNfcVTagTechnology : TiNfcTagProxy @end NS_ASSUME_NONNULL_END diff --git a/ios/Classes/TiNfcVTagTechnology.m b/ios/Classes/TiNfcVTagTechnology.m index 9256400..6d01fa3 100644 --- a/ios/Classes/TiNfcVTagTechnology.m +++ b/ios/Classes/TiNfcVTagTechnology.m @@ -9,17 +9,4 @@ @implementation TiNfcVTagTechnology -- (id)_initWithPageContext:(id)context andNFCISO15693Tag:(id)iso15693Tag -{ - if (self = [super _initWithPageContext:context]) { - _iso15693Tag = iso15693Tag; - } - return self; -} - -- (id)iso15693Tag -{ - return _iso15693Tag; -} - @end From 91ec84dc0fdd860dd40a2b7a5d245eef90525baf Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Fri, 15 Jan 2021 10:52:03 +0530 Subject: [PATCH 12/59] feat(ios): inherited native tag tech class for all the native tags --- ios/Classes/TiMiFareUltralightTagTechnology.h | 4 ++-- ios/Classes/TiNfcFTagTechnology.h | 4 ++-- ios/Classes/TiNfcISODepTagTechnology.h | 4 ++-- ios/Classes/TiNfcNativeTagTechnologyProxy.h | 1 + ios/Classes/TiNfcNativeTagTechnologyProxy.m | 14 ++++++++--- ios/Classes/TiNfcNfcAdapterProxy.m | 23 ++++++++----------- ios/Classes/TiNfcVTagTechnology.h | 4 ++-- 7 files changed, 29 insertions(+), 25 deletions(-) diff --git a/ios/Classes/TiMiFareUltralightTagTechnology.h b/ios/Classes/TiMiFareUltralightTagTechnology.h index 620ac3f..4dd3dbe 100644 --- a/ios/Classes/TiMiFareUltralightTagTechnology.h +++ b/ios/Classes/TiMiFareUltralightTagTechnology.h @@ -5,13 +5,13 @@ * Please see the LICENSE included with this distribution for details. */ -#import "TiNfcTagProxy.h" +#import "TiNfcNativeTagTechnologyProxy.h" #import #import NS_ASSUME_NONNULL_BEGIN -@interface TiMiFareUltralightTagTechnology : TiNfcTagProxy +@interface TiMiFareUltralightTagTechnology : TiNfcNativeTagTechnologyProxy @end diff --git a/ios/Classes/TiNfcFTagTechnology.h b/ios/Classes/TiNfcFTagTechnology.h index 04635db..73fda65 100644 --- a/ios/Classes/TiNfcFTagTechnology.h +++ b/ios/Classes/TiNfcFTagTechnology.h @@ -5,13 +5,13 @@ * Please see the LICENSE included with this distribution for details. */ -#import "TiNfcTagProxy.h" +#import "TiNfcNativeTagTechnologyProxy.h" #import #import NS_ASSUME_NONNULL_BEGIN -@interface TiNfcFTagTechnology : TiNfcTagProxy +@interface TiNfcFTagTechnology : TiNfcNativeTagTechnologyProxy @end diff --git a/ios/Classes/TiNfcISODepTagTechnology.h b/ios/Classes/TiNfcISODepTagTechnology.h index 93bf1e9..dca9e13 100644 --- a/ios/Classes/TiNfcISODepTagTechnology.h +++ b/ios/Classes/TiNfcISODepTagTechnology.h @@ -5,13 +5,13 @@ * Please see the LICENSE included with this distribution for details. */ -#import "TiNfcTagProxy.h" +#import "TiNfcNativeTagTechnologyProxy.h" #import #import NS_ASSUME_NONNULL_BEGIN -@interface TiNfcISODepTagTechnology : TiNfcTagProxy +@interface TiNfcISODepTagTechnology : TiNfcNativeTagTechnologyProxy @end NS_ASSUME_NONNULL_END diff --git a/ios/Classes/TiNfcNativeTagTechnologyProxy.h b/ios/Classes/TiNfcNativeTagTechnologyProxy.h index acfa0a0..61aed0a 100644 --- a/ios/Classes/TiNfcNativeTagTechnologyProxy.h +++ b/ios/Classes/TiNfcNativeTagTechnologyProxy.h @@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN NFCTagReaderSession *session; TiNfcTagProxy *tag; } +- (id)_initWithPageContext:(id)context andTag:(TiNfcTagProxy *)tag; @end diff --git a/ios/Classes/TiNfcNativeTagTechnologyProxy.m b/ios/Classes/TiNfcNativeTagTechnologyProxy.m index 2723548..f8bfb3e 100644 --- a/ios/Classes/TiNfcNativeTagTechnologyProxy.m +++ b/ios/Classes/TiNfcNativeTagTechnologyProxy.m @@ -13,11 +13,19 @@ @implementation TiNfcNativeTagTechnologyProxy +- (id)_initWithPageContext:(id)context andTag:(TiNfcTagProxy *)tag +{ + if (self = [super _initWithPageContext:context]) { + tag = tag; + } + return self; +} + #pragma mark Public API's - (void)connect:(id)unused { - [session connectToTag:tag + [session connectToTag:tag.tag completionHandler:^(NSError *_Nullable error) { if (![self _hasListeners:@"didConnectTag"]) { return; @@ -27,14 +35,14 @@ - (void)connect:(id)unused @"errorCode" : NUMINTEGER([error code]), @"errorDescription" : [error localizedDescription], @"errorDomain" : [error domain], - @"tag" : [[TiNfcTagProxy alloc] _initWithPageContext:[self pageContext] andTag:tag] + @"tag" : [[TiNfcTagProxy alloc] _initWithPageContext:[self pageContext] andTag:tag.tag] }]; }]; } - (NSNumber *)isConnected:(id)unused { - return [NSNumber numberWithBool:session.connectedTag == tag ? YES : NO]; + return [NSNumber numberWithBool:session.connectedTag == tag.tag ? YES : NO]; } @end diff --git a/ios/Classes/TiNfcNfcAdapterProxy.m b/ios/Classes/TiNfcNfcAdapterProxy.m index 0011572..3cb3c13 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.m +++ b/ios/Classes/TiNfcNfcAdapterProxy.m @@ -90,41 +90,36 @@ - (void)invalidate:(id)unused - (TiMiFareUltralightTagTechnology *)createTagTechMifareUltralight:(id)args { - ENSURE_SINGLE_ARG(args, NSArray); - TiNfcTagProxy *tag = [args objectAtIndex:0]; - TiMiFareUltralightTagTechnology *mifareTag = [[TiMiFareUltralightTagTechnology alloc] _initWithPageContext:[self pageContext] andTag:tag.tag]; + TiNfcTagProxy *tag = [args objectForKey:@"tag"]; + TiMiFareUltralightTagTechnology *mifareTag = [[TiMiFareUltralightTagTechnology alloc] _initWithPageContext:[self pageContext] andTag:tag]; return mifareTag; } - (TiNDEFTagTechnology *)createTagTechNdef:(id)args { - ENSURE_SINGLE_ARG(args, NSArray); - TiNfcTagProxy *tag = [args objectAtIndex:0]; + TiNfcTagProxy *tag = [args objectForKey:@"tag"]; TiNDEFTagTechnology *ndefTag = [[TiNDEFTagTechnology alloc] _initWithPageContext:[self pageContext] andTag:tag.tag]; return ndefTag; } - (TiNfcVTagTechnology *)createTagTechNfcV:(id)args { - ENSURE_SINGLE_ARG(args, NSArray); - TiNfcTagProxy *tag = [args objectAtIndex:0]; - TiNfcVTagTechnology *nfcvTag = [[TiNfcVTagTechnology alloc] _initWithPageContext:[self pageContext] andTag:tag.tag]; + TiNfcTagProxy *tag = [args objectForKey:@"tag"]; + TiNfcVTagTechnology *nfcvTag = [[TiNfcVTagTechnology alloc] _initWithPageContext:[self pageContext] andTag:tag]; return nfcvTag; } - (TiNfcISODepTagTechnology *)createTagTechISODep:(id)args { - ENSURE_SINGLE_ARG(args, NSArray); - TiNfcTagProxy *tag = [args objectAtIndex:0]; - TiNfcISODepTagTechnology *isodepTag = [[TiNfcISODepTagTechnology alloc] _initWithPageContext:[self pageContext] andTag:tag.tag]; + TiNfcTagProxy *tag = [args objectForKey:@"tag"]; + TiNfcISODepTagTechnology *isodepTag = [[TiNfcISODepTagTechnology alloc] _initWithPageContext:[self pageContext] andTag:tag]; return isodepTag; } - (TiNfcFTagTechnology *)createTagTechNfcF:(id)args { - ENSURE_SINGLE_ARG(args, NSArray); - TiNfcTagProxy *tag = [args objectAtIndex:0]; - TiNfcFTagTechnology *nfcfTag = [[TiNfcFTagTechnology alloc] _initWithPageContext:[self pageContext] andTag:tag.tag]; + TiNfcTagProxy *tag = [args objectForKey:@"tag"]; + TiNfcFTagTechnology *nfcfTag = [[TiNfcFTagTechnology alloc] _initWithPageContext:[self pageContext] andTag:tag]; return nfcfTag; } diff --git a/ios/Classes/TiNfcVTagTechnology.h b/ios/Classes/TiNfcVTagTechnology.h index 1fc903b..30abb99 100644 --- a/ios/Classes/TiNfcVTagTechnology.h +++ b/ios/Classes/TiNfcVTagTechnology.h @@ -5,13 +5,13 @@ * Please see the LICENSE included with this distribution for details. */ -#import "TiNfcTagProxy.h" +#import "TiNfcNativeTagTechnologyProxy.h" #import #import NS_ASSUME_NONNULL_BEGIN -@interface TiNfcVTagTechnology : TiNfcTagProxy +@interface TiNfcVTagTechnology : TiNfcNativeTagTechnologyProxy @end NS_ASSUME_NONNULL_END From 478b7d3c385ea45b94dc6dc80b024316f6abba16 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Fri, 15 Jan 2021 13:16:09 +0530 Subject: [PATCH 13/59] feat(ios): added session reference for all the native and ndef tag proxy class --- ios/Classes/TiNFCTagProxy.h | 3 ++- ios/Classes/TiNFCTagProxy.m | 3 ++- ios/Classes/TiNfcNativeTagTechnologyProxy.h | 2 +- ios/Classes/TiNfcNativeTagTechnologyProxy.m | 5 ++-- ios/Classes/TiNfcNfcAdapterProxy.m | 28 +++++++++++++++------ 5 files changed, 29 insertions(+), 12 deletions(-) diff --git a/ios/Classes/TiNFCTagProxy.h b/ios/Classes/TiNFCTagProxy.h index 2da4968..7d74323 100644 --- a/ios/Classes/TiNFCTagProxy.h +++ b/ios/Classes/TiNFCTagProxy.h @@ -12,10 +12,11 @@ NS_ASSUME_NONNULL_BEGIN @interface TiNfcTagProxy : TiProxy { + NFCNDEFReaderSession *session; id _tag; } -- (id)_initWithPageContext:(id)context andTag:(id)tag; +- (id)_initWithPageContext:(id)context andSession:(NFCNDEFReaderSession *)session andTag:(id)tag; #pragma mark Public API's diff --git a/ios/Classes/TiNFCTagProxy.m b/ios/Classes/TiNFCTagProxy.m index c4ddc6f..975145a 100644 --- a/ios/Classes/TiNFCTagProxy.m +++ b/ios/Classes/TiNFCTagProxy.m @@ -12,10 +12,11 @@ @implementation TiNfcTagProxy #pragma mark Internal -- (id)_initWithPageContext:(id)context andTag:(id)tag +- (id)_initWithPageContext:(id)context andSession:(NFCNDEFReaderSession *)session andTag:(id)tag { if (self = [super _initWithPageContext:context]) { _tag = tag; + session = session; } return self; } diff --git a/ios/Classes/TiNfcNativeTagTechnologyProxy.h b/ios/Classes/TiNfcNativeTagTechnologyProxy.h index 61aed0a..a702328 100644 --- a/ios/Classes/TiNfcNativeTagTechnologyProxy.h +++ b/ios/Classes/TiNfcNativeTagTechnologyProxy.h @@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN NFCTagReaderSession *session; TiNfcTagProxy *tag; } -- (id)_initWithPageContext:(id)context andTag:(TiNfcTagProxy *)tag; +- (id)_initWithPageContext:(id)context andSession:(NFCTagReaderSession *)session andTag:(TiNfcTagProxy *)tag; @end diff --git a/ios/Classes/TiNfcNativeTagTechnologyProxy.m b/ios/Classes/TiNfcNativeTagTechnologyProxy.m index f8bfb3e..c4ed4d2 100644 --- a/ios/Classes/TiNfcNativeTagTechnologyProxy.m +++ b/ios/Classes/TiNfcNativeTagTechnologyProxy.m @@ -13,10 +13,11 @@ @implementation TiNfcNativeTagTechnologyProxy -- (id)_initWithPageContext:(id)context andTag:(TiNfcTagProxy *)tag +- (id)_initWithPageContext:(id)context andSession:(NFCTagReaderSession *)session andTag:(TiNfcTagProxy *)tag { if (self = [super _initWithPageContext:context]) { tag = tag; + session = session; } return self; } @@ -35,7 +36,7 @@ - (void)connect:(id)unused @"errorCode" : NUMINTEGER([error code]), @"errorDescription" : [error localizedDescription], @"errorDomain" : [error domain], - @"tag" : [[TiNfcTagProxy alloc] _initWithPageContext:[self pageContext] andTag:tag.tag] + @"tag" : [self _initWithPageContext:[self pageContext] andSession:session andTag:tag] }]; }]; } diff --git a/ios/Classes/TiNfcNfcAdapterProxy.m b/ios/Classes/TiNfcNfcAdapterProxy.m index 3cb3c13..67caf0b 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.m +++ b/ios/Classes/TiNfcNfcAdapterProxy.m @@ -90,36 +90,51 @@ - (void)invalidate:(id)unused - (TiMiFareUltralightTagTechnology *)createTagTechMifareUltralight:(id)args { + if ([args objectForKey:@"tag"] == nil) { + return; + } TiNfcTagProxy *tag = [args objectForKey:@"tag"]; - TiMiFareUltralightTagTechnology *mifareTag = [[TiMiFareUltralightTagTechnology alloc] _initWithPageContext:[self pageContext] andTag:tag]; + TiMiFareUltralightTagTechnology *mifareTag = [[TiMiFareUltralightTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tag]; return mifareTag; } - (TiNDEFTagTechnology *)createTagTechNdef:(id)args { + if ([args objectForKey:@"tag"] == nil) { + return; + } TiNfcTagProxy *tag = [args objectForKey:@"tag"]; - TiNDEFTagTechnology *ndefTag = [[TiNDEFTagTechnology alloc] _initWithPageContext:[self pageContext] andTag:tag.tag]; + TiNDEFTagTechnology *ndefTag = [[TiNDEFTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcSession andTag:tag.tag]; return ndefTag; } - (TiNfcVTagTechnology *)createTagTechNfcV:(id)args { + if ([args objectForKey:@"tag"] == nil) { + return; + } TiNfcTagProxy *tag = [args objectForKey:@"tag"]; - TiNfcVTagTechnology *nfcvTag = [[TiNfcVTagTechnology alloc] _initWithPageContext:[self pageContext] andTag:tag]; + TiNfcVTagTechnology *nfcvTag = [[TiNfcVTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tag]; return nfcvTag; } - (TiNfcISODepTagTechnology *)createTagTechISODep:(id)args { + if ([args objectForKey:@"tag"] == nil) { + return; + } TiNfcTagProxy *tag = [args objectForKey:@"tag"]; - TiNfcISODepTagTechnology *isodepTag = [[TiNfcISODepTagTechnology alloc] _initWithPageContext:[self pageContext] andTag:tag]; + TiNfcISODepTagTechnology *isodepTag = [[TiNfcISODepTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tag]; return isodepTag; } - (TiNfcFTagTechnology *)createTagTechNfcF:(id)args { + if ([args objectForKey:@"tag"] == nil) { + return; + } TiNfcTagProxy *tag = [args objectForKey:@"tag"]; - TiNfcFTagTechnology *nfcfTag = [[TiNfcFTagTechnology alloc] _initWithPageContext:[self pageContext] andTag:tag]; + TiNfcFTagTechnology *nfcfTag = [[TiNfcFTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tag]; return nfcfTag; } @@ -222,10 +237,9 @@ - (void)tagReaderSession:(NFCTagReaderSession *)session didDetectTags:(NSArray<_ if (![self _hasListeners:@"didDetectTags"]) { return; } - id tag = tags[0].asNFCMiFareTag; [self fireEvent:@"didDetectTags" withObject:@{ - @"tag" : [[TiNfcTagProxy alloc] _initWithPageContext:[self pageContext] andTag:tag], + @"tag" : [[TiNfcNativeTagTechnologyProxy alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tags[0]], @"type" : NFC_TAG_READER_SESSION }]; } From 472103f6275f158769e7a308f9d91c264ed56f88 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Mon, 18 Jan 2021 12:14:59 +0530 Subject: [PATCH 14/59] update(ios): updated the module prefix to mifare and ndef class proxy --- ...h => TiNfcMiFareUltralightTagTechnology.h} | 2 +- ...m => TiNfcMiFareUltralightTagTechnology.m} | 4 +-- ...gTechnology.h => TiNfcNDEFTagTechnology.h} | 2 +- ...gTechnology.m => TiNfcNDEFTagTechnology.m} | 4 +-- ios/Classes/TiNfcNfcAdapterProxy.m | 12 +++---- ios/ti.nfc.xcodeproj/project.pbxproj | 34 +++++++++---------- 6 files changed, 28 insertions(+), 30 deletions(-) rename ios/Classes/{TiMiFareUltralightTagTechnology.h => TiNfcMiFareUltralightTagTechnology.h} (83%) rename ios/Classes/{TiMiFareUltralightTagTechnology.m => TiNfcMiFareUltralightTagTechnology.m} (70%) rename ios/Classes/{TiNDEFTagTechnology.h => TiNfcNDEFTagTechnology.h} (88%) rename ios/Classes/{TiNDEFTagTechnology.m => TiNfcNDEFTagTechnology.m} (76%) diff --git a/ios/Classes/TiMiFareUltralightTagTechnology.h b/ios/Classes/TiNfcMiFareUltralightTagTechnology.h similarity index 83% rename from ios/Classes/TiMiFareUltralightTagTechnology.h rename to ios/Classes/TiNfcMiFareUltralightTagTechnology.h index 4dd3dbe..664ee5d 100644 --- a/ios/Classes/TiMiFareUltralightTagTechnology.h +++ b/ios/Classes/TiNfcMiFareUltralightTagTechnology.h @@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface TiMiFareUltralightTagTechnology : TiNfcNativeTagTechnologyProxy +@interface TiNfcMiFareUltralightTagTechnology : TiNfcNativeTagTechnologyProxy @end diff --git a/ios/Classes/TiMiFareUltralightTagTechnology.m b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m similarity index 70% rename from ios/Classes/TiMiFareUltralightTagTechnology.m rename to ios/Classes/TiNfcMiFareUltralightTagTechnology.m index 48fe621..c0289d5 100644 --- a/ios/Classes/TiMiFareUltralightTagTechnology.m +++ b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m @@ -5,8 +5,8 @@ * Please see the LICENSE included with this distribution for details. */ -#import "TiMiFareUltralightTagTechnology.h" +#import "TiNfcMiFareUltralightTagTechnology.h" -@implementation TiMiFareUltralightTagTechnology +@implementation TiNfcMiFareUltralightTagTechnology @end diff --git a/ios/Classes/TiNDEFTagTechnology.h b/ios/Classes/TiNfcNDEFTagTechnology.h similarity index 88% rename from ios/Classes/TiNDEFTagTechnology.h rename to ios/Classes/TiNfcNDEFTagTechnology.h index d680ad5..6788969 100644 --- a/ios/Classes/TiNDEFTagTechnology.h +++ b/ios/Classes/TiNfcNDEFTagTechnology.h @@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface TiNDEFTagTechnology : TiNfcTagProxy +@interface TiNfcNDEFTagTechnology : TiNfcTagProxy @end diff --git a/ios/Classes/TiNDEFTagTechnology.m b/ios/Classes/TiNfcNDEFTagTechnology.m similarity index 76% rename from ios/Classes/TiNDEFTagTechnology.m rename to ios/Classes/TiNfcNDEFTagTechnology.m index 34b0e34..1971dba 100644 --- a/ios/Classes/TiNDEFTagTechnology.m +++ b/ios/Classes/TiNfcNDEFTagTechnology.m @@ -5,8 +5,8 @@ * Please see the LICENSE included with this distribution for details. */ -#import "TiNDEFTagTechnology.h" +#import "TiNfcNDEFTagTechnology.h" -@implementation TiNDEFTagTechnology +@implementation TiNfcNDEFTagTechnology @end diff --git a/ios/Classes/TiNfcNfcAdapterProxy.m b/ios/Classes/TiNfcNfcAdapterProxy.m index 67caf0b..f4a412b 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.m +++ b/ios/Classes/TiNfcNfcAdapterProxy.m @@ -8,11 +8,11 @@ #if IS_IOS_11 #import "TiNfcNfcAdapterProxy.h" -#import "TiMiFareUltralightTagTechnology.h" -#import "TiNDEFTagTechnology.h" #import "TiNfcFTagTechnology.h" #import "TiNfcISODepTagTechnology.h" +#import "TiNfcMiFareUltralightTagTechnology.h" #import "TiNfcModule.h" +#import "TiNfcNDEFTagTechnology.h" #import "TiNfcNdefMessageProxy.h" #import "TiNfcTagProxy.h" #import "TiNfcVTagTechnology.h" @@ -88,23 +88,23 @@ - (void)invalidate:(id)unused } } -- (TiMiFareUltralightTagTechnology *)createTagTechMifareUltralight:(id)args +- (TiNfcMiFareUltralightTagTechnology *)createTagTechMifareUltralight:(id)args { if ([args objectForKey:@"tag"] == nil) { return; } TiNfcTagProxy *tag = [args objectForKey:@"tag"]; - TiMiFareUltralightTagTechnology *mifareTag = [[TiMiFareUltralightTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tag]; + TiNfcMiFareUltralightTagTechnology *mifareTag = [[TiNfcMiFareUltralightTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tag]; return mifareTag; } -- (TiNDEFTagTechnology *)createTagTechNdef:(id)args +- (TiNfcNDEFTagTechnology *)createTagTechNdef:(id)args { if ([args objectForKey:@"tag"] == nil) { return; } TiNfcTagProxy *tag = [args objectForKey:@"tag"]; - TiNDEFTagTechnology *ndefTag = [[TiNDEFTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcSession andTag:tag.tag]; + TiNfcNDEFTagTechnology *ndefTag = [[TiNfcNDEFTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcSession andTag:tag.tag]; return ndefTag; } diff --git a/ios/ti.nfc.xcodeproj/project.pbxproj b/ios/ti.nfc.xcodeproj/project.pbxproj index dc3e99c..299931d 100644 --- a/ios/ti.nfc.xcodeproj/project.pbxproj +++ b/ios/ti.nfc.xcodeproj/project.pbxproj @@ -37,16 +37,16 @@ DBF688341EEB4B3500009357 /* TiNfcNdefMessageProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = DBF688321EEB4B3500009357 /* TiNfcNdefMessageProxy.m */; }; DBF688371EEB4CB300009357 /* TiNfcNdefRecordProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = DBF688351EEB4CB300009357 /* TiNfcNdefRecordProxy.h */; }; DBF688381EEB4CB300009357 /* TiNfcNdefRecordProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = DBF688361EEB4CB300009357 /* TiNfcNdefRecordProxy.m */; }; + E2DA8DD025A3526B006F1DFA /* TiNfcMiFareUltralightTagTechnology.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8DCE25A3526B006F1DFA /* TiNfcMiFareUltralightTagTechnology.h */; }; + E2DA8DD125A3526B006F1DFA /* TiNfcMiFareUltralightTagTechnology.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8DCF25A3526B006F1DFA /* TiNfcMiFareUltralightTagTechnology.m */; }; E2DA8DF825AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8DF625AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.h */; }; E2DA8DF925AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8DF725AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.m */; }; E2DA8DFE25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8DFC25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.h */; }; E2DA8DFF25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8DFD25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m */; }; E2DA8E0C25AEE6AE006F1DFA /* TiNfcTagProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8E0A25AEE6AD006F1DFA /* TiNfcTagProxy.h */; }; E2DA8E0D25AEE6AE006F1DFA /* TiNfcTagProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8E0B25AEE6AD006F1DFA /* TiNfcTagProxy.m */; }; - E2DA8DD025A3526B006F1DFA /* TiMiFareUltralightTagTechnology.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8DCE25A3526B006F1DFA /* TiMiFareUltralightTagTechnology.h */; }; - E2DA8DD125A3526B006F1DFA /* TiMiFareUltralightTagTechnology.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8DCF25A3526B006F1DFA /* TiMiFareUltralightTagTechnology.m */; }; - E2DA8E2225AF1705006F1DFA /* TiNDEFTagTechnology.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8E2025AF1705006F1DFA /* TiNDEFTagTechnology.h */; }; - E2DA8E2325AF1705006F1DFA /* TiNDEFTagTechnology.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8E2125AF1705006F1DFA /* TiNDEFTagTechnology.m */; }; + E2DA8E2225AF1705006F1DFA /* TiNfcNDEFTagTechnology.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8E2025AF1705006F1DFA /* TiNfcNDEFTagTechnology.h */; }; + E2DA8E2325AF1705006F1DFA /* TiNfcNDEFTagTechnology.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8E2125AF1705006F1DFA /* TiNfcNDEFTagTechnology.m */; }; E2DA8E3025AF1AB7006F1DFA /* TiNfcVTagTechnology.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8E2E25AF1AB7006F1DFA /* TiNfcVTagTechnology.h */; }; E2DA8E3125AF1AB7006F1DFA /* TiNfcVTagTechnology.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8E2F25AF1AB7006F1DFA /* TiNfcVTagTechnology.m */; }; E2DA8E3625AF1BA2006F1DFA /* TiNfcISODepTagTechnology.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8E3425AF1BA2006F1DFA /* TiNfcISODepTagTechnology.h */; }; @@ -83,16 +83,16 @@ DBF688321EEB4B3500009357 /* TiNfcNdefMessageProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcNdefMessageProxy.m; path = Classes/TiNfcNdefMessageProxy.m; sourceTree = ""; }; DBF688351EEB4CB300009357 /* TiNfcNdefRecordProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcNdefRecordProxy.h; path = Classes/TiNfcNdefRecordProxy.h; sourceTree = ""; }; DBF688361EEB4CB300009357 /* TiNfcNdefRecordProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcNdefRecordProxy.m; path = Classes/TiNfcNdefRecordProxy.m; sourceTree = ""; }; + E2DA8DCE25A3526B006F1DFA /* TiNfcMiFareUltralightTagTechnology.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcMiFareUltralightTagTechnology.h; path = Classes/TiNfcMiFareUltralightTagTechnology.h; sourceTree = ""; }; + E2DA8DCF25A3526B006F1DFA /* TiNfcMiFareUltralightTagTechnology.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcMiFareUltralightTagTechnology.m; path = Classes/TiNfcMiFareUltralightTagTechnology.m; sourceTree = ""; }; E2DA8DF625AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcTagTechnologyProxy.h; path = Classes/TiNfcTagTechnologyProxy.h; sourceTree = ""; }; E2DA8DF725AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcTagTechnologyProxy.m; path = Classes/TiNfcTagTechnologyProxy.m; sourceTree = ""; }; E2DA8DFC25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcNativeTagTechnologyProxy.h; path = Classes/TiNfcNativeTagTechnologyProxy.h; sourceTree = ""; }; E2DA8DFD25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcNativeTagTechnologyProxy.m; path = Classes/TiNfcNativeTagTechnologyProxy.m; sourceTree = ""; }; E2DA8E0A25AEE6AD006F1DFA /* TiNfcTagProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcTagProxy.h; path = Classes/TiNfcTagProxy.h; sourceTree = ""; }; E2DA8E0B25AEE6AD006F1DFA /* TiNfcTagProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcTagProxy.m; path = Classes/TiNfcTagProxy.m; sourceTree = ""; }; - E2DA8DCE25A3526B006F1DFA /* TiMiFareUltralightTagTechnology.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiMiFareUltralightTagTechnology.h; path = Classes/TiMiFareUltralightTagTechnology.h; sourceTree = ""; }; - E2DA8DCF25A3526B006F1DFA /* TiMiFareUltralightTagTechnology.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiMiFareUltralightTagTechnology.m; path = Classes/TiMiFareUltralightTagTechnology.m; sourceTree = ""; }; - E2DA8E2025AF1705006F1DFA /* TiNDEFTagTechnology.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNDEFTagTechnology.h; path = Classes/TiNDEFTagTechnology.h; sourceTree = ""; }; - E2DA8E2125AF1705006F1DFA /* TiNDEFTagTechnology.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNDEFTagTechnology.m; path = Classes/TiNDEFTagTechnology.m; sourceTree = ""; }; + E2DA8E2025AF1705006F1DFA /* TiNfcNDEFTagTechnology.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcNDEFTagTechnology.h; path = Classes/TiNfcNDEFTagTechnology.h; sourceTree = ""; }; + E2DA8E2125AF1705006F1DFA /* TiNfcNDEFTagTechnology.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcNDEFTagTechnology.m; path = Classes/TiNfcNDEFTagTechnology.m; sourceTree = ""; }; E2DA8E2E25AF1AB7006F1DFA /* TiNfcVTagTechnology.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcVTagTechnology.h; path = Classes/TiNfcVTagTechnology.h; sourceTree = ""; }; E2DA8E2F25AF1AB7006F1DFA /* TiNfcVTagTechnology.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcVTagTechnology.m; path = Classes/TiNfcVTagTechnology.m; sourceTree = ""; }; E2DA8E3425AF1BA2006F1DFA /* TiNfcISODepTagTechnology.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcISODepTagTechnology.h; path = Classes/TiNfcISODepTagTechnology.h; sourceTree = ""; }; @@ -204,10 +204,10 @@ E2DA8DFD25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m */, E2DA8E0A25AEE6AD006F1DFA /* TiNfcTagProxy.h */, E2DA8E0B25AEE6AD006F1DFA /* TiNfcTagProxy.m */, - E2DA8DCE25A3526B006F1DFA /* TiMiFareUltralightTagTechnology.h */, - E2DA8DCF25A3526B006F1DFA /* TiMiFareUltralightTagTechnology.m */, - E2DA8E2025AF1705006F1DFA /* TiNDEFTagTechnology.h */, - E2DA8E2125AF1705006F1DFA /* TiNDEFTagTechnology.m */, + E2DA8DCE25A3526B006F1DFA /* TiNfcMiFareUltralightTagTechnology.h */, + E2DA8DCF25A3526B006F1DFA /* TiNfcMiFareUltralightTagTechnology.m */, + E2DA8E2025AF1705006F1DFA /* TiNfcNDEFTagTechnology.h */, + E2DA8E2125AF1705006F1DFA /* TiNfcNDEFTagTechnology.m */, E2DA8E2E25AF1AB7006F1DFA /* TiNfcVTagTechnology.h */, E2DA8E2F25AF1AB7006F1DFA /* TiNfcVTagTechnology.m */, E2DA8E3425AF1BA2006F1DFA /* TiNfcISODepTagTechnology.h */, @@ -234,11 +234,9 @@ 24DD6CF91134B3F500162E58 /* TiNfcModule.h in Headers */, E2DA8E0C25AEE6AE006F1DFA /* TiNfcTagProxy.h in Headers */, E2DA8E3625AF1BA2006F1DFA /* TiNfcISODepTagTechnology.h in Headers */, - E22E2A372580B206004C52F1 /* NativeTagTechnologyProxy.h in Headers */, 24DD6CF91134B3F500162E58 /* TiNfcModule.h in Headers */, - E2DA8E2225AF1705006F1DFA /* TiNDEFTagTechnology.h in Headers */, - E2DA8DD025A3526B006F1DFA /* TiMiFareUltralightTagTechnology.h in Headers */, - E22E2A2725808C33004C52F1 /* TagTechnologyProxy.h in Headers */, + E2DA8E2225AF1705006F1DFA /* TiNfcNDEFTagTechnology.h in Headers */, + E2DA8DD025A3526B006F1DFA /* TiNfcMiFareUltralightTagTechnology.h in Headers */, DB856C461EE98C3B00DE4334 /* TiNfcNfcAdapterProxy.h in Headers */, E2DA8DFE25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.h in Headers */, DBF688371EEB4CB300009357 /* TiNfcNdefRecordProxy.h in Headers */, @@ -319,14 +317,14 @@ 24DD6CFA1134B3F500162E58 /* TiNfcModule.m in Sources */, E2DA8E4325AF1EBA006F1DFA /* TiNfcFTagTechnology.m in Sources */, E2DA8E3125AF1AB7006F1DFA /* TiNfcVTagTechnology.m in Sources */, - E2DA8E2325AF1705006F1DFA /* TiNDEFTagTechnology.m in Sources */, + E2DA8E2325AF1705006F1DFA /* TiNfcNDEFTagTechnology.m in Sources */, E2DA8E3725AF1BA2006F1DFA /* TiNfcISODepTagTechnology.m in Sources */, DBF688381EEB4CB300009357 /* TiNfcNdefRecordProxy.m in Sources */, E2DA8DFF25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m in Sources */, E2DA8E0D25AEE6AE006F1DFA /* TiNfcTagProxy.m in Sources */, DB856C471EE98C3B00DE4334 /* TiNfcNfcAdapterProxy.m in Sources */, DBF688341EEB4B3500009357 /* TiNfcNdefMessageProxy.m in Sources */, - E2DA8DD125A3526B006F1DFA /* TiMiFareUltralightTagTechnology.m in Sources */, + E2DA8DD125A3526B006F1DFA /* TiNfcMiFareUltralightTagTechnology.m in Sources */, 24DE9E1211C5FE74003F90F6 /* TiNfcModuleAssets.m in Sources */, DB4613981F8CEF2A003956CF /* TiNfcUtilities.m in Sources */, E2DA8DF925AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.m in Sources */, From 52c45e3f076e4c73f221de68ef76d46dbd6ba596 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Tue, 19 Jan 2021 23:42:27 +0530 Subject: [PATCH 15/59] update(ios): updated the native tag tech methods and adapter proxy method --- ios/Classes/TiNfcNativeTagTechnologyProxy.h | 2 +- ios/Classes/TiNfcNativeTagTechnologyProxy.m | 6 +++--- ios/Classes/TiNfcNfcAdapterProxy.m | 17 +++++++---------- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/ios/Classes/TiNfcNativeTagTechnologyProxy.h b/ios/Classes/TiNfcNativeTagTechnologyProxy.h index a702328..d545ef0 100644 --- a/ios/Classes/TiNfcNativeTagTechnologyProxy.h +++ b/ios/Classes/TiNfcNativeTagTechnologyProxy.h @@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN NFCTagReaderSession *session; TiNfcTagProxy *tag; } -- (id)_initWithPageContext:(id)context andSession:(NFCTagReaderSession *)session andTag:(TiNfcTagProxy *)tag; +- (id)_initWithPageContext:(id)context andSession:(NFCTagReaderSession *)session andTag:(NSArray<__kindof id> *)tag; @end diff --git a/ios/Classes/TiNfcNativeTagTechnologyProxy.m b/ios/Classes/TiNfcNativeTagTechnologyProxy.m index c4ed4d2..3568634 100644 --- a/ios/Classes/TiNfcNativeTagTechnologyProxy.m +++ b/ios/Classes/TiNfcNativeTagTechnologyProxy.m @@ -13,10 +13,10 @@ @implementation TiNfcNativeTagTechnologyProxy -- (id)_initWithPageContext:(id)context andSession:(NFCTagReaderSession *)session andTag:(TiNfcTagProxy *)tag +- (id)_initWithPageContext:(id)context andSession:(NFCTagReaderSession *)session andTag:(NSArray<__kindof id> *)tags { if (self = [super _initWithPageContext:context]) { - tag = tag; + tags = tags; session = session; } return self; @@ -36,7 +36,7 @@ - (void)connect:(id)unused @"errorCode" : NUMINTEGER([error code]), @"errorDescription" : [error localizedDescription], @"errorDomain" : [error domain], - @"tag" : [self _initWithPageContext:[self pageContext] andSession:session andTag:tag] + @"tag" : [self _initWithPageContext:[self pageContext] andSession:session andTag:tag.tag] }]; }]; } diff --git a/ios/Classes/TiNfcNfcAdapterProxy.m b/ios/Classes/TiNfcNfcAdapterProxy.m index f4a412b..7257fe2 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.m +++ b/ios/Classes/TiNfcNfcAdapterProxy.m @@ -50,13 +50,12 @@ - (NFCTagReaderSession *)nfcTagReadersession #pragma mark Public API's -- (NSNumber *)isEnabled:(id)unused +- (NSNumber *)isEnabled:(id)type { if (![TiUtils isIOSVersionOrGreater:@"13.0"]) { return @(NO); } - ENSURE_SINGLE_ARG(unused, NSArray); - NSString *sessionType = [unused objectAtIndex:0]; + NSString *sessionType = [[type valueForKey:@"type"] objectAtIndex:0]; if ([sessionType isEqualToString:@"NFCNDEFReaderSession"]) { return @([NFCNDEFReaderSession readingAvailable]); } else if ([sessionType isEqualToString:@"NFCTagReaderSession"]) { @@ -64,10 +63,9 @@ - (NSNumber *)isEnabled:(id)unused } } -- (void)begin:(id)unused +- (void)begin:(id)type { - ENSURE_SINGLE_ARG(unused, NSArray); - NSString *sessionType = [unused objectAtIndex:0]; + NSString *sessionType = [[type valueForKey:@"type"] objectAtIndex:0]; if ([sessionType isEqualToString:@"NFCNDEFReaderSession"]) { [[self nfcSession] beginSession]; } else if ([sessionType isEqualToString:@"NFCTagReaderSession"]) { @@ -75,10 +73,9 @@ - (void)begin:(id)unused } } -- (void)invalidate:(id)unused +- (void)invalidate:(id)type { - ENSURE_SINGLE_ARG(unused, NSArray); - NSString *sessionType = [unused objectAtIndex:0]; + NSString *sessionType = [[type valueForKey:@"type"] objectAtIndex:0]; if ([sessionType isEqualToString:@"NFCNDEFReaderSession"]) { [[self nfcSession] invalidateSession]; _nfcSession = nil; @@ -239,7 +236,7 @@ - (void)tagReaderSession:(NFCTagReaderSession *)session didDetectTags:(NSArray<_ } [self fireEvent:@"didDetectTags" withObject:@{ - @"tag" : [[TiNfcNativeTagTechnologyProxy alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tags[0]], + @"tag" : [[TiNfcNativeTagTechnologyProxy alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tags], @"type" : NFC_TAG_READER_SESSION }]; } From ebd3c55451c1442a1450dcad0a3a2de20712cd31 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Thu, 21 Jan 2021 16:48:01 +0530 Subject: [PATCH 16/59] update(ios): updated method parameters and constant --- ios/Classes/TiNFCTagProxy.h | 3 +- ios/Classes/TiNFCTagProxy.m | 2 +- ios/Classes/TiNfcModule.h | 8 +-- ios/Classes/TiNfcModule.m | 5 ++ ios/Classes/TiNfcNativeTagTechnologyProxy.h | 11 ++-- ios/Classes/TiNfcNativeTagTechnologyProxy.m | 34 ++++++------ ios/Classes/TiNfcNfcAdapterProxy.m | 57 ++++++++++++--------- 7 files changed, 70 insertions(+), 50 deletions(-) diff --git a/ios/Classes/TiNFCTagProxy.h b/ios/Classes/TiNFCTagProxy.h index 7d74323..2c2be30 100644 --- a/ios/Classes/TiNFCTagProxy.h +++ b/ios/Classes/TiNFCTagProxy.h @@ -12,10 +12,11 @@ NS_ASSUME_NONNULL_BEGIN @interface TiNfcTagProxy : TiProxy { - NFCNDEFReaderSession *session; id _tag; } +@property (nonatomic, weak) NFCNDEFReaderSession *session; + - (id)_initWithPageContext:(id)context andSession:(NFCNDEFReaderSession *)session andTag:(id)tag; #pragma mark Public API's diff --git a/ios/Classes/TiNFCTagProxy.m b/ios/Classes/TiNFCTagProxy.m index 975145a..87af443 100644 --- a/ios/Classes/TiNFCTagProxy.m +++ b/ios/Classes/TiNFCTagProxy.m @@ -16,7 +16,7 @@ - (id)_initWithPageContext:(id)context andSession:(NFCNDEFReaderSes { if (self = [super _initWithPageContext:context]) { _tag = tag; - session = session; + self.session = session; } return self; } diff --git a/ios/Classes/TiNfcModule.h b/ios/Classes/TiNfcModule.h index ba67e2e..2904b6a 100644 --- a/ios/Classes/TiNfcModule.h +++ b/ios/Classes/TiNfcModule.h @@ -7,10 +7,12 @@ #import "TiModule.h" -#define NDEF_READER_SESSION @"NFCNDEFReaderSession" -#define NFC_TAG_READER_SESSION @"NFCTagReaderSession" - @interface TiNfcModule : TiModule { } +@property (nonatomic, readonly) NSNumber *NDEF_READER_SESSION; +@property (nonatomic, readonly) NSNumber *NFC_TAG_READER_SESSION; +@property (nonatomic, readonly) NSNumber *NFC_TAG_ISO14443; +@property (nonatomic, readonly) NSNumber *NFC_TAG_ISO15693; +@property (nonatomic, readonly) NSNumber *NFC_TAG_ISO18092; @end diff --git a/ios/Classes/TiNfcModule.m b/ios/Classes/TiNfcModule.m index d940d0a..b0ec62d 100644 --- a/ios/Classes/TiNfcModule.m +++ b/ios/Classes/TiNfcModule.m @@ -40,6 +40,11 @@ - (void)startup NSLog(@"[DEBUG] %@ loaded", self); } +MAKE_SYSTEM_PROP(NDEF_READER_SESSION, @"NFCNDEFReaderSession"); +MAKE_SYSTEM_PROP(NFC_TAG_READER_SESSION, @"NFCTagReaderSession"); +MAKE_SYSTEM_PROP(NFC_TAG_ISO14443, @"NFCPollingISO14443"); +MAKE_SYSTEM_PROP(NFC_TAG_ISO15693, @"NFCPollingISO15693"); +MAKE_SYSTEM_PROP(NFC_TAG_ISO18092, @"NFCPollingISO18092"); #if IS_IOS_11 MAKE_SYSTEM_PROP(TNF_EMPTY, NFCTypeNameFormatEmpty); diff --git a/ios/Classes/TiNfcNativeTagTechnologyProxy.h b/ios/Classes/TiNfcNativeTagTechnologyProxy.h index d545ef0..32e1300 100644 --- a/ios/Classes/TiNfcNativeTagTechnologyProxy.h +++ b/ios/Classes/TiNfcNativeTagTechnologyProxy.h @@ -10,11 +10,12 @@ NS_ASSUME_NONNULL_BEGIN -@interface TiNfcNativeTagTechnologyProxy : TiNfcTagTechnologyProxy { - NFCTagReaderSession *session; - TiNfcTagProxy *tag; -} -- (id)_initWithPageContext:(id)context andSession:(NFCTagReaderSession *)session andTag:(NSArray<__kindof id> *)tag; +@interface TiNfcNativeTagTechnologyProxy : TiNfcTagTechnologyProxy + +@property (nonatomic, weak) NFCTagReaderSession *session; +@property (nonatomic, weak) TiNfcTagProxy *tag; + +- (id)_initWithPageContext:(id)context andSession:(NFCTagReaderSession *)session andTag:(TiNfcTagProxy *)tag; @end diff --git a/ios/Classes/TiNfcNativeTagTechnologyProxy.m b/ios/Classes/TiNfcNativeTagTechnologyProxy.m index 3568634..8f69983 100644 --- a/ios/Classes/TiNfcNativeTagTechnologyProxy.m +++ b/ios/Classes/TiNfcNativeTagTechnologyProxy.m @@ -13,11 +13,11 @@ @implementation TiNfcNativeTagTechnologyProxy -- (id)_initWithPageContext:(id)context andSession:(NFCTagReaderSession *)session andTag:(NSArray<__kindof id> *)tags +- (id)_initWithPageContext:(id)context andSession:(NFCTagReaderSession *)session andTag:(TiNfcTagProxy *)tag { if (self = [super _initWithPageContext:context]) { - tags = tags; - session = session; + self.tag = tag; + self.session = session; } return self; } @@ -26,24 +26,24 @@ - (id)_initWithPageContext:(id)context andSession:(NFCTagReaderSess - (void)connect:(id)unused { - [session connectToTag:tag.tag - completionHandler:^(NSError *_Nullable error) { - if (![self _hasListeners:@"didConnectTag"]) { - return; - } - [self fireEvent:@"didConnectTag" - withObject:@{ - @"errorCode" : NUMINTEGER([error code]), - @"errorDescription" : [error localizedDescription], - @"errorDomain" : [error domain], - @"tag" : [self _initWithPageContext:[self pageContext] andSession:session andTag:tag.tag] - }]; - }]; + [self.session connectToTag:self.tag.tag + completionHandler:^(NSError *_Nullable error) { + if (![self _hasListeners:@"didConnectTag"]) { + return; + } + [self fireEvent:@"didConnectTag" + withObject:@{ + @"errorCode" : NUMINTEGER([error code]), + @"errorDescription" : [error localizedDescription], + @"errorDomain" : [error domain], + @"tag" : self.tag + }]; + }]; } - (NSNumber *)isConnected:(id)unused { - return [NSNumber numberWithBool:session.connectedTag == tag.tag ? YES : NO]; + return [NSNumber numberWithBool:self.session.connectedTag == self.tag.tag ? YES : NO]; } @end diff --git a/ios/Classes/TiNfcNfcAdapterProxy.m b/ios/Classes/TiNfcNfcAdapterProxy.m index 7257fe2..11a3090 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.m +++ b/ios/Classes/TiNfcNfcAdapterProxy.m @@ -39,10 +39,18 @@ - (NFCNDEFReaderSession *)nfcSession return _nfcSession; } -- (NFCTagReaderSession *)nfcTagReadersession +- (NFCTagReaderSession *)nfcTagReadersession:(NSString *)pollingOption { if (_nfcTagReadersession == nil) { - _nfcTagReadersession = [[NFCTagReaderSession alloc] initWithPollingOption:NFCPollingISO14443 delegate:self queue:nil]; + if ([pollingOption isEqualToString:@"NFCPollingISO14443"]) { + _nfcTagReadersession = [[NFCTagReaderSession alloc] initWithPollingOption:NFCPollingISO14443 delegate:self queue:nil]; + } else if ([pollingOption isEqualToString:@"NFCPollingISO15693"]) { + _nfcTagReadersession = [[NFCTagReaderSession alloc] initWithPollingOption:NFCPollingISO15693 delegate:self queue:nil]; + } else if ([pollingOption isEqualToString:@"NFCPollingISO18092"]) { + _nfcTagReadersession = [[NFCTagReaderSession alloc] initWithPollingOption:NFCPollingISO18092 delegate:self queue:nil]; + } else { + _nfcTagReadersession = [[NFCTagReaderSession alloc] initWithPollingOption:(NFCPollingISO14443 | NFCPollingISO15693 | NFCPollingISO15693) delegate:self queue:nil]; + } } return _nfcTagReadersession; @@ -55,7 +63,7 @@ - (NSNumber *)isEnabled:(id)type if (![TiUtils isIOSVersionOrGreater:@"13.0"]) { return @(NO); } - NSString *sessionType = [[type valueForKey:@"type"] objectAtIndex:0]; + NSString *sessionType = [[type objectAtIndex:0] valueForKey:@"type"]; if ([sessionType isEqualToString:@"NFCNDEFReaderSession"]) { return @([NFCNDEFReaderSession readingAvailable]); } else if ([sessionType isEqualToString:@"NFCTagReaderSession"]) { @@ -65,72 +73,74 @@ - (NSNumber *)isEnabled:(id)type - (void)begin:(id)type { - NSString *sessionType = [[type valueForKey:@"type"] objectAtIndex:0]; + NSString *sessionType = [[type objectAtIndex:0] valueForKey:@"type"]; + NSString *pollingOption = [[type objectAtIndex:1] valueForKey:@"pollingOption"]; if ([sessionType isEqualToString:@"NFCNDEFReaderSession"]) { [[self nfcSession] beginSession]; } else if ([sessionType isEqualToString:@"NFCTagReaderSession"]) { - [[self nfcTagReadersession] beginSession]; + [[self nfcTagReadersession:pollingOption] beginSession]; } } - (void)invalidate:(id)type { - NSString *sessionType = [[type valueForKey:@"type"] objectAtIndex:0]; + NSString *sessionType = [[type objectAtIndex:0] valueForKey:@"type"]; + NSString *pollingOption = [[type objectAtIndex:1] valueForKey:@"pollingOption"]; if ([sessionType isEqualToString:@"NFCNDEFReaderSession"]) { [[self nfcSession] invalidateSession]; _nfcSession = nil; } else if ([sessionType isEqualToString:@"NFCTagReaderSession"]) { - [[self nfcTagReadersession] invalidateSession]; + [[self nfcTagReadersession:pollingOption] invalidateSession]; _nfcTagReadersession = nil; } } - (TiNfcMiFareUltralightTagTechnology *)createTagTechMifareUltralight:(id)args { - if ([args objectForKey:@"tag"] == nil) { + if ([args valueForKey:@"tag"] == nil) { return; } - TiNfcTagProxy *tag = [args objectForKey:@"tag"]; + TiNfcTagProxy *tag = [[args objectAtIndex:0] valueForKey:@"tag"]; TiNfcMiFareUltralightTagTechnology *mifareTag = [[TiNfcMiFareUltralightTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tag]; return mifareTag; } - (TiNfcNDEFTagTechnology *)createTagTechNdef:(id)args { - if ([args objectForKey:@"tag"] == nil) { + if ([args valueForKey:@"tag"] == nil) { return; } - TiNfcTagProxy *tag = [args objectForKey:@"tag"]; + TiNfcTagProxy *tag = [[args objectAtIndex:0] valueForKey:@"tag"]; TiNfcNDEFTagTechnology *ndefTag = [[TiNfcNDEFTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcSession andTag:tag.tag]; return ndefTag; } - (TiNfcVTagTechnology *)createTagTechNfcV:(id)args { - if ([args objectForKey:@"tag"] == nil) { + if ([args valueForKey:@"tag"] == nil) { return; } - TiNfcTagProxy *tag = [args objectForKey:@"tag"]; + TiNfcTagProxy *tag = [[args objectAtIndex:0] valueForKey:@"tag"]; TiNfcVTagTechnology *nfcvTag = [[TiNfcVTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tag]; return nfcvTag; } - (TiNfcISODepTagTechnology *)createTagTechISODep:(id)args { - if ([args objectForKey:@"tag"] == nil) { + if ([args valueForKey:@"tag"] == nil) { return; } - TiNfcTagProxy *tag = [args objectForKey:@"tag"]; + TiNfcTagProxy *tag = [[args objectAtIndex:0] valueForKey:@"tag"]; TiNfcISODepTagTechnology *isodepTag = [[TiNfcISODepTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tag]; return isodepTag; } - (TiNfcFTagTechnology *)createTagTechNfcF:(id)args { - if ([args objectForKey:@"tag"] == nil) { + if ([args valueForKey:@"tag"] == nil) { return; } - TiNfcTagProxy *tag = [args objectForKey:@"tag"]; + TiNfcTagProxy *tag = [[args objectAtIndex:0] valueForKey:@"tag"]; TiNfcFTagTechnology *nfcfTag = [[TiNfcFTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tag]; return nfcfTag; } @@ -187,7 +197,7 @@ - (void)readerSession:(NFCNDEFReaderSession *)session didInvalidateWithError:(NS @"cancelled" : @(error.code == 200), @"message" : [error localizedDescription], @"code" : NUMINTEGER([error code]), - @"type" : NDEF_READER_SESSION + @"type" : @"NFCNDEFReaderSession" } ] thisObject:self]; }, @@ -209,7 +219,7 @@ - (void)tagReaderSession:(NFCTagReaderSession *)session didInvalidateWithError:( @"cancelled" : @(error.code == 200), @"message" : [error localizedDescription], @"code" : NUMINTEGER([error code]), - @"type" : NFC_TAG_READER_SESSION + @"type" : @"NFCTagReaderSession" } ] thisObject:self]; }, @@ -224,9 +234,8 @@ - (void)tagReaderSessionDidBecomeActive:(NFCTagReaderSession *)session } [self fireEvent:@"tagReaderSessionDidBecomeActive" withObject:@{ - @"type" : NFC_TAG_READER_SESSION + @"type" : @"NFCTagReaderSession" }]; - [self fireEvent:@"tagReaderSessionDidBecomeActive"]; } - (void)tagReaderSession:(NFCTagReaderSession *)session didDetectTags:(NSArray<__kindof id> *)tags @@ -234,10 +243,12 @@ - (void)tagReaderSession:(NFCTagReaderSession *)session didDetectTags:(NSArray<_ if (![self _hasListeners:@"didDetectTags"]) { return; } + TiNfcNativeTagTechnologyProxy *tagData = [[TiNfcNativeTagTechnologyProxy alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tags]; [self fireEvent:@"didDetectTags" withObject:@{ - @"tag" : [[TiNfcNativeTagTechnologyProxy alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tags], - @"type" : NFC_TAG_READER_SESSION + @"tags" : [NSArray arrayWithObject:tagData], + @"session" : _nfcTagReadersession, + @"type" : @"NFCTagReaderSession" }]; } From e8afb14b38c19c25f9db93784bbea0cd308ac02b Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Wed, 27 Jan 2021 14:25:48 +0530 Subject: [PATCH 17/59] update(ios): updated the contants and tinfctagproxy class --- ios/Classes/TiNFCTagProxy.h | 2 +- ios/Classes/TiNFCTagProxy.m | 3 +- ios/Classes/TiNfcModule.h | 4 +-- ios/Classes/TiNfcModule.m | 11 +++--- ios/Classes/TiNfcNDEFTagTechnology.h | 4 +-- ios/Classes/TiNfcNfcAdapterProxy.m | 54 +++++++++++++--------------- 6 files changed, 36 insertions(+), 42 deletions(-) diff --git a/ios/Classes/TiNFCTagProxy.h b/ios/Classes/TiNFCTagProxy.h index 2c2be30..13b1ca2 100644 --- a/ios/Classes/TiNFCTagProxy.h +++ b/ios/Classes/TiNFCTagProxy.h @@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, weak) NFCNDEFReaderSession *session; -- (id)_initWithPageContext:(id)context andSession:(NFCNDEFReaderSession *)session andTag:(id)tag; +- (id)_initWithPageContext:(id)context andTag:(id)tag; #pragma mark Public API's diff --git a/ios/Classes/TiNFCTagProxy.m b/ios/Classes/TiNFCTagProxy.m index 87af443..c4ddc6f 100644 --- a/ios/Classes/TiNFCTagProxy.m +++ b/ios/Classes/TiNFCTagProxy.m @@ -12,11 +12,10 @@ @implementation TiNfcTagProxy #pragma mark Internal -- (id)_initWithPageContext:(id)context andSession:(NFCNDEFReaderSession *)session andTag:(id)tag +- (id)_initWithPageContext:(id)context andTag:(id)tag { if (self = [super _initWithPageContext:context]) { _tag = tag; - self.session = session; } return self; } diff --git a/ios/Classes/TiNfcModule.h b/ios/Classes/TiNfcModule.h index 2904b6a..101fcd0 100644 --- a/ios/Classes/TiNfcModule.h +++ b/ios/Classes/TiNfcModule.h @@ -9,8 +9,8 @@ @interface TiNfcModule : TiModule { } -@property (nonatomic, readonly) NSNumber *NDEF_READER_SESSION; -@property (nonatomic, readonly) NSNumber *NFC_TAG_READER_SESSION; +@property (nonatomic, readonly) NSString *NFC_NDEF_READER_SESSION; +@property (nonatomic, readonly) NSString *NFC_TAG_READER_SESSION; @property (nonatomic, readonly) NSNumber *NFC_TAG_ISO14443; @property (nonatomic, readonly) NSNumber *NFC_TAG_ISO15693; @property (nonatomic, readonly) NSNumber *NFC_TAG_ISO18092; diff --git a/ios/Classes/TiNfcModule.m b/ios/Classes/TiNfcModule.m index b0ec62d..c5bc3d4 100644 --- a/ios/Classes/TiNfcModule.m +++ b/ios/Classes/TiNfcModule.m @@ -40,11 +40,12 @@ - (void)startup NSLog(@"[DEBUG] %@ loaded", self); } -MAKE_SYSTEM_PROP(NDEF_READER_SESSION, @"NFCNDEFReaderSession"); -MAKE_SYSTEM_PROP(NFC_TAG_READER_SESSION, @"NFCTagReaderSession"); -MAKE_SYSTEM_PROP(NFC_TAG_ISO14443, @"NFCPollingISO14443"); -MAKE_SYSTEM_PROP(NFC_TAG_ISO15693, @"NFCPollingISO15693"); -MAKE_SYSTEM_PROP(NFC_TAG_ISO18092, @"NFCPollingISO18092"); + +MAKE_SYSTEM_STR(NFC_NDEF_READER_SESSION, @"NFCNDEFReaderSession"); +MAKE_SYSTEM_STR(NFC_TAG_READER_SESSION, @"NFCTagReaderSession"); +MAKE_SYSTEM_PROP(NFC_TAG_ISO14443, NFCPollingISO14443); +MAKE_SYSTEM_PROP(NFC_TAG_ISO15693, NFCPollingISO15693); +MAKE_SYSTEM_PROP(NFC_TAG_ISO18092, NFCPollingISO18092); #if IS_IOS_11 MAKE_SYSTEM_PROP(TNF_EMPTY, NFCTypeNameFormatEmpty); diff --git a/ios/Classes/TiNfcNDEFTagTechnology.h b/ios/Classes/TiNfcNDEFTagTechnology.h index 6788969..78ce9f8 100644 --- a/ios/Classes/TiNfcNDEFTagTechnology.h +++ b/ios/Classes/TiNfcNDEFTagTechnology.h @@ -5,13 +5,13 @@ * Please see the LICENSE included with this distribution for details. */ -#import "TiNfcTagProxy.h" +#import "TiNfcNativeTagTechnologyProxy.h" #import #import NS_ASSUME_NONNULL_BEGIN -@interface TiNfcNDEFTagTechnology : TiNfcTagProxy +@interface TiNfcNDEFTagTechnology : TiNfcNativeTagTechnologyProxy @end diff --git a/ios/Classes/TiNfcNfcAdapterProxy.m b/ios/Classes/TiNfcNfcAdapterProxy.m index 11a3090..7b3f691 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.m +++ b/ios/Classes/TiNfcNfcAdapterProxy.m @@ -25,7 +25,7 @@ @implementation TiNfcNfcAdapterProxy - (NFCNDEFReaderSession *)nfcSession { // Guard older iOS versions already. The developer will use "isEnabled" later to actually guard the functionality - // e.g. an iPad running iOS 11, but without NFC capabilities + // e.g. an iPad running iOS 13, but without NFC capabilities if (![TiUtils isIOSVersionOrGreater:@"13.0"]) { return nil; } @@ -39,20 +39,16 @@ - (NFCNDEFReaderSession *)nfcSession return _nfcSession; } -- (NFCTagReaderSession *)nfcTagReadersession:(NSString *)pollingOption +- (NFCTagReaderSession *)nfcTagReadersession:(id)pollingOption { + NSInteger pollingValue = 0; + for (int count = 0; count < [pollingOption count]; count++) { + NSInteger value = [[pollingOption objectAtIndex:count] intValue]; + pollingValue = pollingValue | value; + } if (_nfcTagReadersession == nil) { - if ([pollingOption isEqualToString:@"NFCPollingISO14443"]) { - _nfcTagReadersession = [[NFCTagReaderSession alloc] initWithPollingOption:NFCPollingISO14443 delegate:self queue:nil]; - } else if ([pollingOption isEqualToString:@"NFCPollingISO15693"]) { - _nfcTagReadersession = [[NFCTagReaderSession alloc] initWithPollingOption:NFCPollingISO15693 delegate:self queue:nil]; - } else if ([pollingOption isEqualToString:@"NFCPollingISO18092"]) { - _nfcTagReadersession = [[NFCTagReaderSession alloc] initWithPollingOption:NFCPollingISO18092 delegate:self queue:nil]; - } else { - _nfcTagReadersession = [[NFCTagReaderSession alloc] initWithPollingOption:(NFCPollingISO14443 | NFCPollingISO15693 | NFCPollingISO15693) delegate:self queue:nil]; - } + _nfcTagReadersession = [[NFCTagReaderSession alloc] initWithPollingOption:pollingValue delegate:self queue:nil]; } - return _nfcTagReadersession; } @@ -74,7 +70,7 @@ - (NSNumber *)isEnabled:(id)type - (void)begin:(id)type { NSString *sessionType = [[type objectAtIndex:0] valueForKey:@"type"]; - NSString *pollingOption = [[type objectAtIndex:1] valueForKey:@"pollingOption"]; + NSArray *pollingOption = [type valueForKey:@"pollingOption"]; if ([sessionType isEqualToString:@"NFCNDEFReaderSession"]) { [[self nfcSession] beginSession]; } else if ([sessionType isEqualToString:@"NFCTagReaderSession"]) { @@ -85,7 +81,7 @@ - (void)begin:(id)type - (void)invalidate:(id)type { NSString *sessionType = [[type objectAtIndex:0] valueForKey:@"type"]; - NSString *pollingOption = [[type objectAtIndex:1] valueForKey:@"pollingOption"]; + NSArray *pollingOption = [type valueForKey:@"pollingOption"]; if ([sessionType isEqualToString:@"NFCNDEFReaderSession"]) { [[self nfcSession] invalidateSession]; _nfcSession = nil; @@ -111,7 +107,7 @@ - (TiNfcNDEFTagTechnology *)createTagTechNdef:(id)args return; } TiNfcTagProxy *tag = [[args objectAtIndex:0] valueForKey:@"tag"]; - TiNfcNDEFTagTechnology *ndefTag = [[TiNfcNDEFTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcSession andTag:tag.tag]; + TiNfcNDEFTagTechnology *ndefTag = [[TiNfcNDEFTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcSession andTag:tag]; return ndefTag; } @@ -209,21 +205,16 @@ - (void)readerSession:(NFCNDEFReaderSession *)session didInvalidateWithError:(NS - (void)tagReaderSession:(NFCTagReaderSession *)session didInvalidateWithError:(NSError *)error { _nfcTagReadersession = nil; - - if (!_nNdefInvalidated) { + if (![self _hasListeners:@"didInvalidateWithError"]) { return; } - TiThreadPerformOnMainThread( - ^{ - [_nNdefInvalidated call:@[ @{ - @"cancelled" : @(error.code == 200), - @"message" : [error localizedDescription], - @"code" : NUMINTEGER([error code]), - @"type" : @"NFCTagReaderSession" - } ] - thisObject:self]; - }, - NO); + [self fireEvent:@"didInvalidateWithError" + withObject:@{ + @"cancelled" : @(error.code == 200), + @"message" : [error localizedDescription], + @"code" : NUMINTEGER([error code]), + @"type" : @"NFCTagReaderSession" + }]; } - (void)tagReaderSessionDidBecomeActive:(NFCTagReaderSession *)session @@ -243,10 +234,13 @@ - (void)tagReaderSession:(NFCTagReaderSession *)session didDetectTags:(NSArray<_ if (![self _hasListeners:@"didDetectTags"]) { return; } - TiNfcNativeTagTechnologyProxy *tagData = [[TiNfcNativeTagTechnologyProxy alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tags]; + NSMutableArray *tagData = [[NSMutableArray alloc] init]; + for (id tag in tags) { + [tagData addObject:tag]; + } [self fireEvent:@"didDetectTags" withObject:@{ - @"tags" : [NSArray arrayWithObject:tagData], + @"tags" : tagData, @"session" : _nfcTagReadersession, @"type" : @"NFCTagReaderSession" }]; From 9b7ca6af16ee929775b3b9291ed3b91ccd2441fd Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Wed, 27 Jan 2021 16:44:16 +0530 Subject: [PATCH 18/59] update(ios): updated didDetectProxy delegate method --- ios/Classes/TiNfcModule.h | 4 ++-- ios/Classes/TiNfcNfcAdapterProxy.m | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ios/Classes/TiNfcModule.h b/ios/Classes/TiNfcModule.h index 101fcd0..32252c6 100644 --- a/ios/Classes/TiNfcModule.h +++ b/ios/Classes/TiNfcModule.h @@ -9,8 +9,8 @@ @interface TiNfcModule : TiModule { } -@property (nonatomic, readonly) NSString *NFC_NDEF_READER_SESSION; -@property (nonatomic, readonly) NSString *NFC_TAG_READER_SESSION; +@property (nonatomic, readonly) NSString *READER_SESSION_NFC_NDEF; +@property (nonatomic, readonly) NSString *READER_SESSION_NFC_TAG; @property (nonatomic, readonly) NSNumber *NFC_TAG_ISO14443; @property (nonatomic, readonly) NSNumber *NFC_TAG_ISO15693; @property (nonatomic, readonly) NSNumber *NFC_TAG_ISO18092; diff --git a/ios/Classes/TiNfcNfcAdapterProxy.m b/ios/Classes/TiNfcNfcAdapterProxy.m index 7b3f691..0e956ae 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.m +++ b/ios/Classes/TiNfcNfcAdapterProxy.m @@ -25,8 +25,8 @@ @implementation TiNfcNfcAdapterProxy - (NFCNDEFReaderSession *)nfcSession { // Guard older iOS versions already. The developer will use "isEnabled" later to actually guard the functionality - // e.g. an iPad running iOS 13, but without NFC capabilities - if (![TiUtils isIOSVersionOrGreater:@"13.0"]) { + // e.g. an iPad running iOS 11, but without NFC capabilities + if (![TiUtils isIOSVersionOrGreater:@"11.0"]) { return nil; } @@ -41,6 +41,10 @@ - (NFCNDEFReaderSession *)nfcSession - (NFCTagReaderSession *)nfcTagReadersession:(id)pollingOption { + // As NFC Tag reader session is only available after iOS 13 + if (![TiUtils isIOSVersionOrGreater:@"13.0"]) { + return nil; + } NSInteger pollingValue = 0; for (int count = 0; count < [pollingOption count]; count++) { NSInteger value = [[pollingOption objectAtIndex:count] intValue]; @@ -236,7 +240,7 @@ - (void)tagReaderSession:(NFCTagReaderSession *)session didDetectTags:(NSArray<_ } NSMutableArray *tagData = [[NSMutableArray alloc] init]; for (id tag in tags) { - [tagData addObject:tag]; + [tagData addObject:[[TiNfcTagProxy alloc] _initWithPageContext:[self pageContext] andTag:tag]]; } [self fireEvent:@"didDetectTags" withObject:@{ From c011874b5bb7e9514e685e2371b63da4355e70c7 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Wed, 27 Jan 2021 16:59:22 +0530 Subject: [PATCH 19/59] update(ios): updated class prefix for nfctag proxy class --- ios/Classes/{TiNFCTagProxy.h => TiNfcTagProxy.h} | 1 - ios/Classes/{TiNFCTagProxy.m => TiNfcTagProxy.m} | 0 ios/ti.nfc.xcodeproj/project.pbxproj | 16 ++++++++-------- 3 files changed, 8 insertions(+), 9 deletions(-) rename ios/Classes/{TiNFCTagProxy.h => TiNfcTagProxy.h} (99%) rename ios/Classes/{TiNFCTagProxy.m => TiNfcTagProxy.m} (100%) diff --git a/ios/Classes/TiNFCTagProxy.h b/ios/Classes/TiNfcTagProxy.h similarity index 99% rename from ios/Classes/TiNFCTagProxy.h rename to ios/Classes/TiNfcTagProxy.h index 13b1ca2..597db74 100644 --- a/ios/Classes/TiNFCTagProxy.h +++ b/ios/Classes/TiNfcTagProxy.h @@ -1,4 +1,3 @@ - /** * Axway Titanium * Copyright (c) 2009-present by Axway Appcelerator. All Rights Reserved. diff --git a/ios/Classes/TiNFCTagProxy.m b/ios/Classes/TiNfcTagProxy.m similarity index 100% rename from ios/Classes/TiNFCTagProxy.m rename to ios/Classes/TiNfcTagProxy.m diff --git a/ios/ti.nfc.xcodeproj/project.pbxproj b/ios/ti.nfc.xcodeproj/project.pbxproj index 299931d..a5c7ab6 100644 --- a/ios/ti.nfc.xcodeproj/project.pbxproj +++ b/ios/ti.nfc.xcodeproj/project.pbxproj @@ -37,14 +37,14 @@ DBF688341EEB4B3500009357 /* TiNfcNdefMessageProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = DBF688321EEB4B3500009357 /* TiNfcNdefMessageProxy.m */; }; DBF688371EEB4CB300009357 /* TiNfcNdefRecordProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = DBF688351EEB4CB300009357 /* TiNfcNdefRecordProxy.h */; }; DBF688381EEB4CB300009357 /* TiNfcNdefRecordProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = DBF688361EEB4CB300009357 /* TiNfcNdefRecordProxy.m */; }; + E213783725C184E100FE0EED /* TiNfcTagProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E213783525C184E100FE0EED /* TiNfcTagProxy.h */; }; + E213783825C184E100FE0EED /* TiNfcTagProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E213783625C184E100FE0EED /* TiNfcTagProxy.m */; }; E2DA8DD025A3526B006F1DFA /* TiNfcMiFareUltralightTagTechnology.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8DCE25A3526B006F1DFA /* TiNfcMiFareUltralightTagTechnology.h */; }; E2DA8DD125A3526B006F1DFA /* TiNfcMiFareUltralightTagTechnology.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8DCF25A3526B006F1DFA /* TiNfcMiFareUltralightTagTechnology.m */; }; E2DA8DF825AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8DF625AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.h */; }; E2DA8DF925AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8DF725AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.m */; }; E2DA8DFE25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8DFC25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.h */; }; E2DA8DFF25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8DFD25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m */; }; - E2DA8E0C25AEE6AE006F1DFA /* TiNfcTagProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8E0A25AEE6AD006F1DFA /* TiNfcTagProxy.h */; }; - E2DA8E0D25AEE6AE006F1DFA /* TiNfcTagProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8E0B25AEE6AD006F1DFA /* TiNfcTagProxy.m */; }; E2DA8E2225AF1705006F1DFA /* TiNfcNDEFTagTechnology.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8E2025AF1705006F1DFA /* TiNfcNDEFTagTechnology.h */; }; E2DA8E2325AF1705006F1DFA /* TiNfcNDEFTagTechnology.m in Sources */ = {isa = PBXBuildFile; fileRef = E2DA8E2125AF1705006F1DFA /* TiNfcNDEFTagTechnology.m */; }; E2DA8E3025AF1AB7006F1DFA /* TiNfcVTagTechnology.h in Headers */ = {isa = PBXBuildFile; fileRef = E2DA8E2E25AF1AB7006F1DFA /* TiNfcVTagTechnology.h */; }; @@ -83,14 +83,14 @@ DBF688321EEB4B3500009357 /* TiNfcNdefMessageProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcNdefMessageProxy.m; path = Classes/TiNfcNdefMessageProxy.m; sourceTree = ""; }; DBF688351EEB4CB300009357 /* TiNfcNdefRecordProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcNdefRecordProxy.h; path = Classes/TiNfcNdefRecordProxy.h; sourceTree = ""; }; DBF688361EEB4CB300009357 /* TiNfcNdefRecordProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcNdefRecordProxy.m; path = Classes/TiNfcNdefRecordProxy.m; sourceTree = ""; }; + E213783525C184E100FE0EED /* TiNfcTagProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcTagProxy.h; path = Classes/TiNfcTagProxy.h; sourceTree = ""; }; + E213783625C184E100FE0EED /* TiNfcTagProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcTagProxy.m; path = Classes/TiNfcTagProxy.m; sourceTree = ""; }; E2DA8DCE25A3526B006F1DFA /* TiNfcMiFareUltralightTagTechnology.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcMiFareUltralightTagTechnology.h; path = Classes/TiNfcMiFareUltralightTagTechnology.h; sourceTree = ""; }; E2DA8DCF25A3526B006F1DFA /* TiNfcMiFareUltralightTagTechnology.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcMiFareUltralightTagTechnology.m; path = Classes/TiNfcMiFareUltralightTagTechnology.m; sourceTree = ""; }; E2DA8DF625AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcTagTechnologyProxy.h; path = Classes/TiNfcTagTechnologyProxy.h; sourceTree = ""; }; E2DA8DF725AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcTagTechnologyProxy.m; path = Classes/TiNfcTagTechnologyProxy.m; sourceTree = ""; }; E2DA8DFC25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcNativeTagTechnologyProxy.h; path = Classes/TiNfcNativeTagTechnologyProxy.h; sourceTree = ""; }; E2DA8DFD25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcNativeTagTechnologyProxy.m; path = Classes/TiNfcNativeTagTechnologyProxy.m; sourceTree = ""; }; - E2DA8E0A25AEE6AD006F1DFA /* TiNfcTagProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcTagProxy.h; path = Classes/TiNfcTagProxy.h; sourceTree = ""; }; - E2DA8E0B25AEE6AD006F1DFA /* TiNfcTagProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcTagProxy.m; path = Classes/TiNfcTagProxy.m; sourceTree = ""; }; E2DA8E2025AF1705006F1DFA /* TiNfcNDEFTagTechnology.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcNDEFTagTechnology.h; path = Classes/TiNfcNDEFTagTechnology.h; sourceTree = ""; }; E2DA8E2125AF1705006F1DFA /* TiNfcNDEFTagTechnology.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcNDEFTagTechnology.m; path = Classes/TiNfcNDEFTagTechnology.m; sourceTree = ""; }; E2DA8E2E25AF1AB7006F1DFA /* TiNfcVTagTechnology.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcVTagTechnology.h; path = Classes/TiNfcVTagTechnology.h; sourceTree = ""; }; @@ -202,8 +202,6 @@ E2DA8DF725AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.m */, E2DA8DFC25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.h */, E2DA8DFD25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m */, - E2DA8E0A25AEE6AD006F1DFA /* TiNfcTagProxy.h */, - E2DA8E0B25AEE6AD006F1DFA /* TiNfcTagProxy.m */, E2DA8DCE25A3526B006F1DFA /* TiNfcMiFareUltralightTagTechnology.h */, E2DA8DCF25A3526B006F1DFA /* TiNfcMiFareUltralightTagTechnology.m */, E2DA8E2025AF1705006F1DFA /* TiNfcNDEFTagTechnology.h */, @@ -214,6 +212,8 @@ E2DA8E3525AF1BA2006F1DFA /* TiNfcISODepTagTechnology.m */, E2DA8E4025AF1EBA006F1DFA /* TiNfcFTagTechnology.h */, E2DA8E4125AF1EBA006F1DFA /* TiNfcFTagTechnology.m */, + E213783525C184E100FE0EED /* TiNfcTagProxy.h */, + E213783625C184E100FE0EED /* TiNfcTagProxy.m */, ); name = "NFC Proxy class"; sourceTree = ""; @@ -232,7 +232,7 @@ DB4613971F8CEF2A003956CF /* TiNfcUtilities.h in Headers */, DBF688331EEB4B3500009357 /* TiNfcNdefMessageProxy.h in Headers */, 24DD6CF91134B3F500162E58 /* TiNfcModule.h in Headers */, - E2DA8E0C25AEE6AE006F1DFA /* TiNfcTagProxy.h in Headers */, + E213783725C184E100FE0EED /* TiNfcTagProxy.h in Headers */, E2DA8E3625AF1BA2006F1DFA /* TiNfcISODepTagTechnology.h in Headers */, 24DD6CF91134B3F500162E58 /* TiNfcModule.h in Headers */, E2DA8E2225AF1705006F1DFA /* TiNfcNDEFTagTechnology.h in Headers */, @@ -321,10 +321,10 @@ E2DA8E3725AF1BA2006F1DFA /* TiNfcISODepTagTechnology.m in Sources */, DBF688381EEB4CB300009357 /* TiNfcNdefRecordProxy.m in Sources */, E2DA8DFF25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m in Sources */, - E2DA8E0D25AEE6AE006F1DFA /* TiNfcTagProxy.m in Sources */, DB856C471EE98C3B00DE4334 /* TiNfcNfcAdapterProxy.m in Sources */, DBF688341EEB4B3500009357 /* TiNfcNdefMessageProxy.m in Sources */, E2DA8DD125A3526B006F1DFA /* TiNfcMiFareUltralightTagTechnology.m in Sources */, + E213783825C184E100FE0EED /* TiNfcTagProxy.m in Sources */, 24DE9E1211C5FE74003F90F6 /* TiNfcModuleAssets.m in Sources */, DB4613981F8CEF2A003956CF /* TiNfcUtilities.m in Sources */, E2DA8DF925AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.m in Sources */, From 39848c34e3e5d28f8c59517f7ddf8fad3b278bbe Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Wed, 27 Jan 2021 18:02:41 +0530 Subject: [PATCH 20/59] update(ios): removed unused property and updated constants --- ios/Classes/TiNfcModule.m | 4 ++-- ios/Classes/TiNfcNfcAdapterProxy.m | 23 +++++++++++------------ ios/Classes/TiNfcTagProxy.h | 2 -- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/ios/Classes/TiNfcModule.m b/ios/Classes/TiNfcModule.m index c5bc3d4..d0ece7d 100644 --- a/ios/Classes/TiNfcModule.m +++ b/ios/Classes/TiNfcModule.m @@ -41,8 +41,8 @@ - (void)startup NSLog(@"[DEBUG] %@ loaded", self); } -MAKE_SYSTEM_STR(NFC_NDEF_READER_SESSION, @"NFCNDEFReaderSession"); -MAKE_SYSTEM_STR(NFC_TAG_READER_SESSION, @"NFCTagReaderSession"); +MAKE_SYSTEM_STR(READER_SESSION_NFC_NDEF, @"NFCNDEFReaderSession"); +MAKE_SYSTEM_STR(READER_SESSION_NFC_TAG, @"NFCTagReaderSession"); MAKE_SYSTEM_PROP(NFC_TAG_ISO14443, NFCPollingISO14443); MAKE_SYSTEM_PROP(NFC_TAG_ISO15693, NFCPollingISO15693); MAKE_SYSTEM_PROP(NFC_TAG_ISO18092, NFCPollingISO18092); diff --git a/ios/Classes/TiNfcNfcAdapterProxy.m b/ios/Classes/TiNfcNfcAdapterProxy.m index 0e956ae..2e62273 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.m +++ b/ios/Classes/TiNfcNfcAdapterProxy.m @@ -39,15 +39,15 @@ - (NFCNDEFReaderSession *)nfcSession return _nfcSession; } -- (NFCTagReaderSession *)nfcTagReadersession:(id)pollingOption +- (NFCTagReaderSession *)nfcTagReadersession:(id)pollingOptions { // As NFC Tag reader session is only available after iOS 13 if (![TiUtils isIOSVersionOrGreater:@"13.0"]) { return nil; } NSInteger pollingValue = 0; - for (int count = 0; count < [pollingOption count]; count++) { - NSInteger value = [[pollingOption objectAtIndex:count] intValue]; + for (int count = 0; count < [pollingOptions count]; count++) { + NSInteger value = [[pollingOptions objectAtIndex:count] intValue]; pollingValue = pollingValue | value; } if (_nfcTagReadersession == nil) { @@ -74,23 +74,23 @@ - (NSNumber *)isEnabled:(id)type - (void)begin:(id)type { NSString *sessionType = [[type objectAtIndex:0] valueForKey:@"type"]; - NSArray *pollingOption = [type valueForKey:@"pollingOption"]; + NSArray *pollingOptions = [[type objectAtIndex:0] valueForKey:@"pollingOptions"]; if ([sessionType isEqualToString:@"NFCNDEFReaderSession"]) { [[self nfcSession] beginSession]; } else if ([sessionType isEqualToString:@"NFCTagReaderSession"]) { - [[self nfcTagReadersession:pollingOption] beginSession]; + [[self nfcTagReadersession:pollingOptions] beginSession]; } } - (void)invalidate:(id)type { NSString *sessionType = [[type objectAtIndex:0] valueForKey:@"type"]; - NSArray *pollingOption = [type valueForKey:@"pollingOption"]; + NSArray *pollingOptions = [[type objectAtIndex:0] valueForKey:@"pollingOptions"]; if ([sessionType isEqualToString:@"NFCNDEFReaderSession"]) { [[self nfcSession] invalidateSession]; _nfcSession = nil; } else if ([sessionType isEqualToString:@"NFCTagReaderSession"]) { - [[self nfcTagReadersession:pollingOption] invalidateSession]; + [[self nfcTagReadersession:pollingOptions] invalidateSession]; _nfcTagReadersession = nil; } } @@ -98,7 +98,7 @@ - (void)invalidate:(id)type - (TiNfcMiFareUltralightTagTechnology *)createTagTechMifareUltralight:(id)args { if ([args valueForKey:@"tag"] == nil) { - return; + return nil; } TiNfcTagProxy *tag = [[args objectAtIndex:0] valueForKey:@"tag"]; TiNfcMiFareUltralightTagTechnology *mifareTag = [[TiNfcMiFareUltralightTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tag]; @@ -118,7 +118,7 @@ - (TiNfcNDEFTagTechnology *)createTagTechNdef:(id)args - (TiNfcVTagTechnology *)createTagTechNfcV:(id)args { if ([args valueForKey:@"tag"] == nil) { - return; + return nil; } TiNfcTagProxy *tag = [[args objectAtIndex:0] valueForKey:@"tag"]; TiNfcVTagTechnology *nfcvTag = [[TiNfcVTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tag]; @@ -128,7 +128,7 @@ - (TiNfcVTagTechnology *)createTagTechNfcV:(id)args - (TiNfcISODepTagTechnology *)createTagTechISODep:(id)args { if ([args valueForKey:@"tag"] == nil) { - return; + return nil; } TiNfcTagProxy *tag = [[args objectAtIndex:0] valueForKey:@"tag"]; TiNfcISODepTagTechnology *isodepTag = [[TiNfcISODepTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tag]; @@ -138,7 +138,7 @@ - (TiNfcISODepTagTechnology *)createTagTechISODep:(id)args - (TiNfcFTagTechnology *)createTagTechNfcF:(id)args { if ([args valueForKey:@"tag"] == nil) { - return; + return nil; } TiNfcTagProxy *tag = [[args objectAtIndex:0] valueForKey:@"tag"]; TiNfcFTagTechnology *nfcfTag = [[TiNfcFTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tag]; @@ -245,7 +245,6 @@ - (void)tagReaderSession:(NFCTagReaderSession *)session didDetectTags:(NSArray<_ [self fireEvent:@"didDetectTags" withObject:@{ @"tags" : tagData, - @"session" : _nfcTagReadersession, @"type" : @"NFCTagReaderSession" }]; } diff --git a/ios/Classes/TiNfcTagProxy.h b/ios/Classes/TiNfcTagProxy.h index 597db74..9040213 100644 --- a/ios/Classes/TiNfcTagProxy.h +++ b/ios/Classes/TiNfcTagProxy.h @@ -14,8 +14,6 @@ NS_ASSUME_NONNULL_BEGIN id _tag; } -@property (nonatomic, weak) NFCNDEFReaderSession *session; - - (id)_initWithPageContext:(id)context andTag:(id)tag; #pragma mark Public API's From ff3117ed0046e670b836e0d63f8fa384d4af33b3 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Wed, 27 Jan 2021 18:27:04 +0530 Subject: [PATCH 21/59] update(ios): updated createndef tag method return type --- ios/Classes/TiNfcNfcAdapterProxy.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Classes/TiNfcNfcAdapterProxy.m b/ios/Classes/TiNfcNfcAdapterProxy.m index 2e62273..854b7ee 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.m +++ b/ios/Classes/TiNfcNfcAdapterProxy.m @@ -108,7 +108,7 @@ - (TiNfcMiFareUltralightTagTechnology *)createTagTechMifareUltralight:(id)args - (TiNfcNDEFTagTechnology *)createTagTechNdef:(id)args { if ([args valueForKey:@"tag"] == nil) { - return; + return nil; } TiNfcTagProxy *tag = [[args objectAtIndex:0] valueForKey:@"tag"]; TiNfcNDEFTagTechnology *ndefTag = [[TiNfcNDEFTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcSession andTag:tag]; From 8da7f0d8d6cc109fbe518afd25fb6180e5fcdb25 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Thu, 28 Jan 2021 16:39:46 +0530 Subject: [PATCH 22/59] update(ios): updated correct tag object --- ios/Classes/TiNfcNativeTagTechnologyProxy.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/Classes/TiNfcNativeTagTechnologyProxy.m b/ios/Classes/TiNfcNativeTagTechnologyProxy.m index 8f69983..d069f94 100644 --- a/ios/Classes/TiNfcNativeTagTechnologyProxy.m +++ b/ios/Classes/TiNfcNativeTagTechnologyProxy.m @@ -26,7 +26,7 @@ - (id)_initWithPageContext:(id)context andSession:(NFCTagReaderSess - (void)connect:(id)unused { - [self.session connectToTag:self.tag.tag + [self.session connectToTag:self.tag completionHandler:^(NSError *_Nullable error) { if (![self _hasListeners:@"didConnectTag"]) { return; @@ -43,7 +43,7 @@ - (void)connect:(id)unused - (NSNumber *)isConnected:(id)unused { - return [NSNumber numberWithBool:self.session.connectedTag == self.tag.tag ? YES : NO]; + return [NSNumber numberWithBool:self.session.connectedTag == self.tag ? YES : NO]; } @end From 40da6457b65c6847b75f7efa5d638700ac0b7e04 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Mon, 8 Feb 2021 13:21:38 +0530 Subject: [PATCH 23/59] update(ios): updated nfc adapter class code --- ios/Classes/TiNfcNfcAdapterProxy.m | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/ios/Classes/TiNfcNfcAdapterProxy.m b/ios/Classes/TiNfcNfcAdapterProxy.m index 854b7ee..bb265ef 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.m +++ b/ios/Classes/TiNfcNfcAdapterProxy.m @@ -63,7 +63,7 @@ - (NSNumber *)isEnabled:(id)type if (![TiUtils isIOSVersionOrGreater:@"13.0"]) { return @(NO); } - NSString *sessionType = [[type objectAtIndex:0] valueForKey:@"type"]; + NSString *sessionType = [[type firstObject] valueForKey:@"type"]; if ([sessionType isEqualToString:@"NFCNDEFReaderSession"]) { return @([NFCNDEFReaderSession readingAvailable]); } else if ([sessionType isEqualToString:@"NFCTagReaderSession"]) { @@ -73,8 +73,8 @@ - (NSNumber *)isEnabled:(id)type - (void)begin:(id)type { - NSString *sessionType = [[type objectAtIndex:0] valueForKey:@"type"]; - NSArray *pollingOptions = [[type objectAtIndex:0] valueForKey:@"pollingOptions"]; + NSString *sessionType = [[type firstObject] valueForKey:@"type"]; + NSArray *pollingOptions = [[type firstObject] valueForKey:@"pollingOptions"]; if ([sessionType isEqualToString:@"NFCNDEFReaderSession"]) { [[self nfcSession] beginSession]; } else if ([sessionType isEqualToString:@"NFCTagReaderSession"]) { @@ -84,8 +84,8 @@ - (void)begin:(id)type - (void)invalidate:(id)type { - NSString *sessionType = [[type objectAtIndex:0] valueForKey:@"type"]; - NSArray *pollingOptions = [[type objectAtIndex:0] valueForKey:@"pollingOptions"]; + NSString *sessionType = [[type firstObject] valueForKey:@"type"]; + NSArray *pollingOptions = [[type firstObject] valueForKey:@"pollingOptions"]; if ([sessionType isEqualToString:@"NFCNDEFReaderSession"]) { [[self nfcSession] invalidateSession]; _nfcSession = nil; @@ -97,50 +97,50 @@ - (void)invalidate:(id)type - (TiNfcMiFareUltralightTagTechnology *)createTagTechMifareUltralight:(id)args { - if ([args valueForKey:@"tag"] == nil) { + if ([[args firstObject] valueForKey:@"tag"] == nil) { return nil; } - TiNfcTagProxy *tag = [[args objectAtIndex:0] valueForKey:@"tag"]; + TiNfcTagProxy *tag = [[args firstObject] valueForKey:@"tag"]; TiNfcMiFareUltralightTagTechnology *mifareTag = [[TiNfcMiFareUltralightTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tag]; return mifareTag; } - (TiNfcNDEFTagTechnology *)createTagTechNdef:(id)args { - if ([args valueForKey:@"tag"] == nil) { + if ([[args firstObject] valueForKey:@"tag"] == nil) { return nil; } - TiNfcTagProxy *tag = [[args objectAtIndex:0] valueForKey:@"tag"]; + TiNfcTagProxy *tag = [[args firstObject] valueForKey:@"tag"]; TiNfcNDEFTagTechnology *ndefTag = [[TiNfcNDEFTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcSession andTag:tag]; return ndefTag; } - (TiNfcVTagTechnology *)createTagTechNfcV:(id)args { - if ([args valueForKey:@"tag"] == nil) { + if ([[args firstObject] valueForKey:@"tag"] == nil) { return nil; } - TiNfcTagProxy *tag = [[args objectAtIndex:0] valueForKey:@"tag"]; + TiNfcTagProxy *tag = [[args firstObject] valueForKey:@"tag"]; TiNfcVTagTechnology *nfcvTag = [[TiNfcVTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tag]; return nfcvTag; } - (TiNfcISODepTagTechnology *)createTagTechISODep:(id)args { - if ([args valueForKey:@"tag"] == nil) { + if ([[args firstObject] valueForKey:@"tag"] == nil) { return nil; } - TiNfcTagProxy *tag = [[args objectAtIndex:0] valueForKey:@"tag"]; + TiNfcTagProxy *tag = [[args firstObject] valueForKey:@"tag"]; TiNfcISODepTagTechnology *isodepTag = [[TiNfcISODepTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tag]; return isodepTag; } - (TiNfcFTagTechnology *)createTagTechNfcF:(id)args { - if ([args valueForKey:@"tag"] == nil) { + if ([[args firstObject] valueForKey:@"tag"] == nil) { return nil; } - TiNfcTagProxy *tag = [[args objectAtIndex:0] valueForKey:@"tag"]; + TiNfcTagProxy *tag = [[args firstObject] valueForKey:@"tag"]; TiNfcFTagTechnology *nfcfTag = [[TiNfcFTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcTagReadersession andTag:tag]; return nfcfTag; } From 5c4f4a59b4e0cca2708dbf26d4d0eaa91ab9b836 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Fri, 29 Jan 2021 12:42:22 +0530 Subject: [PATCH 24/59] feat(ios): updated the sample and ut for adapter class. --- ios/example/app.js | 17 ++++++- test/unit/specs/module.spec.js | 85 ++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+), 2 deletions(-) diff --git a/ios/example/app.js b/ios/example/app.js index cc61cbd..d123bd6 100644 --- a/ios/example/app.js +++ b/ios/example/app.js @@ -30,6 +30,7 @@ */ var nfc = require('ti.nfc'); +var sessionType = ({type:nfc.READER_SESSION_NFC_TAG, pollingOptions: [nfc.NFC_TAG_ISO14443]} ) var nfcAdapter = nfc.createNfcAdapter({ onNdefDiscovered: handleDiscovery }); @@ -61,12 +62,24 @@ var btn = Ti.UI.createButton({ }); btn.addEventListener('click', function() { - if (!nfcAdapter.isEnabled()) { + if (!nfcAdapter.isEnabled(sessionType)) { Ti.API.error('This device does not support NFC capabilities!'); return; } + nfcAdapter.begin(sessionType); // This is required for iOS only. Use "invalidate()" to invalidate a session. +}); - nfcAdapter.begin(); // This is required for iOS only. Use "invalidate()" to invalidate a session. +nfcAdapter.addEventListener('didDetectTags', function (e) { + var mifare = nfcAdapter.createTagTechMifareUltralight({'tag':e.tags[0]}); + mifare.addEventListener('didConnectTag', function (e) { + Ti.API.info('Connected tag object : ' + e.code); + alert('Tag Connected: ' + e.tag); + }); + mifare.connect({mifare}); + nfcAdapter.invalidate(sessionType); +}); +nfcAdapter.addEventListener('didInvalidateWithError', function (e) { + Ti.API.info('code: ' + e.code); }); win.add(btn); diff --git a/test/unit/specs/module.spec.js b/test/unit/specs/module.spec.js index 75871a0..1afeba3 100644 --- a/test/unit/specs/module.spec.js +++ b/test/unit/specs/module.spec.js @@ -19,6 +19,75 @@ describe('ti.nfc', () => { it('.moduleId', () => { expect(NFC.moduleId).toBe('ti.nfc'); }); + + describe('methods', () => { + it('nfcAdapter should be defined', () => { + const nfcAdapter = NFC.createNfcAdapter(); + + expect(nfcAdapter).toBeDefined(); + }); + + it('should have isEnabled function', () => { + const nfcAdapter = NFC.createNfcAdapter(); + + expect(nfcAdapter.isEnabled).toEqual(jasmine.any(Function)); + }); + + it('should have begin function', () => { + const nfcAdapter = NFC.createNfcAdapter(); + + expect(nfcAdapter.begin).toEqual(jasmine.any(Function)); + }); + + it('should have invalidate function', () => { + const nfcAdapter = NFC.createNfcAdapter(); + + expect(nfcAdapter.invalidate).toEqual(jasmine.any(Function)); + }); + + it('should have createTagTechMifareUltralight function', () => { + const nfcAdapter = NFC.createNfcAdapter(); + + expect(nfcAdapter.createTagTechMifareUltralight).toEqual(jasmine.any(Function)); + }); + + it('should have createTagTechNdef function', () => { + const nfcAdapter = NFC.createNfcAdapter(); + + expect(nfcAdapter.createTagTechNdef).toEqual(jasmine.any(Function)); + }); + + it('should have createTagTechNfcV function', () => { + const nfcAdapter = NFC.createNfcAdapter(); + + expect(nfcAdapter.createTagTechNfcV).toEqual(jasmine.any(Function)); + }); + + it('should have createTagTechISODep function', () => { + const nfcAdapter = NFC.createNfcAdapter(); + + expect(nfcAdapter.createTagTechISODep).toEqual(jasmine.any(Function)); + }); + + it('should have createTagTechNfcF function', () => { + const nfcAdapter = NFC.createNfcAdapter(); + + expect(nfcAdapter.createTagTechNfcF).toEqual(jasmine.any(Function)); + }); + + it('should have setOnNdefDiscovered function', () => { + const nfcAdapter = NFC.createNfcAdapter(); + + expect(nfcAdapter.setOnNdefDiscovered).toEqual(jasmine.any(Function)); + }); + + it('should have setOnNdefInvalidated function', () => { + const nfcAdapter = NFC.createNfcAdapter(); + + expect(nfcAdapter.setOnNdefInvalidated).toEqual(jasmine.any(Function)); + }); + + }); } // TODO: guid, name @@ -227,6 +296,22 @@ describe('ti.nfc', () => { } if (IOS) { + it('.NFC_TAG_ISO14443', () => { + expect(NFC.NFC_TAG_ISO14443).toEqual(jasmine.any(Number)); + }); + it('.NFC_TAG_ISO15693', () => { + expect(NFC.NFC_TAG_ISO15693).toEqual(jasmine.any(Number)); + }); + it('.NFC_TAG_ISO18092', () => { + expect(NFC.NFC_TAG_ISO18092).toEqual(jasmine.any(Number)); + }); + it('.READER_SESSION_NFC_NDEF', () => { + expect(NFC.READER_SESSION_NFC_NDEF).toEqual(jasmine.any(String)); + }); + it('.READER_SESSION_NFC_TAG', () => { + expect(NFC.READER_SESSION_NFC_TAG).toEqual(jasmine.any(String)); + }); + it('.INVALIDATION_ERROR_USER_CANCELED', () => { expect(NFC.INVALIDATION_ERROR_USER_CANCELED).toEqual(jasmine.any(Number)); }); From a1128e1a0991fa63c2dee9160395db4ce94efe12 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Thu, 11 Feb 2021 15:15:01 +0530 Subject: [PATCH 25/59] update(ios): added required condition and updated didconnecttag method --- ios/example/app.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ios/example/app.js b/ios/example/app.js index d123bd6..6cffdca 100644 --- a/ios/example/app.js +++ b/ios/example/app.js @@ -28,7 +28,8 @@ * Finally, ensure to enable the "NFC Tag Reading" capability in your provisioning profile * by checking it in the Apple Developer Center (https://developer.apple.com). */ - +const IOS = (Ti.Platform.osname === 'iphone' || Ti.Platform.osname === 'ipad'); +const ANDROID = (Ti.Platform.osname === 'android'); var nfc = require('ti.nfc'); var sessionType = ({type:nfc.READER_SESSION_NFC_TAG, pollingOptions: [nfc.NFC_TAG_ISO14443]} ) var nfcAdapter = nfc.createNfcAdapter({ @@ -66,13 +67,15 @@ btn.addEventListener('click', function() { Ti.API.error('This device does not support NFC capabilities!'); return; } - nfcAdapter.begin(sessionType); // This is required for iOS only. Use "invalidate()" to invalidate a session. + if (IOS){ + nfcAdapter.begin(sessionType); + }// This is required for iOS only. Use "invalidate()" to invalidate a session. }); nfcAdapter.addEventListener('didDetectTags', function (e) { var mifare = nfcAdapter.createTagTechMifareUltralight({'tag':e.tags[0]}); mifare.addEventListener('didConnectTag', function (e) { - Ti.API.info('Connected tag object : ' + e.code); + Ti.API.info('Connected tag object : ' + e.tag); alert('Tag Connected: ' + e.tag); }); mifare.connect({mifare}); From 6732befcb06cae4972fdadbab13e07e07b3c483f Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Fri, 12 Feb 2021 17:31:30 +0530 Subject: [PATCH 26/59] update(ios): updated node version, sample and ut --- Jenkinsfile | 2 +- ios/example/app.js | 5 +++-- test/unit/specs/module.spec.js | 16 +++++----------- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f49fed8..bd908ee 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,7 +3,7 @@ library 'pipeline-library' buildModule { // defaults: - //nodeVersion = '4.7.3' // Must have version set up on Jenkins master before it can be changed + nodeVersion = '12.18.0' // Must have version set up on Jenkins master before it can be changed sdkVersion = '9.2.0.GA' androidAPILevel = '25' // if changed, must install on build nodes iosLabels = 'osx && xcode-12' diff --git a/ios/example/app.js b/ios/example/app.js index 6cffdca..cd3858f 100644 --- a/ios/example/app.js +++ b/ios/example/app.js @@ -31,7 +31,8 @@ const IOS = (Ti.Platform.osname === 'iphone' || Ti.Platform.osname === 'ipad'); const ANDROID = (Ti.Platform.osname === 'android'); var nfc = require('ti.nfc'); -var sessionType = ({type:nfc.READER_SESSION_NFC_TAG, pollingOptions: [nfc.NFC_TAG_ISO14443]} ) +var sessionType = ({type:nfc.READER_SESSION_NFC_TAG, pollingOptions: [nfc.NFC_TAG_ISO14443]}) +var session = ({type:nfc.READER_SESSION_NFC_TAG}) var nfcAdapter = nfc.createNfcAdapter({ onNdefDiscovered: handleDiscovery }); @@ -63,7 +64,7 @@ var btn = Ti.UI.createButton({ }); btn.addEventListener('click', function() { - if (!nfcAdapter.isEnabled(sessionType)) { + if (!nfcAdapter.isEnabled(session)) { Ti.API.error('This device does not support NFC capabilities!'); return; } diff --git a/test/unit/specs/module.spec.js b/test/unit/specs/module.spec.js index 1afeba3..5baf7d2 100644 --- a/test/unit/specs/module.spec.js +++ b/test/unit/specs/module.spec.js @@ -1,4 +1,5 @@ let NFC; +let nfcAdapter; const IOS = (Ti.Platform.osname === 'iphone' || Ti.Platform.osname === 'ipad'); const ANDROID = (Ti.Platform.osname === 'android'); @@ -21,68 +22,61 @@ describe('ti.nfc', () => { }); describe('methods', () => { + beforeAll(function () { + nfcAdapter = NFC.createNfcAdapter(); + }); + it('nfcAdapter should be defined', () => { - const nfcAdapter = NFC.createNfcAdapter(); expect(nfcAdapter).toBeDefined(); }); it('should have isEnabled function', () => { - const nfcAdapter = NFC.createNfcAdapter(); expect(nfcAdapter.isEnabled).toEqual(jasmine.any(Function)); }); it('should have begin function', () => { - const nfcAdapter = NFC.createNfcAdapter(); expect(nfcAdapter.begin).toEqual(jasmine.any(Function)); }); it('should have invalidate function', () => { - const nfcAdapter = NFC.createNfcAdapter(); expect(nfcAdapter.invalidate).toEqual(jasmine.any(Function)); }); it('should have createTagTechMifareUltralight function', () => { - const nfcAdapter = NFC.createNfcAdapter(); expect(nfcAdapter.createTagTechMifareUltralight).toEqual(jasmine.any(Function)); }); it('should have createTagTechNdef function', () => { - const nfcAdapter = NFC.createNfcAdapter(); expect(nfcAdapter.createTagTechNdef).toEqual(jasmine.any(Function)); }); it('should have createTagTechNfcV function', () => { - const nfcAdapter = NFC.createNfcAdapter(); expect(nfcAdapter.createTagTechNfcV).toEqual(jasmine.any(Function)); }); it('should have createTagTechISODep function', () => { - const nfcAdapter = NFC.createNfcAdapter(); expect(nfcAdapter.createTagTechISODep).toEqual(jasmine.any(Function)); }); it('should have createTagTechNfcF function', () => { - const nfcAdapter = NFC.createNfcAdapter(); expect(nfcAdapter.createTagTechNfcF).toEqual(jasmine.any(Function)); }); it('should have setOnNdefDiscovered function', () => { - const nfcAdapter = NFC.createNfcAdapter(); expect(nfcAdapter.setOnNdefDiscovered).toEqual(jasmine.any(Function)); }); it('should have setOnNdefInvalidated function', () => { - const nfcAdapter = NFC.createNfcAdapter(); expect(nfcAdapter.setOnNdefInvalidated).toEqual(jasmine.any(Function)); }); From b01e041aff0563651f349cc460ead6d7c1d5685e Mon Sep 17 00:00:00 2001 From: Fasihul Haque Date: Tue, 16 Feb 2021 14:22:34 +0530 Subject: [PATCH 27/59] chore(deps-dev): updated karma-titanium-launcher to 0.8.1 and sdk version to 9.3.1.GA --- Jenkinsfile | 3 +- ios/titanium.xcconfig | 2 +- package-lock.json | 1486 ++++++++++++++++++-------------- package.json | 2 +- test/unit/karma.unit.config.js | 2 +- 5 files changed, 854 insertions(+), 641 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index bd908ee..f75a09d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,8 +3,7 @@ library 'pipeline-library' buildModule { // defaults: - nodeVersion = '12.18.0' // Must have version set up on Jenkins master before it can be changed - sdkVersion = '9.2.0.GA' + sdkVersion = '9.3.1.GA' androidAPILevel = '25' // if changed, must install on build nodes iosLabels = 'osx && xcode-12' } diff --git a/ios/titanium.xcconfig b/ios/titanium.xcconfig index 8bef91b..87aad88 100644 --- a/ios/titanium.xcconfig +++ b/ios/titanium.xcconfig @@ -4,7 +4,7 @@ // OF YOUR TITANIUM SDK YOU'RE BUILDING FOR // // -TITANIUM_SDK_VERSION = 9.2.0.GA +TITANIUM_SDK_VERSION = 9.3.1.GA // // THESE SHOULD BE OK GENERALLY AS-IS diff --git a/package-lock.json b/package-lock.json index daecfb4..7e8bd80 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,57 +14,75 @@ } }, "@babel/compat-data": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.10.3.tgz", - "integrity": "sha512-BDIfJ9uNZuI0LajPfoYV28lX8kyCPMHY6uY4WH1lJdcicmAfxCK5ASzaeV0D/wsUaRH/cLk+amuxtC37sZ8TUg==", - "dev": true, - "requires": { - "browserslist": "^4.12.0", - "invariant": "^2.2.4", - "semver": "^5.5.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.12.13.tgz", + "integrity": "sha512-U/hshG5R+SIoW7HVWIdmy1cB7s3ki+r3FpyEZiCgpi4tFgPnX/vynY80ZGSASOIrUM6O7VxOgCZgdt7h97bUGg==", + "dev": true }, "@babel/core": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.3.tgz", - "integrity": "sha512-5YqWxYE3pyhIi84L84YcwjeEgS+fa7ZjK6IBVGTjDVfm64njkR2lfDhVR5OudLk8x2GK59YoSyVv+L/03k1q9w==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.3", - "@babel/generator": "^7.10.3", - "@babel/helper-module-transforms": "^7.10.1", - "@babel/helpers": "^7.10.1", - "@babel/parser": "^7.10.3", - "@babel/template": "^7.10.3", - "@babel/traverse": "^7.10.3", - "@babel/types": "^7.10.3", + "version": "7.12.16", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.16.tgz", + "integrity": "sha512-t/hHIB504wWceOeaOoONOhu+gX+hpjfeN6YRBT209X/4sibZQfSF1I0HFRRlBe97UZZosGx5XwUg1ZgNbelmNw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.12.15", + "@babel/helper-module-transforms": "^7.12.13", + "@babel/helpers": "^7.12.13", + "@babel/parser": "^7.12.16", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.12.13", + "@babel/types": "^7.12.13", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", "json5": "^2.1.2", - "lodash": "^4.17.13", - "resolve": "^1.3.2", + "lodash": "^4.17.19", "semver": "^5.4.1", "source-map": "^0.5.0" }, "dependencies": { + "@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.12.13" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", + "dev": true + }, + "@babel/highlight": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", + "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -80,46 +98,44 @@ } }, "@babel/generator": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.3.tgz", - "integrity": "sha512-drt8MUHbEqRzNR0xnF8nMehbY11b1SDkRw03PSNH/3Rb2Z35oxkddVSi3rcaak0YJQ86PCuE7Qx1jSFhbLNBMA==", + "version": "7.12.15", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.15.tgz", + "integrity": "sha512-6F2xHxBiFXWNSGb7vyCUTBF8RCLY66rS0zEPcP8t/nQyXjha5EuK4z7H5o7fWG8B4M7y6mqVWq1J+1PuwRhecQ==", "dev": true, "requires": { - "@babel/types": "^7.10.3", + "@babel/types": "^7.12.13", "jsesc": "^2.5.1", - "lodash": "^4.17.13", "source-map": "^0.5.0" } }, "@babel/helper-annotate-as-pure": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.1.tgz", - "integrity": "sha512-ewp3rvJEwLaHgyWGe4wQssC2vjks3E80WiUe2BpMb0KhreTjMROCbxXcEovTrbeGVdQct5VjQfrv9EgC+xMzCw==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz", + "integrity": "sha512-7YXfX5wQ5aYM/BOlbSccHDbuXXFPxeoUmfWtz8le2yTkTZc+BxsiEnENFoi2SlmA8ewDkG2LgIMIVzzn2h8kfw==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.12.13" } }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.3.tgz", - "integrity": "sha512-lo4XXRnBlU6eRM92FkiZxpo1xFLmv3VsPFk61zJKMm7XYJfwqXHsYJTY6agoc4a3L8QPw1HqWehO18coZgbT6A==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.12.13.tgz", + "integrity": "sha512-CZOv9tGphhDRlVjVkAgm8Nhklm9RzSmWpX2my+t7Ua/KT616pEzXsQCjinzvkRvHWJ9itO4f296efroX23XCMA==", "dev": true, "requires": { - "@babel/helper-explode-assignable-expression": "^7.10.3", - "@babel/types": "^7.10.3" + "@babel/helper-explode-assignable-expression": "^7.12.13", + "@babel/types": "^7.12.13" } }, "@babel/helper-compilation-targets": { - "version": "7.10.2", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.10.2.tgz", - "integrity": "sha512-hYgOhF4To2UTB4LTaZepN/4Pl9LD4gfbJx8A34mqoluT8TLbof1mhUlYuNWTEebONa8+UlCC4X0TEXu7AOUyGA==", + "version": "7.12.16", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.12.16.tgz", + "integrity": "sha512-dBHNEEaZx7F3KoUYqagIhRIeqyyuI65xMndMZ3WwGwEBI609I4TleYQHcrS627vbKyNTXqShoN+fvYD9HuQxAg==", "dev": true, "requires": { - "@babel/compat-data": "^7.10.1", - "browserslist": "^4.12.0", - "invariant": "^2.2.4", - "levenary": "^1.1.1", + "@babel/compat-data": "^7.12.13", + "@babel/helper-validator-option": "^7.12.16", + "browserslist": "^4.14.5", "semver": "^5.5.0" }, "dependencies": { @@ -132,179 +148,178 @@ } }, "@babel/helper-create-class-features-plugin": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.10.3.tgz", - "integrity": "sha512-iRT9VwqtdFmv7UheJWthGc/h2s7MqoweBF9RUj77NFZsg9VfISvBTum3k6coAhJ8RWv2tj3yUjA03HxPd0vfpQ==", + "version": "7.12.16", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.16.tgz", + "integrity": "sha512-KbSEj8l9zYkMVHpQqM3wJNxS1d9h3U9vm/uE5tpjMbaj3lTp+0noe3KPsV5dSD9jxKnf9jO9Ip9FX5PKNZCKow==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.10.3", - "@babel/helper-member-expression-to-functions": "^7.10.3", - "@babel/helper-optimise-call-expression": "^7.10.3", - "@babel/helper-plugin-utils": "^7.10.3", - "@babel/helper-replace-supers": "^7.10.1", - "@babel/helper-split-export-declaration": "^7.10.1" + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-member-expression-to-functions": "^7.12.16", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/helper-replace-supers": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13" } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.10.1.tgz", - "integrity": "sha512-Rx4rHS0pVuJn5pJOqaqcZR4XSgeF9G/pO/79t+4r7380tXFJdzImFnxMU19f83wjSrmKHq6myrM10pFHTGzkUA==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.10.1", - "@babel/helper-regex": "^7.10.1", - "regexpu-core": "^4.7.0" - } - }, - "@babel/helper-define-map": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.3.tgz", - "integrity": "sha512-bxRzDi4Sin/k0drWCczppOhov1sBSdBvXJObM1NLHQzjhXhwRtn7aRWGvLJWCYbuu2qUk3EKs6Ci9C9ps8XokQ==", + "version": "7.12.16", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.16.tgz", + "integrity": "sha512-jAcQ1biDYZBdaAxB4yg46/XirgX7jBDiMHDbwYQOgtViLBXGxJpZQ24jutmBqAIB/q+AwB6j+NbBXjKxEY8vqg==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.10.3", - "@babel/types": "^7.10.3", - "lodash": "^4.17.13" + "@babel/helper-annotate-as-pure": "^7.12.13", + "regexpu-core": "^4.7.1" } }, "@babel/helper-explode-assignable-expression": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.10.3.tgz", - "integrity": "sha512-0nKcR64XrOC3lsl+uhD15cwxPvaB6QKUDlD84OT9C3myRbhJqTMYir69/RWItUvHpharv0eJ/wk7fl34ONSwZw==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.12.13.tgz", + "integrity": "sha512-5loeRNvMo9mx1dA/d6yNi+YiKziJZFylZnCo1nmFF4qPU4yJ14abhWESuSMQSlQxWdxdOFzxXjk/PpfudTtYyw==", "dev": true, "requires": { - "@babel/traverse": "^7.10.3", - "@babel/types": "^7.10.3" + "@babel/types": "^7.12.13" } }, "@babel/helper-function-name": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.3.tgz", - "integrity": "sha512-FvSj2aiOd8zbeqijjgqdMDSyxsGHaMt5Tr0XjQsGKHD3/1FP3wksjnLAWzxw7lvXiej8W1Jt47SKTZ6upQNiRw==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", + "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.10.3", - "@babel/template": "^7.10.3", - "@babel/types": "^7.10.3" + "@babel/helper-get-function-arity": "^7.12.13", + "@babel/template": "^7.12.13", + "@babel/types": "^7.12.13" } }, "@babel/helper-get-function-arity": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.3.tgz", - "integrity": "sha512-iUD/gFsR+M6uiy69JA6fzM5seno8oE85IYZdbVVEuQaZlEzMO2MXblh+KSPJgsZAUx0EEbWXU0yJaW7C9CdAVg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", + "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", "dev": true, "requires": { - "@babel/types": "^7.10.3" + "@babel/types": "^7.12.13" } }, "@babel/helper-hoist-variables": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.3.tgz", - "integrity": "sha512-9JyafKoBt5h20Yv1+BXQMdcXXavozI1vt401KBiRc2qzUepbVnd7ogVNymY1xkQN9fekGwfxtotH2Yf5xsGzgg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.12.13.tgz", + "integrity": "sha512-KSC5XSj5HreRhYQtZ3cnSnQwDzgnbdUDEFsxkN0m6Q3WrCRt72xrnZ8+h+pX7YxM7hr87zIO3a/v5p/H3TrnVw==", "dev": true, "requires": { - "@babel/types": "^7.10.3" + "@babel/types": "^7.12.13" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.3.tgz", - "integrity": "sha512-q7+37c4EPLSjNb2NmWOjNwj0+BOyYlssuQ58kHEWk1Z78K5i8vTUsteq78HMieRPQSl/NtpQyJfdjt3qZ5V2vw==", + "version": "7.12.16", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.16.tgz", + "integrity": "sha512-zYoZC1uvebBFmj1wFAlXwt35JLEgecefATtKp20xalwEK8vHAixLBXTGxNrVGEmTT+gzOThUgr8UEdgtalc1BQ==", "dev": true, "requires": { - "@babel/types": "^7.10.3" + "@babel/types": "^7.12.13" } }, "@babel/helper-module-imports": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.3.tgz", - "integrity": "sha512-Jtqw5M9pahLSUWA+76nhK9OG8nwYXzhQzVIGFoNaHnXF/r4l7kz4Fl0UAW7B6mqC5myoJiBP5/YQlXQTMfHI9w==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.13.tgz", + "integrity": "sha512-NGmfvRp9Rqxy0uHSSVP+SRIW1q31a7Ji10cLBcqSDUngGentY4FRiHOFZFE1CLU5eiL0oE8reH7Tg1y99TDM/g==", "dev": true, "requires": { - "@babel/types": "^7.10.3" + "@babel/types": "^7.12.13" } }, "@babel/helper-module-transforms": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.1.tgz", - "integrity": "sha512-RLHRCAzyJe7Q7sF4oy2cB+kRnU4wDZY/H2xJFGof+M+SJEGhZsb+GFj5j1AD8NiSaVBJ+Pf0/WObiXu/zxWpFg==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.10.1", - "@babel/helper-replace-supers": "^7.10.1", - "@babel/helper-simple-access": "^7.10.1", - "@babel/helper-split-export-declaration": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1", - "lodash": "^4.17.13" + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.12.13.tgz", + "integrity": "sha512-acKF7EjqOR67ASIlDTupwkKM1eUisNAjaSduo5Cz+793ikfnpe7p4Q7B7EWU2PCoSTPWsQkR7hRUWEIZPiVLGA==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-replace-supers": "^7.12.13", + "@babel/helper-simple-access": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/helper-validator-identifier": "^7.12.11", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.12.13", + "@babel/types": "^7.12.13", + "lodash": "^4.17.19" + }, + "dependencies": { + "@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", + "dev": true + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } } }, "@babel/helper-optimise-call-expression": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.3.tgz", - "integrity": "sha512-kT2R3VBH/cnSz+yChKpaKRJQJWxdGoc6SjioRId2wkeV3bK0wLLioFpJROrX0U4xr/NmxSSAWT/9Ih5snwIIzg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz", + "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==", "dev": true, "requires": { - "@babel/types": "^7.10.3" + "@babel/types": "^7.12.13" } }, "@babel/helper-plugin-utils": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.3.tgz", - "integrity": "sha512-j/+j8NAWUTxOtx4LKHybpSClxHoq6I91DQ/mKgAXn5oNUPIUiGppjPIX3TDtJWPrdfP9Kfl7e4fgVMiQR9VE/g==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.12.13.tgz", + "integrity": "sha512-C+10MXCXJLiR6IeG9+Wiejt9jmtFpxUc3MQqCmPY8hfCjyUGl9kT+B2okzEZrtykiwrc4dbCPdDoz0A/HQbDaA==", "dev": true }, - "@babel/helper-regex": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.10.1.tgz", - "integrity": "sha512-7isHr19RsIJWWLLFn21ubFt223PjQyg1HY7CZEMRr820HttHPpVvrsIN3bUOo44DEfFV4kBXO7Abbn9KTUZV7g==", + "@babel/helper-remap-async-to-generator": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.12.13.tgz", + "integrity": "sha512-Qa6PU9vNcj1NZacZZI1Mvwt+gXDH6CTfgAkSjeRMLE8HxtDK76+YDId6NQR+z7Rgd5arhD2cIbS74r0SxD6PDA==", "dev": true, "requires": { - "lodash": "^4.17.13" + "@babel/helper-annotate-as-pure": "^7.12.13", + "@babel/helper-wrap-function": "^7.12.13", + "@babel/types": "^7.12.13" } }, - "@babel/helper-remap-async-to-generator": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.10.3.tgz", - "integrity": "sha512-sLB7666ARbJUGDO60ZormmhQOyqMX/shKBXZ7fy937s+3ID8gSrneMvKSSb+8xIM5V7Vn6uNVtOY1vIm26XLtA==", + "@babel/helper-replace-supers": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.13.tgz", + "integrity": "sha512-pctAOIAMVStI2TMLhozPKbf5yTEXc0OJa0eENheb4w09SrgOWEs+P4nTOZYJQCqs8JlErGLDPDJTiGIp3ygbLg==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.10.1", - "@babel/helper-wrap-function": "^7.10.1", - "@babel/template": "^7.10.3", - "@babel/traverse": "^7.10.3", - "@babel/types": "^7.10.3" + "@babel/helper-member-expression-to-functions": "^7.12.13", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/traverse": "^7.12.13", + "@babel/types": "^7.12.13" } }, - "@babel/helper-replace-supers": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.1.tgz", - "integrity": "sha512-SOwJzEfpuQwInzzQJGjGaiG578UYmyi2Xw668klPWV5n07B73S0a9btjLk/52Mlcxa+5AdIYqws1KyXRfMoB7A==", + "@babel/helper-simple-access": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.13.tgz", + "integrity": "sha512-0ski5dyYIHEfwpWGx5GPWhH35j342JaflmCeQmsPWcrOQDtCN6C1zKAVRFVbK53lPW2c9TsuLLSUDf0tIGJ5hA==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.10.1", - "@babel/helper-optimise-call-expression": "^7.10.1", - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/types": "^7.12.13" } }, - "@babel/helper-simple-access": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.1.tgz", - "integrity": "sha512-VSWpWzRzn9VtgMJBIWTZ+GP107kZdQ4YplJlCmIrjoLVSi/0upixezHCDG8kpPVTBJpKfxTH01wDhh+jS2zKbw==", + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz", + "integrity": "sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA==", "dev": true, "requires": { - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/types": "^7.12.1" } }, "@babel/helper-split-export-declaration": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz", - "integrity": "sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", + "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==", "dev": true, "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.12.13" } }, "@babel/helper-validator-identifier": { @@ -313,27 +328,33 @@ "integrity": "sha512-bU8JvtlYpJSBPuj1VUmKpFGaDZuLxASky3LhaKj3bmpSTY6VWooSM8msk+Z0CZoErFye2tlABF6yDkT3FOPAXw==", "dev": true }, + "@babel/helper-validator-option": { + "version": "7.12.16", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.16.tgz", + "integrity": "sha512-uCgsDBPUQDvzr11ePPo4TVEocxj8RXjUVSC/Y8N1YpVAI/XDdUwGJu78xmlGhTxj2ntaWM7n9LQdRtyhOzT2YQ==", + "dev": true + }, "@babel/helper-wrap-function": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.10.1.tgz", - "integrity": "sha512-C0MzRGteVDn+H32/ZgbAv5r56f2o1fZSA/rj/TYo8JEJNHg+9BdSmKBUND0shxWRztWhjlT2cvHYuynpPsVJwQ==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.12.13.tgz", + "integrity": "sha512-t0aZFEmBJ1LojdtJnhOaQEVejnzYhyjWHSsNSNo8vOYRbAJNh6r6GQF7pd36SqG7OKGbn+AewVQ/0IfYfIuGdw==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/helper-function-name": "^7.12.13", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.12.13", + "@babel/types": "^7.12.13" } }, "@babel/helpers": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.1.tgz", - "integrity": "sha512-muQNHF+IdU6wGgkaJyhhEmI54MOZBKsFfsXFhboz1ybwJ1Kl7IHlbm2a++4jwrmY5UYsgitt5lfqo1wMFcHmyw==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.13.tgz", + "integrity": "sha512-oohVzLRZ3GQEk4Cjhfs9YkJA4TdIDTObdBEZGrd6F/T0GPSnuV6l22eMcxlvcvzVIPH3VTtxbseudM1zIE+rPQ==", "dev": true, "requires": { - "@babel/template": "^7.10.1", - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.12.13", + "@babel/types": "^7.12.13" } }, "@babel/highlight": { @@ -348,121 +369,142 @@ } }, "@babel/parser": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.3.tgz", - "integrity": "sha512-oJtNJCMFdIMwXGmx+KxuaD7i3b8uS7TTFYW/FNG2BT8m+fmGHoiPYoH0Pe3gya07WuFmM5FCDIr1x0irkD/hyA==", + "version": "7.12.16", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.16.tgz", + "integrity": "sha512-c/+u9cqV6F0+4Hpq01jnJO+GLp2DdT63ppz9Xa+6cHaajM9VFzK/iDXiKK65YtpeVwu+ctfS6iqlMqRgQRzeCw==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.10.3.tgz", - "integrity": "sha512-WUUWM7YTOudF4jZBAJIW9D7aViYC/Fn0Pln4RIHlQALyno3sXSjqmTA4Zy1TKC2D49RCR8Y/Pn4OIUtEypK3CA==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.13.tgz", + "integrity": "sha512-1KH46Hx4WqP77f978+5Ye/VUbuwQld2hph70yaw2hXS2v7ER2f3nlpNMu909HO2rbvP0NKLlMVDPh9KXklVMhA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.3", - "@babel/helper-remap-async-to-generator": "^7.10.3", + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-remap-async-to-generator": "^7.12.13", "@babel/plugin-syntax-async-generators": "^7.8.0" } }, "@babel/plugin-proposal-class-properties": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.10.1.tgz", - "integrity": "sha512-sqdGWgoXlnOdgMXU+9MbhzwFRgxVLeiGBqTrnuS7LC2IBU31wSsESbTUreT2O418obpfPdGUR2GbEufZF1bpqw==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.12.13.tgz", + "integrity": "sha512-8SCJ0Ddrpwv4T7Gwb33EmW1V9PY5lggTO+A8WjyIwxrSHDUyBw4MtF96ifn1n8H806YlxbVCoKXbbmzD6RD+cA==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-create-class-features-plugin": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-proposal-dynamic-import": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.10.1.tgz", - "integrity": "sha512-Cpc2yUVHTEGPlmiQzXj026kqwjEQAD9I4ZC16uzdbgWgitg/UHKHLffKNCQZ5+y8jpIZPJcKcwsr2HwPh+w3XA==", + "version": "7.12.16", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.12.16.tgz", + "integrity": "sha512-yiDkYFapVxNOCcBfLnsb/qdsliroM+vc3LHiZwS4gh7pFjo5Xq3BDhYBNn3H3ao+hWPvqeeTdU+s+FIvokov+w==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", + "@babel/helper-plugin-utils": "^7.12.13", "@babel/plugin-syntax-dynamic-import": "^7.8.0" } }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.13.tgz", + "integrity": "sha512-INAgtFo4OnLN3Y/j0VwAgw3HDXcDtX+C/erMvWzuV9v71r7urb6iyMXu7eM9IgLr1ElLlOkaHjJ0SbCmdOQ3Iw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + } + }, "@babel/plugin-proposal-json-strings": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.10.1.tgz", - "integrity": "sha512-m8r5BmV+ZLpWPtMY2mOKN7wre6HIO4gfIiV+eOmsnZABNenrt/kzYBwrh+KOfgumSWpnlGs5F70J8afYMSJMBg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.12.13.tgz", + "integrity": "sha512-v9eEi4GiORDg8x+Dmi5r8ibOe0VXoKDeNPYcTTxdGN4eOWikrJfDJCJrr1l5gKGvsNyGJbrfMftC2dTL6oz7pg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", + "@babel/helper-plugin-utils": "^7.12.13", "@babel/plugin-syntax-json-strings": "^7.8.0" } }, + "@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.12.13.tgz", + "integrity": "sha512-fqmiD3Lz7jVdK6kabeSr1PZlWSUVqSitmHEe3Z00dtGTKieWnX9beafvavc32kjORa5Bai4QNHgFDwWJP+WtSQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + } + }, "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.10.1.tgz", - "integrity": "sha512-56cI/uHYgL2C8HVuHOuvVowihhX0sxb3nnfVRzUeVHTWmRHTZrKuAh/OBIMggGU/S1g/1D2CRCXqP+3u7vX7iA==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.12.13.tgz", + "integrity": "sha512-Qoxpy+OxhDBI5kRqliJFAl4uWXk3Bn24WeFstPH0iLymFehSAUR8MHpqU7njyXv/qbo7oN6yTy5bfCmXdKpo1Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", + "@babel/helper-plugin-utils": "^7.12.13", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" } }, "@babel/plugin-proposal-numeric-separator": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.10.1.tgz", - "integrity": "sha512-jjfym4N9HtCiNfyyLAVD8WqPYeHUrw4ihxuAynWj6zzp2gf9Ey2f7ImhFm6ikB3CLf5Z/zmcJDri6B4+9j9RsA==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.13.tgz", + "integrity": "sha512-O1jFia9R8BUCl3ZGB7eitaAPu62TXJRHn7rh+ojNERCFyqRwJMTmhz+tJ+k0CwI6CLjX/ee4qW74FSqlq9I35w==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", - "@babel/plugin-syntax-numeric-separator": "^7.10.1" + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.10.3.tgz", - "integrity": "sha512-ZZh5leCIlH9lni5bU/wB/UcjtcVLgR8gc+FAgW2OOY+m9h1II3ItTO1/cewNUcsIDZSYcSaz/rYVls+Fb0ExVQ==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.13.tgz", + "integrity": "sha512-WvA1okB/0OS/N3Ldb3sziSrXg6sRphsBgqiccfcQq7woEn5wQLNX82Oc4PlaFcdwcWHuQXAtb8ftbS8Fbsg/sg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.3", + "@babel/helper-plugin-utils": "^7.12.13", "@babel/plugin-syntax-object-rest-spread": "^7.8.0", - "@babel/plugin-transform-parameters": "^7.10.1" + "@babel/plugin-transform-parameters": "^7.12.13" } }, "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.10.1.tgz", - "integrity": "sha512-VqExgeE62YBqI3ogkGoOJp1R6u12DFZjqwJhqtKc2o5m1YTUuUWnos7bZQFBhwkxIFpWYJ7uB75U7VAPPiKETA==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.12.13.tgz", + "integrity": "sha512-9+MIm6msl9sHWg58NvqpNpLtuFbmpFYk37x8kgnGzAHvX35E1FyAwSUt5hIkSoWJFSAH+iwU8bJ4fcD1zKXOzg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", + "@babel/helper-plugin-utils": "^7.12.13", "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.10.3.tgz", - "integrity": "sha512-yyG3n9dJ1vZ6v5sfmIlMMZ8azQoqx/5/nZTSWX1td6L1H1bsjzA8TInDChpafCZiJkeOFzp/PtrfigAQXxI1Ng==", + "version": "7.12.16", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.16.tgz", + "integrity": "sha512-O3ohPwOhkwji5Mckb7F/PJpJVJY3DpPsrt/F0Bk40+QMk9QpAIqeGusHWqu/mYqsM8oBa6TziL/2mbERWsUZjg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.3", + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", "@babel/plugin-syntax-optional-chaining": "^7.8.0" } }, "@babel/plugin-proposal-private-methods": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.10.1.tgz", - "integrity": "sha512-RZecFFJjDiQ2z6maFprLgrdnm0OzoC23Mx89xf1CcEsxmHuzuXOdniEuI+S3v7vjQG4F5sa6YtUp+19sZuSxHg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.12.13.tgz", + "integrity": "sha512-sV0V57uUwpauixvR7s2o75LmwJI6JECwm5oPUY5beZB1nBl2i37hc7CJGqB5G+58fur5Y6ugvl3LRONk5x34rg==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-create-class-features-plugin": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.10.1.tgz", - "integrity": "sha512-JjfngYRvwmPwmnbRZyNiPFI8zxCZb8euzbCG/LxyKdeTb59tVciKo9GK9bi6JYKInk1H11Dq9j/zRqIH4KigfQ==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.13.tgz", + "integrity": "sha512-XyJmZidNfofEkqFV5VC/bLabGmO5QzenPO/YOfGuEbgU+2sSwMmio3YLb4WtBgcmmdwZHyVyv8on77IUjQ5Gvg==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-create-regexp-features-plugin": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-syntax-async-generators": { @@ -475,12 +517,12 @@ } }, "@babel/plugin-syntax-class-properties": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.10.1.tgz", - "integrity": "sha512-Gf2Yx/iRs1JREDtVZ56OrjjgFHCaldpTnuy9BHla10qyVT3YkIIGEtoDWhyop0ksu1GvNjHIoYRBqm3zoR1jyQ==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-syntax-dynamic-import": { @@ -492,6 +534,15 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, "@babel/plugin-syntax-json-strings": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", @@ -501,6 +552,15 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, "@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", @@ -511,12 +571,12 @@ } }, "@babel/plugin-syntax-numeric-separator": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.1.tgz", - "integrity": "sha512-uTd0OsHrpe3tH5gRPTxG8Voh99/WCU78vIm5NMRYPAqC8lR4vajt6KkCAknCHrx24vkPdd/05yfdGSB4EIY2mg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.10.4" } }, "@babel/plugin-syntax-object-rest-spread": { @@ -547,66 +607,64 @@ } }, "@babel/plugin-syntax-top-level-await": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.10.1.tgz", - "integrity": "sha512-hgA5RYkmZm8FTFT3yu2N9Bx7yVVOKYT6yEdXXo6j2JTm0wNxgqaGeQVaSHRjhfnQbX91DtjFB6McRFSlcJH3xQ==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz", + "integrity": "sha512-A81F9pDwyS7yM//KwbCSDqy3Uj4NMIurtplxphWxoYtNPov7cJsDkAFNNyVlIZ3jwGycVsurZ+LtOA8gZ376iQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-arrow-functions": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.10.1.tgz", - "integrity": "sha512-6AZHgFJKP3DJX0eCNJj01RpytUa3SOGawIxweHkNX2L6PYikOZmoh5B0d7hIHaIgveMjX990IAa/xK7jRTN8OA==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.12.13.tgz", + "integrity": "sha512-tBtuN6qtCTd+iHzVZVOMNp+L04iIJBpqkdY42tWbmjIT5wvR2kx7gxMBsyhQtFzHwBbyGi9h8J8r9HgnOpQHxg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.10.1.tgz", - "integrity": "sha512-XCgYjJ8TY2slj6SReBUyamJn3k2JLUIiiR5b6t1mNCMSvv7yx+jJpaewakikp0uWFQSF7ChPPoe3dHmXLpISkg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.12.13.tgz", + "integrity": "sha512-psM9QHcHaDr+HZpRuJcE1PXESuGWSCcbiGFFhhwfzdbTxaGDVzuVtdNYliAwcRo3GFg0Bc8MmI+AvIGYIJG04A==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1", - "@babel/helper-remap-async-to-generator": "^7.10.1" + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-remap-async-to-generator": "^7.12.13" } }, "@babel/plugin-transform-block-scoped-functions": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.10.1.tgz", - "integrity": "sha512-B7K15Xp8lv0sOJrdVAoukKlxP9N59HS48V1J3U/JGj+Ad+MHq+am6xJVs85AgXrQn4LV8vaYFOB+pr/yIuzW8Q==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.13.tgz", + "integrity": "sha512-zNyFqbc3kI/fVpqwfqkg6RvBgFpC4J18aKKMmv7KdQ/1GgREapSJAykLMVNwfRGO3BtHj3YQZl8kxCXPcVMVeg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-block-scoping": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.10.1.tgz", - "integrity": "sha512-8bpWG6TtF5akdhIm/uWTyjHqENpy13Fx8chg7pFH875aNLwX8JxIxqm08gmAT+Whe6AOmaTeLPe7dpLbXt+xUw==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.13.tgz", + "integrity": "sha512-Pxwe0iqWJX4fOOM2kEZeUuAxHMWb9nK+9oh5d11bsLoB0xMg+mkDpt0eYuDZB7ETrY9bbcVlKUGTOGWy7BHsMQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", - "lodash": "^4.17.13" + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-classes": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.10.3.tgz", - "integrity": "sha512-irEX0ChJLaZVC7FvvRoSIxJlmk0IczFLcwaRXUArBKYHCHbOhe57aG8q3uw/fJsoSXvZhjRX960hyeAGlVBXZw==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.12.13.tgz", + "integrity": "sha512-cqZlMlhCC1rVnxE5ZGMtIb896ijL90xppMiuWXcwcOAuFczynpd3KYemb91XFFPi3wJSe/OcrX9lXoowatkkxA==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.10.1", - "@babel/helper-define-map": "^7.10.3", - "@babel/helper-function-name": "^7.10.3", - "@babel/helper-optimise-call-expression": "^7.10.3", - "@babel/helper-plugin-utils": "^7.10.3", - "@babel/helper-replace-supers": "^7.10.1", - "@babel/helper-split-export-declaration": "^7.10.1", + "@babel/helper-annotate-as-pure": "^7.12.13", + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-replace-supers": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", "globals": "^11.1.0" }, "dependencies": { @@ -619,263 +677,270 @@ } }, "@babel/plugin-transform-computed-properties": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.10.3.tgz", - "integrity": "sha512-GWzhaBOsdbjVFav96drOz7FzrcEW6AP5nax0gLIpstiFaI3LOb2tAg06TimaWU6YKOfUACK3FVrxPJ4GSc5TgA==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.12.13.tgz", + "integrity": "sha512-dDfuROUPGK1mTtLKyDPUavmj2b6kFu82SmgpztBFEO974KMjJT+Ytj3/oWsTUMBmgPcp9J5Pc1SlcAYRpJ2hRA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.3" + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-destructuring": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.10.1.tgz", - "integrity": "sha512-V/nUc4yGWG71OhaTH705pU8ZSdM6c1KmmLP8ys59oOYbT7RpMYAR3MsVOt6OHL0WzG7BlTU076va9fjJyYzJMA==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.12.13.tgz", + "integrity": "sha512-Dn83KykIFzjhA3FDPA1z4N+yfF3btDGhjnJwxIj0T43tP0flCujnU8fKgEkf0C1biIpSv9NZegPBQ1J6jYkwvQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.10.1.tgz", - "integrity": "sha512-19VIMsD1dp02RvduFUmfzj8uknaO3uiHHF0s3E1OHnVsNj8oge8EQ5RzHRbJjGSetRnkEuBYO7TG1M5kKjGLOA==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.13.tgz", + "integrity": "sha512-foDrozE65ZFdUC2OfgeOCrEPTxdB3yjqxpXh8CH+ipd9CHd4s/iq81kcUpyH8ACGNEPdFqbtzfgzbT/ZGlbDeQ==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-create-regexp-features-plugin": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-duplicate-keys": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.10.1.tgz", - "integrity": "sha512-wIEpkX4QvX8Mo9W6XF3EdGttrIPZWozHfEaDTU0WJD/TDnXMvdDh30mzUl/9qWhnf7naicYartcEfUghTCSNpA==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.12.13.tgz", + "integrity": "sha512-NfADJiiHdhLBW3pulJlJI2NB0t4cci4WTZ8FtdIuNc2+8pslXdPtRRAEWqUY+m9kNOk2eRYbTAOipAxlrOcwwQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-exponentiation-operator": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.10.1.tgz", - "integrity": "sha512-lr/przdAbpEA2BUzRvjXdEDLrArGRRPwbaF9rvayuHRvdQ7lUTTkZnhZrJ4LE2jvgMRFF4f0YuPQ20vhiPYxtA==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.13.tgz", + "integrity": "sha512-fbUelkM1apvqez/yYx1/oICVnGo2KM5s63mhGylrmXUxK/IAXSIf87QIxVfZldWf4QsOafY6vV3bX8aMHSvNrA==", "dev": true, "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-for-of": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.10.1.tgz", - "integrity": "sha512-US8KCuxfQcn0LwSCMWMma8M2R5mAjJGsmoCBVwlMygvmDUMkTCykc84IqN1M7t+agSfOmLYTInLCHJM+RUoz+w==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.12.13.tgz", + "integrity": "sha512-xCbdgSzXYmHGyVX3+BsQjcd4hv4vA/FDy7Kc8eOpzKmBBPEOTurt0w5fCRQaGl+GSBORKgJdstQ1rHl4jbNseQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-function-name": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.10.1.tgz", - "integrity": "sha512-//bsKsKFBJfGd65qSNNh1exBy5Y9gD9ZN+DvrJ8f7HXr4avE5POW6zB7Rj6VnqHV33+0vXWUwJT0wSHubiAQkw==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.13.tgz", + "integrity": "sha512-6K7gZycG0cmIwwF7uMK/ZqeCikCGVBdyP2J5SKNCXO5EOHcqi+z7Jwf8AmyDNcBgxET8DrEtCt/mPKPyAzXyqQ==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-literals": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.10.1.tgz", - "integrity": "sha512-qi0+5qgevz1NHLZroObRm5A+8JJtibb7vdcPQF1KQE12+Y/xxl8coJ+TpPW9iRq+Mhw/NKLjm+5SHtAHCC7lAw==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.13.tgz", + "integrity": "sha512-FW+WPjSR7hiUxMcKqyNjP05tQ2kmBCdpEpZHY1ARm96tGQCCBvXKnpjILtDplUnJ/eHZ0lALLM+d2lMFSpYJrQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-member-expression-literals": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.10.1.tgz", - "integrity": "sha512-UmaWhDokOFT2GcgU6MkHC11i0NQcL63iqeufXWfRy6pUOGYeCGEKhvfFO6Vz70UfYJYHwveg62GS83Rvpxn+NA==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.13.tgz", + "integrity": "sha512-kxLkOsg8yir4YeEPHLuO2tXP9R/gTjpuTOjshqSpELUN3ZAg2jfDnKUvzzJxObun38sw3wm4Uu69sX/zA7iRvg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-modules-amd": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.10.1.tgz", - "integrity": "sha512-31+hnWSFRI4/ACFr1qkboBbrTxoBIzj7qA69qlq8HY8p7+YCzkCT6/TvQ1a4B0z27VeWtAeJd6pr5G04dc1iHw==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.12.13.tgz", + "integrity": "sha512-JHLOU0o81m5UqG0Ulz/fPC68/v+UTuGTWaZBUwpEk1fYQ1D9LfKV6MPn4ttJKqRo5Lm460fkzjLTL4EHvCprvA==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1", + "@babel/helper-module-transforms": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.10.1.tgz", - "integrity": "sha512-AQG4fc3KOah0vdITwt7Gi6hD9BtQP/8bhem7OjbaMoRNCH5Djx42O2vYMfau7QnAzQCa+RJnhJBmFFMGpQEzrg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.12.13.tgz", + "integrity": "sha512-OGQoeVXVi1259HjuoDnsQMlMkT9UkZT9TpXAsqWplS/M0N1g3TJAn/ByOCeQu7mfjc5WpSsRU+jV1Hd89ts0kQ==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1", - "@babel/helper-simple-access": "^7.10.1", + "@babel/helper-module-transforms": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-simple-access": "^7.12.13", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.10.3.tgz", - "integrity": "sha512-GWXWQMmE1GH4ALc7YXW56BTh/AlzvDWhUNn9ArFF0+Cz5G8esYlVbXfdyHa1xaD1j+GnBoCeoQNlwtZTVdiG/A==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.12.13.tgz", + "integrity": "sha512-aHfVjhZ8QekaNF/5aNdStCGzwTbU7SI5hUybBKlMzqIMC7w7Ho8hx5a4R/DkTHfRfLwHGGxSpFt9BfxKCoXKoA==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.10.3", - "@babel/helper-module-transforms": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.3", + "@babel/helper-hoist-variables": "^7.12.13", + "@babel/helper-module-transforms": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-validator-identifier": "^7.12.11", "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "dependencies": { + "@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", + "dev": true + } } }, "@babel/plugin-transform-modules-umd": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.10.1.tgz", - "integrity": "sha512-EIuiRNMd6GB6ulcYlETnYYfgv4AxqrswghmBRQbWLHZxN4s7mupxzglnHqk9ZiUpDI4eRWewedJJNj67PWOXKA==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.12.13.tgz", + "integrity": "sha512-BgZndyABRML4z6ibpi7Z98m4EVLFI9tVsZDADC14AElFaNHHBcJIovflJ6wtCqFxwy2YJ1tJhGRsr0yLPKoN+w==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-module-transforms": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.10.3.tgz", - "integrity": "sha512-I3EH+RMFyVi8Iy/LekQm948Z4Lz4yKT7rK+vuCAeRm0kTa6Z5W7xuhRxDNJv0FPya/her6AUgrDITb70YHtTvA==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.12.13.tgz", + "integrity": "sha512-Xsm8P2hr5hAxyYblrfACXpQKdQbx4m2df9/ZZSQ8MAhsadw06+jW7s9zsSw6he+mJZXRlVMyEnVktJo4zjk1WA==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.8.3" + "@babel/helper-create-regexp-features-plugin": "^7.12.13" } }, "@babel/plugin-transform-new-target": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.10.1.tgz", - "integrity": "sha512-MBlzPc1nJvbmO9rPr1fQwXOM2iGut+JC92ku6PbiJMMK7SnQc1rytgpopveE3Evn47gzvGYeCdgfCDbZo0ecUw==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.12.13.tgz", + "integrity": "sha512-/KY2hbLxrG5GTQ9zzZSc3xWiOy379pIETEhbtzwZcw9rvuaVV4Fqy7BYGYOWZnaoXIQYbbJ0ziXLa/sKcGCYEQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-object-super": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.10.1.tgz", - "integrity": "sha512-WnnStUDN5GL+wGQrJylrnnVlFhFmeArINIR9gjhSeYyvroGhBrSAXYg/RHsnfzmsa+onJrTJrEClPzgNmmQ4Gw==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.13.tgz", + "integrity": "sha512-JzYIcj3XtYspZDV8j9ulnoMPZZnF/Cj0LUxPOjR89BdBVx+zYJI9MdMIlUZjbXDX+6YVeS6I3e8op+qQ3BYBoQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", - "@babel/helper-replace-supers": "^7.10.1" + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-replace-supers": "^7.12.13" } }, "@babel/plugin-transform-parameters": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.10.1.tgz", - "integrity": "sha512-tJ1T0n6g4dXMsL45YsSzzSDZCxiHXAQp/qHrucOq5gEHncTA3xDxnd5+sZcoQp+N1ZbieAaB8r/VUCG0gqseOg==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.12.13.tgz", + "integrity": "sha512-e7QqwZalNiBRHCpJg/P8s/VJeSRYgmtWySs1JwvfwPqhBbiWfOcHDKdeAi6oAyIimoKWBlwc8oTgbZHdhCoVZA==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-property-literals": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.10.1.tgz", - "integrity": "sha512-Kr6+mgag8auNrgEpbfIWzdXYOvqDHZOF0+Bx2xh4H2EDNwcbRb9lY6nkZg8oSjsX+DH9Ebxm9hOqtKW+gRDeNA==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.13.tgz", + "integrity": "sha512-nqVigwVan+lR+g8Fj8Exl0UQX2kymtjcWfMOYM1vTYEKujeyv2SkMgazf2qNcK7l4SDiKyTA/nHCPqL4e2zo1A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-regenerator": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.10.3.tgz", - "integrity": "sha512-H5kNeW0u8mbk0qa1jVIVTeJJL6/TJ81ltD4oyPx0P499DhMJrTmmIFCmJ3QloGpQG8K9symccB7S7SJpCKLwtw==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.13.tgz", + "integrity": "sha512-lxb2ZAvSLyJ2PEe47hoGWPmW22v7CtSl9jW8mingV4H2sEX/JOcrAj2nPuGWi56ERUm2bUpjKzONAuT6HCn2EA==", "dev": true, "requires": { "regenerator-transform": "^0.14.2" } }, "@babel/plugin-transform-reserved-words": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.10.1.tgz", - "integrity": "sha512-qN1OMoE2nuqSPmpTqEM7OvJ1FkMEV+BjVeZZm9V9mq/x1JLKQ4pcv8riZJMNN3u2AUGl0ouOMjRr2siecvHqUQ==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.12.13.tgz", + "integrity": "sha512-xhUPzDXxZN1QfiOy/I5tyye+TRz6lA7z6xaT4CLOjPRMVg1ldRf0LHw0TDBpYL4vG78556WuHdyO9oi5UmzZBg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-shorthand-properties": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.10.1.tgz", - "integrity": "sha512-AR0E/lZMfLstScFwztApGeyTHJ5u3JUKMjneqRItWeEqDdHWZwAOKycvQNCasCK/3r5YXsuNG25funcJDu7Y2g==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.13.tgz", + "integrity": "sha512-xpL49pqPnLtf0tVluuqvzWIgLEhuPpZzvs2yabUHSKRNlN7ScYU7aMlmavOeyXJZKgZKQRBlh8rHbKiJDraTSw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-spread": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.10.1.tgz", - "integrity": "sha512-8wTPym6edIrClW8FI2IoaePB91ETOtg36dOkj3bYcNe7aDMN2FXEoUa+WrmPc4xa1u2PQK46fUX2aCb+zo9rfw==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.12.13.tgz", + "integrity": "sha512-dUCrqPIowjqk5pXsx1zPftSq4sT0aCeZVAxhdgs3AMgyaDmoUT0G+5h3Dzja27t76aUEIJWlFgPJqJ/d4dbTtg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1" } }, "@babel/plugin-transform-sticky-regex": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.10.1.tgz", - "integrity": "sha512-j17ojftKjrL7ufX8ajKvwRilwqTok4q+BjkknmQw9VNHnItTyMP5anPFzxFJdCQs7clLcWpCV3ma+6qZWLnGMA==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.13.tgz", + "integrity": "sha512-Jc3JSaaWT8+fr7GRvQP02fKDsYk4K/lYwWq38r/UGfaxo89ajud321NH28KRQ7xy1Ybc0VUE5Pz8psjNNDUglg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1", - "@babel/helper-regex": "^7.10.1" + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-template-literals": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.10.3.tgz", - "integrity": "sha512-yaBn9OpxQra/bk0/CaA4wr41O0/Whkg6nqjqApcinxM7pro51ojhX6fv1pimAnVjVfDy14K0ULoRL70CA9jWWA==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.12.13.tgz", + "integrity": "sha512-arIKlWYUgmNsF28EyfmiQHJLJFlAJNYkuQO10jL46ggjBpeb2re1P9K9YGxNJB45BqTbaslVysXDYm/g3sN/Qg==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.3" + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-typeof-symbol": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.10.1.tgz", - "integrity": "sha512-qX8KZcmbvA23zDi+lk9s6hC1FM7jgLHYIjuLgULgc8QtYnmB3tAVIYkNoKRQ75qWBeyzcoMoK8ZQmogGtC/w0g==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.13.tgz", + "integrity": "sha512-eKv/LmUJpMnu4npgfvs3LiHhJua5fo/CysENxa45YCQXZwKnGCQKAg87bvoqSW1fFT+HA32l03Qxsm8ouTY3ZQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-unicode-escapes": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.10.1.tgz", - "integrity": "sha512-zZ0Poh/yy1d4jeDWpx/mNwbKJVwUYJX73q+gyh4bwtG0/iUlzdEu0sLMda8yuDFS6LBQlT/ST1SJAR6zYwXWgw==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.13.tgz", + "integrity": "sha512-0bHEkdwJ/sN/ikBHfSmOXPypN/beiGqjo+o4/5K+vxEFNPRPdImhviPakMKG4x96l85emoa0Z6cDflsdBusZbw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/plugin-transform-unicode-regex": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.10.1.tgz", - "integrity": "sha512-Y/2a2W299k0VIUdbqYm9X2qS6fE0CUBhhiPpimK6byy7OJ/kORLlIX+J6UrjgNu5awvs62k+6RSslxhcvVw2Tw==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.13.tgz", + "integrity": "sha512-mDRzSNY7/zopwisPZ5kM9XKCfhchqIYwAKRERtEnhYscZB79VRekuRSoYbN0+KVe3y8+q1h6A4svXtP7N+UoCA==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.10.1", - "@babel/helper-plugin-utils": "^7.10.1" + "@babel/helper-create-regexp-features-plugin": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13" } }, "@babel/polyfill": { @@ -897,74 +962,76 @@ } }, "@babel/preset-env": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.10.3.tgz", - "integrity": "sha512-jHaSUgiewTmly88bJtMHbOd1bJf2ocYxb5BWKSDQIP5tmgFuS/n0gl+nhSrYDhT33m0vPxp+rP8oYYgPgMNQlg==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.10.3", - "@babel/helper-compilation-targets": "^7.10.2", - "@babel/helper-module-imports": "^7.10.3", - "@babel/helper-plugin-utils": "^7.10.3", - "@babel/plugin-proposal-async-generator-functions": "^7.10.3", - "@babel/plugin-proposal-class-properties": "^7.10.1", - "@babel/plugin-proposal-dynamic-import": "^7.10.1", - "@babel/plugin-proposal-json-strings": "^7.10.1", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.1", - "@babel/plugin-proposal-numeric-separator": "^7.10.1", - "@babel/plugin-proposal-object-rest-spread": "^7.10.3", - "@babel/plugin-proposal-optional-catch-binding": "^7.10.1", - "@babel/plugin-proposal-optional-chaining": "^7.10.3", - "@babel/plugin-proposal-private-methods": "^7.10.1", - "@babel/plugin-proposal-unicode-property-regex": "^7.10.1", + "version": "7.12.16", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.16.tgz", + "integrity": "sha512-BXCAXy8RE/TzX416pD2hsVdkWo0G+tYd16pwnRV4Sc0fRwTLRS/Ssv8G5RLXUGQv7g4FG7TXkdDJxCjQ5I+Zjg==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.12.13", + "@babel/helper-compilation-targets": "^7.12.16", + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-validator-option": "^7.12.16", + "@babel/plugin-proposal-async-generator-functions": "^7.12.13", + "@babel/plugin-proposal-class-properties": "^7.12.13", + "@babel/plugin-proposal-dynamic-import": "^7.12.16", + "@babel/plugin-proposal-export-namespace-from": "^7.12.13", + "@babel/plugin-proposal-json-strings": "^7.12.13", + "@babel/plugin-proposal-logical-assignment-operators": "^7.12.13", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.13", + "@babel/plugin-proposal-numeric-separator": "^7.12.13", + "@babel/plugin-proposal-object-rest-spread": "^7.12.13", + "@babel/plugin-proposal-optional-catch-binding": "^7.12.13", + "@babel/plugin-proposal-optional-chaining": "^7.12.16", + "@babel/plugin-proposal-private-methods": "^7.12.13", + "@babel/plugin-proposal-unicode-property-regex": "^7.12.13", "@babel/plugin-syntax-async-generators": "^7.8.0", - "@babel/plugin-syntax-class-properties": "^7.10.1", + "@babel/plugin-syntax-class-properties": "^7.12.13", "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", - "@babel/plugin-syntax-numeric-separator": "^7.10.1", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.0", "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", "@babel/plugin-syntax-optional-chaining": "^7.8.0", - "@babel/plugin-syntax-top-level-await": "^7.10.1", - "@babel/plugin-transform-arrow-functions": "^7.10.1", - "@babel/plugin-transform-async-to-generator": "^7.10.1", - "@babel/plugin-transform-block-scoped-functions": "^7.10.1", - "@babel/plugin-transform-block-scoping": "^7.10.1", - "@babel/plugin-transform-classes": "^7.10.3", - "@babel/plugin-transform-computed-properties": "^7.10.3", - "@babel/plugin-transform-destructuring": "^7.10.1", - "@babel/plugin-transform-dotall-regex": "^7.10.1", - "@babel/plugin-transform-duplicate-keys": "^7.10.1", - "@babel/plugin-transform-exponentiation-operator": "^7.10.1", - "@babel/plugin-transform-for-of": "^7.10.1", - "@babel/plugin-transform-function-name": "^7.10.1", - "@babel/plugin-transform-literals": "^7.10.1", - "@babel/plugin-transform-member-expression-literals": "^7.10.1", - "@babel/plugin-transform-modules-amd": "^7.10.1", - "@babel/plugin-transform-modules-commonjs": "^7.10.1", - "@babel/plugin-transform-modules-systemjs": "^7.10.3", - "@babel/plugin-transform-modules-umd": "^7.10.1", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.10.3", - "@babel/plugin-transform-new-target": "^7.10.1", - "@babel/plugin-transform-object-super": "^7.10.1", - "@babel/plugin-transform-parameters": "^7.10.1", - "@babel/plugin-transform-property-literals": "^7.10.1", - "@babel/plugin-transform-regenerator": "^7.10.3", - "@babel/plugin-transform-reserved-words": "^7.10.1", - "@babel/plugin-transform-shorthand-properties": "^7.10.1", - "@babel/plugin-transform-spread": "^7.10.1", - "@babel/plugin-transform-sticky-regex": "^7.10.1", - "@babel/plugin-transform-template-literals": "^7.10.3", - "@babel/plugin-transform-typeof-symbol": "^7.10.1", - "@babel/plugin-transform-unicode-escapes": "^7.10.1", - "@babel/plugin-transform-unicode-regex": "^7.10.1", + "@babel/plugin-syntax-top-level-await": "^7.12.13", + "@babel/plugin-transform-arrow-functions": "^7.12.13", + "@babel/plugin-transform-async-to-generator": "^7.12.13", + "@babel/plugin-transform-block-scoped-functions": "^7.12.13", + "@babel/plugin-transform-block-scoping": "^7.12.13", + "@babel/plugin-transform-classes": "^7.12.13", + "@babel/plugin-transform-computed-properties": "^7.12.13", + "@babel/plugin-transform-destructuring": "^7.12.13", + "@babel/plugin-transform-dotall-regex": "^7.12.13", + "@babel/plugin-transform-duplicate-keys": "^7.12.13", + "@babel/plugin-transform-exponentiation-operator": "^7.12.13", + "@babel/plugin-transform-for-of": "^7.12.13", + "@babel/plugin-transform-function-name": "^7.12.13", + "@babel/plugin-transform-literals": "^7.12.13", + "@babel/plugin-transform-member-expression-literals": "^7.12.13", + "@babel/plugin-transform-modules-amd": "^7.12.13", + "@babel/plugin-transform-modules-commonjs": "^7.12.13", + "@babel/plugin-transform-modules-systemjs": "^7.12.13", + "@babel/plugin-transform-modules-umd": "^7.12.13", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.13", + "@babel/plugin-transform-new-target": "^7.12.13", + "@babel/plugin-transform-object-super": "^7.12.13", + "@babel/plugin-transform-parameters": "^7.12.13", + "@babel/plugin-transform-property-literals": "^7.12.13", + "@babel/plugin-transform-regenerator": "^7.12.13", + "@babel/plugin-transform-reserved-words": "^7.12.13", + "@babel/plugin-transform-shorthand-properties": "^7.12.13", + "@babel/plugin-transform-spread": "^7.12.13", + "@babel/plugin-transform-sticky-regex": "^7.12.13", + "@babel/plugin-transform-template-literals": "^7.12.13", + "@babel/plugin-transform-typeof-symbol": "^7.12.13", + "@babel/plugin-transform-unicode-escapes": "^7.12.13", + "@babel/plugin-transform-unicode-regex": "^7.12.13", "@babel/preset-modules": "^0.1.3", - "@babel/types": "^7.10.3", - "browserslist": "^4.12.0", - "core-js-compat": "^3.6.2", - "invariant": "^2.2.2", - "levenary": "^1.1.1", + "@babel/types": "^7.12.13", + "core-js-compat": "^3.8.0", "semver": "^5.5.0" }, "dependencies": { @@ -977,9 +1044,9 @@ } }, "@babel/preset-modules": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.3.tgz", - "integrity": "sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", + "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -1007,40 +1074,94 @@ } }, "@babel/template": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.3.tgz", - "integrity": "sha512-5BjI4gdtD+9fHZUsaxPHPNpwa+xRkDO7c7JbhYn2afvrkDu5SfAAbi9AIMXw2xEhO/BR35TqiW97IqNvCo/GqA==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", + "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.3", - "@babel/parser": "^7.10.3", - "@babel/types": "^7.10.3" + "@babel/code-frame": "^7.12.13", + "@babel/parser": "^7.12.13", + "@babel/types": "^7.12.13" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.12.13" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", + "dev": true + }, + "@babel/highlight": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", + "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + } } }, "@babel/traverse": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.3.tgz", - "integrity": "sha512-qO6623eBFhuPm0TmmrUFMT1FulCmsSeJuVGhiLodk2raUDFhhTECLd9E9jC4LBIWziqt4wgF6KuXE4d+Jz9yug==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.13.tgz", + "integrity": "sha512-3Zb4w7eE/OslI0fTp8c7b286/cQps3+vdLW3UcwC8VSJC6GbKn55aeVVu2QJNuCDoeKyptLOFrPq8WqZZBodyA==", "dev": true, "requires": { - "@babel/code-frame": "^7.10.3", - "@babel/generator": "^7.10.3", - "@babel/helper-function-name": "^7.10.3", - "@babel/helper-split-export-declaration": "^7.10.1", - "@babel/parser": "^7.10.3", - "@babel/types": "^7.10.3", + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.12.13", + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/parser": "^7.12.13", + "@babel/types": "^7.12.13", "debug": "^4.1.0", "globals": "^11.1.0", - "lodash": "^4.17.13" + "lodash": "^4.17.19" }, "dependencies": { + "@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.12.13" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", + "dev": true + }, + "@babel/highlight": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", + "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "globals": { @@ -1049,6 +1170,12 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -1058,14 +1185,28 @@ } }, "@babel/types": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.3.tgz", - "integrity": "sha512-nZxaJhBXBQ8HVoIcGsf9qWep3Oh3jCENK54V4mRF7qaJabVsAYdbTtmSD8WmAp1R6ytPiu5apMwSXyxB1WlaBA==", + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.13.tgz", + "integrity": "sha512-oKrdZTld2im1z8bDwTOQvUbxKwE+854zc16qWZQlcTqMN00pWxHQ4ZeOq0yDMnisOpRykH2/5Qqcrk/OlbAjiQ==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.10.3", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.12.11", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" + }, + "dependencies": { + "@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", + "dev": true + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } } }, "@commitlint/cli": { @@ -1733,6 +1874,16 @@ "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", "dev": true }, + "@types/yauzl": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.1.tgz", + "integrity": "sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0rOrcd9EjA==", + "dev": true, + "optional": true, + "requires": { + "@types/node": "*" + } + }, "JSONStream": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", @@ -1986,6 +2137,12 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true + }, "atob": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", @@ -2011,32 +2168,12 @@ "dev": true }, "axios": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", - "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", "dev": true, "requires": { - "follow-redirects": "1.5.10" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "dev": true, - "requires": { - "debug": "=3.1.0" - } - } + "follow-redirects": "^1.10.0" } }, "babel-helper-evaluate-path": { @@ -2471,15 +2608,16 @@ } }, "browserslist": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.12.1.tgz", - "integrity": "sha512-WMjXwFtPskSW1pQUDJRxvRKRkeCr7usN0O/Za76N+F4oadaTdQHotSGcX9jT/Hs7mSKPkyMFNvqawB/1HzYDKQ==", + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz", + "integrity": "sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001088", - "electron-to-chromium": "^1.3.481", - "escalade": "^3.0.1", - "node-releases": "^1.1.58" + "caniuse-lite": "^1.0.30001181", + "colorette": "^1.2.1", + "electron-to-chromium": "^1.3.649", + "escalade": "^3.1.1", + "node-releases": "^1.1.70" } }, "btoa-lite": { @@ -2500,12 +2638,6 @@ "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=", "dev": true }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, "buffers": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", @@ -2608,9 +2740,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001088", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001088.tgz", - "integrity": "sha512-6eYUrlShRYveyqKG58HcyOfPgh3zb2xqs7NvT2VVtP3hEUeeWvc3lqhpeMTxYWBBeeaT9A4bKsrtjATm66BTHg==", + "version": "1.0.30001187", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001187.tgz", + "integrity": "sha512-w7/EP1JRZ9552CyrThUnay2RkZ1DXxKe/Q2swTC4+LElLh9RRYrL1Z+27LlakB8kzY0fSmHw9mc7XYDUKAKWMA==", "dev": true }, "caseless": { @@ -2904,6 +3036,12 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, + "colorette": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz", + "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==", + "dev": true + }, "colors": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", @@ -3020,18 +3158,6 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, "connect": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", @@ -3149,12 +3275,12 @@ "dev": true }, "core-js-compat": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.5.tgz", - "integrity": "sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng==", + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.8.3.tgz", + "integrity": "sha512-1sCb0wBXnBIL16pfFG1Gkvei6UzvKyTNYpiC41yrdjEv0UoJoq9E/abTMzyYJ6JpTkAj15dLjbqifIzEBDVvog==", "dev": true, "requires": { - "browserslist": "^4.8.5", + "browserslist": "^4.16.1", "semver": "7.0.0" }, "dependencies": { @@ -3581,9 +3707,9 @@ } }, "electron-to-chromium": { - "version": "1.3.483", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.483.tgz", - "integrity": "sha512-+05RF8S9rk8S0G8eBCqBRBaRq7+UN3lDs2DAvnG8SBSgQO3hjy0+qt4CmRk5eiuGbTcaicgXfPmBi31a+BD3lg==", + "version": "1.3.664", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.664.tgz", + "integrity": "sha512-yb8LrTQXQnh9yhnaIHLk6CYugF/An50T20+X0h++hjjhVfgSp1DGoMSYycF8/aD5eiqS4QwaNhiduFvK8rifRg==", "dev": true }, "emoji-regex": { @@ -3686,9 +3812,9 @@ } }, "escalade": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.0.1.tgz", - "integrity": "sha512-DR6NO3h9niOT+MZs7bjxlj2a1k+POu5RN8CLTPX2+i78bRi9eLe7+0zXgUHMnGXWybYcL61E9hGhPKqedy8tQA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true }, "escape-html": { @@ -4395,15 +4521,41 @@ } }, "extract-zip": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz", - "integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "dev": true, "requires": { - "concat-stream": "^1.6.2", - "debug": "^2.6.9", - "mkdirp": "^0.5.4", + "@types/yauzl": "^2.9.1", + "debug": "^4.1.1", + "get-stream": "^5.1.0", "yauzl": "^2.10.0" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } } }, "extsprintf": { @@ -4666,9 +4818,9 @@ "dev": true }, "gensync": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", - "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true }, "get-caller-file": { @@ -5285,15 +5437,6 @@ "through": "^2.3.6" } }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", @@ -5857,30 +6000,47 @@ } }, "karma-titanium-launcher": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/karma-titanium-launcher/-/karma-titanium-launcher-0.7.8.tgz", - "integrity": "sha512-Sk0tWIlvAHgavp4kF/TWMAPixtby+93ukFosnHAZNaMC1Zfx/2XOD1hqOEq/gz/1AwjqBrT8z41aeO2Cn/fYyw==", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/karma-titanium-launcher/-/karma-titanium-launcher-0.8.1.tgz", + "integrity": "sha512-Sv4XVoN5QYNLFi/X41TENbF2u7lwRidXOzlLti1/YnhLvcWw46kOEviCJaroP58ELlqNoqyVN7pl26g+zuknSQ==", "dev": true, "requires": { - "axios": "^0.19.0", - "extract-zip": "^1.6.7", - "fs-extra": "^8.1.0", - "node-titanium-sdk": "^4.3.0", + "axios": "^0.21.0", + "extract-zip": "^2.0.1", + "fs-extra": "^9.0.1", + "node-titanium-sdk": "^5.1.1", "titanium-karma-client": "^0.2.6", "which": "^2.0.2" }, "dependencies": { "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "dev": true, "requires": { + "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" } }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -5922,21 +6082,6 @@ } } }, - "leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true - }, - "levenary": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz", - "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==", - "dev": true, - "requires": { - "leven": "^3.1.0" - } - }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -6637,15 +6782,6 @@ "integrity": "sha1-eB4YMpaqlPbU2RbcM10NF676I/g=", "dev": true }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, "loud-rejection": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", @@ -6656,6 +6792,15 @@ "signal-exit": "^3.0.0" } }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "macos-release": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.3.0.tgz", @@ -7151,15 +7296,15 @@ } }, "node-releases": { - "version": "1.1.58", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.58.tgz", - "integrity": "sha512-NxBudgVKiRh/2aPWMgPR7bPTX0VPmGx5QBwCtdHitnqFE5/O8DeBXuIMH1nwNnw/aMo6AjOrpsHzfY3UbUJ7yg==", + "version": "1.1.70", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.70.tgz", + "integrity": "sha512-Slf2s69+2/uAD79pVVQo8uSiC34+g8GWY8UH2Qtqv34ZfhYrxpYpfzs9Js9d6O0mbDmALuxaTlplnBTnSELcrw==", "dev": true }, "node-titanium-sdk": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/node-titanium-sdk/-/node-titanium-sdk-4.4.0.tgz", - "integrity": "sha512-tWlHBkiouFTSHNf4L6PWxRsLB0SRVVhv6PmdNbR3jfmU3QaalMr1RyVkpU9lkmXL/uGrCi/TORlHJM9tSCPQxA==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/node-titanium-sdk/-/node-titanium-sdk-5.1.2.tgz", + "integrity": "sha512-zQ7T9u5IvFvHoSh18F2SHi3MfieBC4VrpXbDgL12MvAAys20OxiUZcBivwCJENkm2HLBeJzAomnJFFJNf3Rwng==", "dev": true, "requires": { "@babel/core": "^7.8.0", @@ -7170,12 +7315,12 @@ "babel-plugin-transform-titanium": "^0.1.1", "babel-preset-minify": "^0.5.1", "colors": "^1.3.3", - "fs-extra": "^8.1.0", - "node-appc": "^0.3.4", + "fs-extra": "^9.0.0", + "node-appc": "^1.0.0", "node-uuid": "^1.4.8", "stream-splitter": "~0.3.2", "unorm": "^1.6.0", - "xmldom": "0.3.0" + "xmldom": "0.4.0" }, "dependencies": { "async": { @@ -7185,20 +7330,96 @@ "dev": true }, "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "dev": true, "requires": { + "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "node-appc": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/node-appc/-/node-appc-1.1.2.tgz", + "integrity": "sha512-TBf8vh0NTD9DxG3oXQ1j/DCiREqDUI2khzJScZyq9w5AiYb+682WSjhl1f9Z1BJEjwWY7GFHQIpxxFVJ53OMfw==", + "dev": true, + "requires": { + "async": "^3.2.0", + "colors": "~1.4.0", + "fs-extra": "~9.0.0", + "request": "~2.88.0", + "semver": "~7.3.2", + "sprintf": "^0.1.5", + "temp": "~0.9.0", + "uuid": "~8.3.0", + "xmldom": "^0.3.0", + "yauzl": "^2.10.0" + }, + "dependencies": { + "fs-extra": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz", + "integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==", + "dev": true, + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^1.0.0" + } + }, + "universalify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", + "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==", + "dev": true + }, + "xmldom": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.3.0.tgz", + "integrity": "sha512-z9s6k3wxE+aZHgXYxSTpGDo7BYOUfJsIRyoZiX6HTjwpwfS2wpQBQKa2fD+ShLyPkqDYo5ud7KitmLZ2Cd6r0g==", + "dev": true + } + } + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" } }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true + }, "xmldom": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.3.0.tgz", - "integrity": "sha512-z9s6k3wxE+aZHgXYxSTpGDo7BYOUfJsIRyoZiX6HTjwpwfS2wpQBQKa2fD+ShLyPkqDYo5ud7KitmLZ2Cd6r0g==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.4.0.tgz", + "integrity": "sha512-2E93k08T30Ugs+34HBSTQLVtpi6mCddaY8uO+pMNk1pqSjV5vElzn4mmh6KLxN3hki8rNcHSYzILoh3TEWORvA==", "dev": true } } @@ -7713,12 +7934,6 @@ "minimist": "^1.2.0" } }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", - "dev": true - }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -7886,9 +8101,9 @@ } }, "regenerate": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.1.tgz", - "integrity": "sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", "dev": true }, "regenerate-unicode-properties": { @@ -7908,13 +8123,12 @@ "optional": true }, "regenerator-transform": { - "version": "0.14.4", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.4.tgz", - "integrity": "sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw==", + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", "dev": true, "requires": { - "@babel/runtime": "^7.8.4", - "private": "^0.1.8" + "@babel/runtime": "^7.8.4" } }, "regex-not": { @@ -7934,9 +8148,9 @@ "dev": true }, "regexpu-core": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz", - "integrity": "sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==", + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", + "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", "dev": true, "requires": { "regenerate": "^1.4.0", @@ -7954,9 +8168,9 @@ "dev": true }, "regjsparser": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz", - "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==", + "version": "0.6.7", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.7.tgz", + "integrity": "sha512-ib77G0uxsA2ovgiYbCVGx4Pv3PSttAx2vIwidqQzbL2U5S4Q+j00HdSAneSBuyVcMvEnTXMjiGgB+DlXozVhpQ==", "dev": true, "requires": { "jsesc": "~0.5.0" @@ -9177,12 +9391,6 @@ "mime-types": "~2.1.24" } }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, "ua-parser-js": { "version": "0.7.21", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.21.tgz", @@ -9576,6 +9784,12 @@ "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "dev": true }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "yaml": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", diff --git a/package.json b/package.json index 426b6b1..9a0ca4b 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "karma-jasmine": "^3.3.1", "karma-junit-reporter": "^2.0.1", "karma-mocha-reporter": "^2.2.5", - "karma-titanium-launcher": "^0.7.4", + "karma-titanium-launcher": "^0.8.1", "lint-staged": "^10.0.7", "socket.io": "^2.2.0", "titanium-docgen": "^4.2.0" diff --git a/test/unit/karma.unit.config.js b/test/unit/karma.unit.config.js index ab5a392..724267c 100644 --- a/test/unit/karma.unit.config.js +++ b/test/unit/karma.unit.config.js @@ -10,7 +10,7 @@ module.exports = config => { reporters: [ 'mocha', 'junit' ], plugins: [ 'karma-*' ], titanium: { - sdkVersion: config.sdkVersion || '9.2.0.GA' + sdkVersion: config.sdkVersion || '9.3.1.GA' }, customLaunchers: { android: { From 1d4e1393a003526edbfb1826146a119a771a62d3 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Wed, 3 Feb 2021 18:04:28 +0530 Subject: [PATCH 28/59] feat(ios): added the methods and properties for mifare tags --- .../TiNfcMiFareUltralightTagTechnology.h | 10 +++ .../TiNfcMiFareUltralightTagTechnology.m | 75 +++++++++++++++++++ ios/Classes/TiNfcTagProxy.h | 8 ++ ios/Classes/TiNfcTagProxy.m | 25 +++++++ 4 files changed, 118 insertions(+) diff --git a/ios/Classes/TiNfcMiFareUltralightTagTechnology.h b/ios/Classes/TiNfcMiFareUltralightTagTechnology.h index 664ee5d..7a46725 100644 --- a/ios/Classes/TiNfcMiFareUltralightTagTechnology.h +++ b/ios/Classes/TiNfcMiFareUltralightTagTechnology.h @@ -13,6 +13,16 @@ 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 diff --git a/ios/Classes/TiNfcMiFareUltralightTagTechnology.m b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m index c0289d5..5e8953c 100644 --- a/ios/Classes/TiNfcMiFareUltralightTagTechnology.m +++ b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m @@ -9,4 +9,79 @@ @implementation TiNfcMiFareUltralightTagTechnology +- (NSNumber *)mifareFamily +{ + return [self.tag asNFCMiFareTag]; +} + +- (TiBuffer *)identifier +{ + TiBuffer *identifier = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; + NSMutableData *data = [NSMutableData dataWithData:[[self.tag asNFCMiFareTag] identifier]]; + [identifier setData:data]; + return identifier; +} + +- (TiBuffer *)historicalBytes +{ + TiBuffer *historicalBytes = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; + NSMutableData *data = [NSMutableData dataWithData:[[self.tag asNFCMiFareTag] historicalBytes]]; + [historicalBytes setData:data]; + return historicalBytes; +} + +- (void)sendMiFareCommand:(id)args +{ + TiBuffer *data = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; + data = [[args objectAtIndex:0] valueForKey:@"data"]; + NSMutableData *dataWith = [NSMutableData dataWithData:data]; + NSData *dataValue = [NSData dataWithData:dataWith]; + + [[self.tag asNFCMiFareTag] sendMiFareCommand:data + completionHandler:^(NSData *response, NSError *error) { + TiBuffer *responseData = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; + NSMutableData *responsevalue = [NSMutableData dataWithData:response]; + [responseData setData:responsevalue]; + + if (error == nil) { + if (![self _hasListeners:@"didSendMiFareCommand"]) { + return; + } + [self fireEvent:@"didSendMiFareCommand" + withObject:@{ + @"errorCode" : NUMINTEGER([error code]), + @"errorDescription" : [error localizedDescription], + @"errorDomain" : [error domain], + @"response" : responseData + }]; + } + }]; +} + +- (void)sendMiFareISO7816Command:(id)args +{ + TiBuffer *data = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; + data = [[args objectAtIndex:0] valueForKey:@"apdu"]; + NSMutableData *dataWith = [NSMutableData dataWithData:data]; + NFCISO7816APDU *apdu = [NSData dataWithData:dataWith]; + + [[self.tag asNFCMiFareTag] sendMiFareISO7816Command:apdu + completionHandler:^(NSData *responseData, uint8_t sw1, uint8_t sw2, NSError *error) { + TiBuffer *responseDataValue = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; + NSMutableData *responsevalue = [NSMutableData dataWithData:responseData]; + [responseDataValue setData:responsevalue]; + if (error == nil) { + if (![self _hasListeners:@"didSendMiFareISO7816Command"]) { + return; + } + [self fireEvent:@"didSendMiFareISO7816Command" + withObject:@{ + @"errorCode" : NUMINTEGER([error code]), + @"errorDescription" : [error localizedDescription], + @"errorDomain" : [error domain], + @"responseData" : responseDataValue + }]; + } + }]; +} @end diff --git a/ios/Classes/TiNfcTagProxy.h b/ios/Classes/TiNfcTagProxy.h index 9040213..01b24b5 100644 --- a/ios/Classes/TiNfcTagProxy.h +++ b/ios/Classes/TiNfcTagProxy.h @@ -13,6 +13,13 @@ NS_ASSUME_NONNULL_BEGIN @interface TiNfcTagProxy : TiProxy { id _tag; } +- (id)asNFCMiFareTag; + +- (id)asNFCISO15693Tag; + +- (id)asNFCFeliCaTag; + +- (id)asNFCISO7816Tag; - (id)_initWithPageContext:(id)context andTag:(id)tag; @@ -22,6 +29,7 @@ NS_ASSUME_NONNULL_BEGIN - (NSNumber *)available; +- (NSNumber *)nfcTagType; @end NS_ASSUME_NONNULL_END diff --git a/ios/Classes/TiNfcTagProxy.m b/ios/Classes/TiNfcTagProxy.m index c4ddc6f..9f4d299 100644 --- a/ios/Classes/TiNfcTagProxy.m +++ b/ios/Classes/TiNfcTagProxy.m @@ -20,6 +20,26 @@ - (id)_initWithPageContext:(id)context andTag:(id)tag return self; } +- (id)asNFCMiFareTag +{ + return [_tag asNFCMiFareTag]; +} + +- (id)asNFCISO15693Tag +{ + return [_tag asNFCISO15693Tag]; +} + +- (id)asNFCFeliCaTag +{ + return [_tag asNFCFeliCaTag]; +} + +- (id)asNFCISO7816Tag +{ + return [_tag asNFCISO7816Tag]; +} + #pragma mark Public API's - (NSNumber *)available @@ -27,6 +47,11 @@ - (NSNumber *)available return NUMINT([_tag isAvailable]); } +- (NSNumber *)nfcTagType +{ + return NUMINTEGER([_tag type]); +} + - (id)tag { return _tag; From 869ad3e57ef67c75ce68c5759149ba6827526d61 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Thu, 4 Feb 2021 17:21:42 +0530 Subject: [PATCH 29/59] update(ios): updated the mifare tag native methods with respective value --- .../TiNfcMiFareUltralightTagTechnology.m | 39 +++++++++++++++---- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/ios/Classes/TiNfcMiFareUltralightTagTechnology.m b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m index 5e8953c..cfb7495 100644 --- a/ios/Classes/TiNfcMiFareUltralightTagTechnology.m +++ b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m @@ -32,12 +32,11 @@ - (TiBuffer *)historicalBytes - (void)sendMiFareCommand:(id)args { - TiBuffer *data = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; - data = [[args objectAtIndex:0] valueForKey:@"data"]; - NSMutableData *dataWith = [NSMutableData dataWithData:data]; - NSData *dataValue = [NSData dataWithData:dataWith]; + TiBuffer *data = [[args objectAtIndex:0] valueForKey:@"data"]; + NSMutableData *mutableData = [NSMutableData dataWithData:data]; + NSData *dataValue = [NSData dataWithData:mutableData]; - [[self.tag asNFCMiFareTag] sendMiFareCommand:data + [[self.tag asNFCMiFareTag] sendMiFareCommand:dataValue completionHandler:^(NSData *response, NSError *error) { TiBuffer *responseData = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; NSMutableData *responsevalue = [NSMutableData dataWithData:response]; @@ -62,14 +61,40 @@ - (void)sendMiFareISO7816Command:(id)args { TiBuffer *data = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; data = [[args objectAtIndex:0] valueForKey:@"apdu"]; - NSMutableData *dataWith = [NSMutableData dataWithData:data]; - NFCISO7816APDU *apdu = [NSData dataWithData:dataWith]; + NSMutableData *datavalue = [NSMutableData dataWithData:data.data]; + + //Taking uint8_t (unsigned char) value as String and then converting the same into uint8_t. + NSString *instructionClassValue = [[args objectAtIndex:0] valueForKey:@"instructionClass"]; + NSData *instructionClassData = [instructionClassValue dataUsingEncoding:NSUTF8StringEncoding]; + const void *instructionClassConst = [instructionClassData bytes]; + uint8_t *instructionClass = (uint8_t *)instructionClassConst; + + NSString *instructionCodeValue = [[args objectAtIndex:0] valueForKey:@"instructionClass"]; + NSData *instructionCodeData = [instructionCodeValue dataUsingEncoding:NSUTF8StringEncoding]; + const void *instructionCodeConst = [instructionCodeData bytes]; + uint8_t *instructionCode = (uint8_t *)instructionCodeConst; + + NSString *p1ParameterValue = [[args objectAtIndex:0] valueForKey:@"instructionClass"]; + NSData *p1ParameterData = [p1ParameterValue dataUsingEncoding:NSUTF8StringEncoding]; + const void *p1ParameterConst = [p1ParameterData bytes]; + uint8_t *p1Parameter = (uint8_t *)p1ParameterConst; + + NSString *p2ParameterValue = [[args objectAtIndex:0] valueForKey:@"instructionClass"]; + NSData *p2ParameterData = [p2ParameterValue dataUsingEncoding:NSUTF8StringEncoding]; + const void *p2ParameterConst = [p2ParameterData bytes]; + uint8_t *p2Parameter = (uint8_t *)p2ParameterConst; + + NSNumber *expectedResponseLengthData = [[args objectAtIndex:0] valueForKey:@"expectedResponseLength"]; + NSInteger expectedResponseLength = [expectedResponseLengthData integerValue]; + + NFCISO7816APDU *apdu = [[NFCISO7816APDU alloc] initWithInstructionClass:*instructionClass instructionCode:*instructionCode p1Parameter:*p1Parameter p2Parameter:*p2Parameter data:datavalue expectedResponseLength:expectedResponseLength]; [[self.tag asNFCMiFareTag] sendMiFareISO7816Command:apdu completionHandler:^(NSData *responseData, uint8_t sw1, uint8_t sw2, NSError *error) { TiBuffer *responseDataValue = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; NSMutableData *responsevalue = [NSMutableData dataWithData:responseData]; [responseDataValue setData:responsevalue]; + if (error == nil) { if (![self _hasListeners:@"didSendMiFareISO7816Command"]) { return; From 4d30bd67818759fa4264a4821eb314e051eb8395 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Tue, 9 Feb 2021 18:03:46 +0530 Subject: [PATCH 30/59] update(ios): added new method to get data back from hex --- .../TiNfcMiFareUltralightTagTechnology.m | 54 ++++++++++++++----- 1 file changed, 41 insertions(+), 13 deletions(-) diff --git a/ios/Classes/TiNfcMiFareUltralightTagTechnology.m b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m index cfb7495..3a5a0a0 100644 --- a/ios/Classes/TiNfcMiFareUltralightTagTechnology.m +++ b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m @@ -30,13 +30,42 @@ - (TiBuffer *)historicalBytes return historicalBytes; } -- (void)sendMiFareCommand:(id)args +// Pragma: Internal + +- (NSData *)getCommandData:(NSArray *)StringHex { - TiBuffer *data = [[args objectAtIndex:0] valueForKey:@"data"]; - NSMutableData *mutableData = [NSMutableData dataWithData:data]; - NSData *dataValue = [NSData dataWithData:mutableData]; + NSString *input = @""; + for (NSString *hex in StringHex) { + input = [input stringByAppendingString:[NSString stringWithFormat:@"0x%lX ", (unsigned long)[hex integerValue]]]; + } + NSString *output = [input stringByReplacingOccurrencesOfString:@"0x" + withString:@"" + options:NSCaseInsensitiveSearch + range:NSMakeRange(0, input.length)]; + NSString *hexChars = @"0123456789abcdefABCDEF"; + NSCharacterSet *hexc = [NSCharacterSet characterSetWithCharactersInString:hexChars]; + NSCharacterSet *invalidHexc = [hexc invertedSet]; + NSString *allHex = [[output componentsSeparatedByCharactersInSet:invalidHexc] componentsJoinedByString:@""]; + NSMutableData *result = [[NSMutableData alloc] init]; + int i = 0; + for (i = 0; i + 2 <= allHex.length; i += 2) { + NSRange range = NSMakeRange(i, 2); + NSString *hexStr = [allHex substringWithRange:range]; + NSScanner *scanner = [NSScanner scannerWithString:hexStr]; + unsigned int intValue; + [scanner scanHexInt:&intValue]; + unsigned char uc = (unsigned char)intValue; + [result appendBytes:&uc length:1]; + } + NSData *data = [NSData dataWithData:result]; + return data; +} - [[self.tag asNFCMiFareTag] sendMiFareCommand:dataValue +- (void)sendMiFareCommand:(id)args +{ + NSArray *StringHex = [[args objectAtIndex:0] valueForKey:@"data"]; + NSData *data = [self getCommandData:StringHex]; + [[self.tag asNFCMiFareTag] sendMiFareCommand:data completionHandler:^(NSData *response, NSError *error) { TiBuffer *responseData = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; NSMutableData *responsevalue = [NSMutableData dataWithData:response]; @@ -59,27 +88,26 @@ - (void)sendMiFareCommand:(id)args - (void)sendMiFareISO7816Command:(id)args { - TiBuffer *data = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; - data = [[args objectAtIndex:0] valueForKey:@"apdu"]; - NSMutableData *datavalue = [NSMutableData dataWithData:data.data]; + NSArray *StringHex = [[args objectAtIndex:0] valueForKey:@"data"]; + NSData *data = [self getCommandData:StringHex]; //Taking uint8_t (unsigned char) value as String and then converting the same into uint8_t. - NSString *instructionClassValue = [[args objectAtIndex:0] valueForKey:@"instructionClass"]; + NSString *instructionClassValue = [[args firstObject] valueForKey:@"instructionClass"]; NSData *instructionClassData = [instructionClassValue dataUsingEncoding:NSUTF8StringEncoding]; const void *instructionClassConst = [instructionClassData bytes]; uint8_t *instructionClass = (uint8_t *)instructionClassConst; - NSString *instructionCodeValue = [[args objectAtIndex:0] valueForKey:@"instructionClass"]; + NSString *instructionCodeValue = [[args firstObject] valueForKey:@"instructionCode"]; NSData *instructionCodeData = [instructionCodeValue dataUsingEncoding:NSUTF8StringEncoding]; const void *instructionCodeConst = [instructionCodeData bytes]; uint8_t *instructionCode = (uint8_t *)instructionCodeConst; - NSString *p1ParameterValue = [[args objectAtIndex:0] valueForKey:@"instructionClass"]; + NSString *p1ParameterValue = [[args firstObject] valueForKey:@"p1Parameter"]; NSData *p1ParameterData = [p1ParameterValue dataUsingEncoding:NSUTF8StringEncoding]; const void *p1ParameterConst = [p1ParameterData bytes]; uint8_t *p1Parameter = (uint8_t *)p1ParameterConst; - NSString *p2ParameterValue = [[args objectAtIndex:0] valueForKey:@"instructionClass"]; + NSString *p2ParameterValue = [[args firstObject] valueForKey:@"p2Parameter"]; NSData *p2ParameterData = [p2ParameterValue dataUsingEncoding:NSUTF8StringEncoding]; const void *p2ParameterConst = [p2ParameterData bytes]; uint8_t *p2Parameter = (uint8_t *)p2ParameterConst; @@ -87,7 +115,7 @@ - (void)sendMiFareISO7816Command:(id)args NSNumber *expectedResponseLengthData = [[args objectAtIndex:0] valueForKey:@"expectedResponseLength"]; NSInteger expectedResponseLength = [expectedResponseLengthData integerValue]; - NFCISO7816APDU *apdu = [[NFCISO7816APDU alloc] initWithInstructionClass:*instructionClass instructionCode:*instructionCode p1Parameter:*p1Parameter p2Parameter:*p2Parameter data:datavalue expectedResponseLength:expectedResponseLength]; + NFCISO7816APDU *apdu = [[NFCISO7816APDU alloc] initWithInstructionClass:*instructionClass instructionCode:*instructionCode p1Parameter:*p1Parameter p2Parameter:*p2Parameter data:data expectedResponseLength:expectedResponseLength]; [[self.tag asNFCMiFareTag] sendMiFareISO7816Command:apdu completionHandler:^(NSData *responseData, uint8_t sw1, uint8_t sw2, NSError *error) { From d3576c3f855190591e6f101955d541ee74f71398 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Fri, 26 Feb 2021 14:51:15 +0530 Subject: [PATCH 31/59] update(ios): updated yml doc, updated the connect to tag to send mifare command method --- apidoc/NfcMiFareTagTechnology.yml | 58 +++++++++++++ .../TiNfcMiFareUltralightTagTechnology.m | 82 ++++++------------- ios/Classes/TiNfcNativeTagTechnologyProxy.m | 17 ++-- 3 files changed, 95 insertions(+), 62 deletions(-) create mode 100644 apidoc/NfcMiFareTagTechnology.yml diff --git a/apidoc/NfcMiFareTagTechnology.yml b/apidoc/NfcMiFareTagTechnology.yml new file mode 100644 index 0000000..17f83f9 --- /dev/null +++ b/apidoc/NfcMiFareTagTechnology.yml @@ -0,0 +1,58 @@ +name: Modules.Nfc.MifareTagTechnology +summary: Provides access to MIFARE Ultralight properties and I/O operations on a . +description: | + Use the 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: 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. + + - name: sendMiFareISO7816Command + summary: Sends a native MIFARE command to the tag along with other parameter. + parameters: + - 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. \ No newline at end of file diff --git a/ios/Classes/TiNfcMiFareUltralightTagTechnology.m b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m index 3a5a0a0..1eb63ab 100644 --- a/ios/Classes/TiNfcMiFareUltralightTagTechnology.m +++ b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m @@ -30,41 +30,14 @@ - (TiBuffer *)historicalBytes return historicalBytes; } -// Pragma: Internal - -- (NSData *)getCommandData:(NSArray *)StringHex -{ - NSString *input = @""; - for (NSString *hex in StringHex) { - input = [input stringByAppendingString:[NSString stringWithFormat:@"0x%lX ", (unsigned long)[hex integerValue]]]; - } - NSString *output = [input stringByReplacingOccurrencesOfString:@"0x" - withString:@"" - options:NSCaseInsensitiveSearch - range:NSMakeRange(0, input.length)]; - NSString *hexChars = @"0123456789abcdefABCDEF"; - NSCharacterSet *hexc = [NSCharacterSet characterSetWithCharactersInString:hexChars]; - NSCharacterSet *invalidHexc = [hexc invertedSet]; - NSString *allHex = [[output componentsSeparatedByCharactersInSet:invalidHexc] componentsJoinedByString:@""]; - NSMutableData *result = [[NSMutableData alloc] init]; - int i = 0; - for (i = 0; i + 2 <= allHex.length; i += 2) { - NSRange range = NSMakeRange(i, 2); - NSString *hexStr = [allHex substringWithRange:range]; - NSScanner *scanner = [NSScanner scannerWithString:hexStr]; - unsigned int intValue; - [scanner scanHexInt:&intValue]; - unsigned char uc = (unsigned char)intValue; - [result appendBytes:&uc length:1]; - } - NSData *data = [NSData dataWithData:result]; - return data; -} - - (void)sendMiFareCommand:(id)args { - NSArray *StringHex = [[args objectAtIndex:0] valueForKey:@"data"]; - NSData *data = [self getCommandData:StringHex]; + NSArray *commandData = [[args objectAtIndex:0] valueForKey:@"data"]; + unsigned int dataValue[2]; + for (int i = 1; i < commandData.count; i++) { + dataValue[i] = [commandData[i] unsignedIntValue]; + } + NSData *data = [[NSData alloc] initWithBytes:dataValue length:2]; [[self.tag asNFCMiFareTag] sendMiFareCommand:data completionHandler:^(NSData *response, NSError *error) { TiBuffer *responseData = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; @@ -88,34 +61,29 @@ - (void)sendMiFareCommand:(id)args - (void)sendMiFareISO7816Command:(id)args { - NSArray *StringHex = [[args objectAtIndex:0] valueForKey:@"data"]; - NSData *data = [self getCommandData:StringHex]; - - //Taking uint8_t (unsigned char) value as String and then converting the same into uint8_t. - NSString *instructionClassValue = [[args firstObject] valueForKey:@"instructionClass"]; - NSData *instructionClassData = [instructionClassValue dataUsingEncoding:NSUTF8StringEncoding]; - const void *instructionClassConst = [instructionClassData bytes]; - uint8_t *instructionClass = (uint8_t *)instructionClassConst; - - NSString *instructionCodeValue = [[args firstObject] valueForKey:@"instructionCode"]; - NSData *instructionCodeData = [instructionCodeValue dataUsingEncoding:NSUTF8StringEncoding]; - const void *instructionCodeConst = [instructionCodeData bytes]; - uint8_t *instructionCode = (uint8_t *)instructionCodeConst; - - NSString *p1ParameterValue = [[args firstObject] valueForKey:@"p1Parameter"]; - NSData *p1ParameterData = [p1ParameterValue dataUsingEncoding:NSUTF8StringEncoding]; - const void *p1ParameterConst = [p1ParameterData bytes]; - uint8_t *p1Parameter = (uint8_t *)p1ParameterConst; - - NSString *p2ParameterValue = [[args firstObject] valueForKey:@"p2Parameter"]; - NSData *p2ParameterData = [p2ParameterValue dataUsingEncoding:NSUTF8StringEncoding]; - const void *p2ParameterConst = [p2ParameterData bytes]; - uint8_t *p2Parameter = (uint8_t *)p2ParameterConst; + NSArray *commandData = [[args objectAtIndex:0] valueForKey:@"data"]; + unsigned int dataValue[2]; + for (int i = 1; i < commandData.count; i++) { + dataValue[i] = [commandData[i] unsignedIntValue]; + } + NSData *data = [[NSData alloc] initWithBytes:dataValue length:2]; + + NSNumber *instructionClassValue = [[args firstObject] valueForKey:@"instructionClass"]; + uint8_t instructionClass = [instructionClassValue unsignedCharValue]; + + NSNumber *instructionCodeValue = [[args firstObject] valueForKey:@"instructionCode"]; + uint8_t instructionCode = [instructionCodeValue unsignedCharValue]; + + NSNumber *p1ParameterValue = [[args firstObject] valueForKey:@"p1Parameter"]; + uint8_t p1Parameter = [p1ParameterValue unsignedCharValue]; + + NSNumber *p2ParameterValue = [[args firstObject] valueForKey:@"p2Parameter"]; + uint8_t p2Parameter = [p2ParameterValue unsignedCharValue]; NSNumber *expectedResponseLengthData = [[args objectAtIndex:0] valueForKey:@"expectedResponseLength"]; NSInteger expectedResponseLength = [expectedResponseLengthData integerValue]; - NFCISO7816APDU *apdu = [[NFCISO7816APDU alloc] initWithInstructionClass:*instructionClass instructionCode:*instructionCode p1Parameter:*p1Parameter p2Parameter:*p2Parameter data:data expectedResponseLength:expectedResponseLength]; + NFCISO7816APDU *apdu = [[NFCISO7816APDU alloc] initWithInstructionClass:instructionClass instructionCode:instructionCode p1Parameter:p1Parameter p2Parameter:p2Parameter data:data expectedResponseLength:expectedResponseLength]; [[self.tag asNFCMiFareTag] sendMiFareISO7816Command:apdu completionHandler:^(NSData *responseData, uint8_t sw1, uint8_t sw2, NSError *error) { diff --git a/ios/Classes/TiNfcNativeTagTechnologyProxy.m b/ios/Classes/TiNfcNativeTagTechnologyProxy.m index d069f94..51cdeee 100644 --- a/ios/Classes/TiNfcNativeTagTechnologyProxy.m +++ b/ios/Classes/TiNfcNativeTagTechnologyProxy.m @@ -26,16 +26,23 @@ - (id)_initWithPageContext:(id)context andSession:(NFCTagReaderSess - (void)connect:(id)unused { - [self.session connectToTag:self.tag + [self.session connectToTag:[self.tag tag] completionHandler:^(NSError *_Nullable error) { if (![self _hasListeners:@"didConnectTag"]) { return; } + if (error != nil) { + [self fireEvent:@"didConnectTag" + withObject:@{ + @"errorCode" : NUMINTEGER([error code]), + @"errorDescription" : [error localizedDescription], + @"errorDomain" : [error domain], + @"tag" : self.tag + }]; + return; + } [self fireEvent:@"didConnectTag" withObject:@{ - @"errorCode" : NUMINTEGER([error code]), - @"errorDescription" : [error localizedDescription], - @"errorDomain" : [error domain], @"tag" : self.tag }]; }]; @@ -43,7 +50,7 @@ - (void)connect:(id)unused - (NSNumber *)isConnected:(id)unused { - return [NSNumber numberWithBool:self.session.connectedTag == self.tag ? YES : NO]; + return [NSNumber numberWithBool:self.session.connectedTag == [self.tag tag] ? YES : NO]; } @end From f6b94fe00757352608a79c0b6c4f064a8556295f Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Fri, 26 Feb 2021 15:28:22 +0530 Subject: [PATCH 32/59] update(ios): updated method and get response after checking error is nil --- ios/Classes/TiNfcMiFareUltralightTagTechnology.m | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ios/Classes/TiNfcMiFareUltralightTagTechnology.m b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m index 1eb63ab..fff5a25 100644 --- a/ios/Classes/TiNfcMiFareUltralightTagTechnology.m +++ b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m @@ -40,14 +40,13 @@ - (void)sendMiFareCommand:(id)args NSData *data = [[NSData alloc] initWithBytes:dataValue length:2]; [[self.tag asNFCMiFareTag] sendMiFareCommand:data completionHandler:^(NSData *response, NSError *error) { - TiBuffer *responseData = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; - NSMutableData *responsevalue = [NSMutableData dataWithData:response]; - [responseData setData:responsevalue]; - if (error == nil) { if (![self _hasListeners:@"didSendMiFareCommand"]) { return; } + TiBuffer *responseData = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; + NSMutableData *responsevalue = [NSMutableData dataWithData:response]; + [responseData setData:responsevalue]; [self fireEvent:@"didSendMiFareCommand" withObject:@{ @"errorCode" : NUMINTEGER([error code]), @@ -87,14 +86,13 @@ - (void)sendMiFareISO7816Command:(id)args [[self.tag asNFCMiFareTag] sendMiFareISO7816Command:apdu completionHandler:^(NSData *responseData, uint8_t sw1, uint8_t sw2, NSError *error) { - TiBuffer *responseDataValue = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; - NSMutableData *responsevalue = [NSMutableData dataWithData:responseData]; - [responseDataValue setData:responsevalue]; - if (error == nil) { if (![self _hasListeners:@"didSendMiFareISO7816Command"]) { return; } + TiBuffer *responseDataValue = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; + NSMutableData *responsevalue = [NSMutableData dataWithData:responseData]; + [responseDataValue setData:responsevalue]; [self fireEvent:@"didSendMiFareISO7816Command" withObject:@{ @"errorCode" : NUMINTEGER([error code]), From cab583b7c0096b22dfc6c9bc32cffb2683deabb6 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Tue, 2 Mar 2021 11:52:22 +0530 Subject: [PATCH 33/59] update(ios): made connect method also rename tag as tagproxy, made change in type in yml doc --- apidoc/NfcMiFareTagTechnology.yml | 5 +- .../TiNfcMiFareUltralightTagTechnology.m | 88 +++++++++---------- ios/Classes/TiNfcNativeTagTechnologyProxy.h | 2 +- ios/Classes/TiNfcNativeTagTechnologyProxy.m | 16 ++-- 4 files changed, 57 insertions(+), 54 deletions(-) diff --git a/apidoc/NfcMiFareTagTechnology.yml b/apidoc/NfcMiFareTagTechnology.yml index 17f83f9..a4c922c 100644 --- a/apidoc/NfcMiFareTagTechnology.yml +++ b/apidoc/NfcMiFareTagTechnology.yml @@ -24,7 +24,7 @@ methods: parameters: - name: data summary: hex command with length will be sent in form of data - type: Titanium.Buffer + type: Array - name: errorCode type: String summary: The error code; only present if an error occurred. @@ -38,6 +38,9 @@ methods: - 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 - name: sw1 summary: The SW1 command-processing status byte. type: Number diff --git a/ios/Classes/TiNfcMiFareUltralightTagTechnology.m b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m index fff5a25..12c6b6e 100644 --- a/ios/Classes/TiNfcMiFareUltralightTagTechnology.m +++ b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m @@ -11,13 +11,13 @@ @implementation TiNfcMiFareUltralightTagTechnology - (NSNumber *)mifareFamily { - return [self.tag asNFCMiFareTag]; + return [self.tagProxy asNFCMiFareTag]; } - (TiBuffer *)identifier { TiBuffer *identifier = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; - NSMutableData *data = [NSMutableData dataWithData:[[self.tag asNFCMiFareTag] identifier]]; + NSMutableData *data = [NSMutableData dataWithData:[[self.tagProxy asNFCMiFareTag] identifier]]; [identifier setData:data]; return identifier; } @@ -25,47 +25,47 @@ - (TiBuffer *)identifier - (TiBuffer *)historicalBytes { TiBuffer *historicalBytes = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; - NSMutableData *data = [NSMutableData dataWithData:[[self.tag asNFCMiFareTag] historicalBytes]]; + NSMutableData *data = [NSMutableData dataWithData:[[self.tagProxy asNFCMiFareTag] historicalBytes]]; [historicalBytes setData:data]; return historicalBytes; } - (void)sendMiFareCommand:(id)args { - NSArray *commandData = [[args objectAtIndex:0] valueForKey:@"data"]; + NSArray *commandData = [[args firstObject] valueForKey:@"data"]; unsigned int dataValue[2]; for (int i = 1; i < commandData.count; i++) { dataValue[i] = [commandData[i] unsignedIntValue]; } NSData *data = [[NSData alloc] initWithBytes:dataValue length:2]; - [[self.tag asNFCMiFareTag] sendMiFareCommand:data - completionHandler:^(NSData *response, NSError *error) { - if (error == nil) { - if (![self _hasListeners:@"didSendMiFareCommand"]) { - return; - } - TiBuffer *responseData = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; - NSMutableData *responsevalue = [NSMutableData dataWithData:response]; - [responseData setData:responsevalue]; - [self fireEvent:@"didSendMiFareCommand" - withObject:@{ - @"errorCode" : NUMINTEGER([error code]), - @"errorDescription" : [error localizedDescription], - @"errorDomain" : [error domain], - @"response" : responseData - }]; - } - }]; + [[self.tagProxy asNFCMiFareTag] sendMiFareCommand:data + completionHandler:^(NSData *response, NSError *error) { + if (error == nil) { + if (![self _hasListeners:@"didSendMiFareCommand"]) { + return; + } + TiBuffer *responseData = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; + NSMutableData *responsevalue = [NSMutableData dataWithData:response]; + [responseData setData:responsevalue]; + [self fireEvent:@"didSendMiFareCommand" + withObject:@{ + @"errorCode" : NUMINTEGER([error code]), + @"errorDescription" : [error localizedDescription], + @"errorDomain" : [error domain], + @"response" : responseData + }]; + } + }]; } - (void)sendMiFareISO7816Command:(id)args { - NSArray *commandData = [[args objectAtIndex:0] valueForKey:@"data"]; - unsigned int dataValue[2]; + NSArray *commandData = [[args firstObject] valueForKey:@"data"]; + unsigned int dataValue[commandData.count]; for (int i = 1; i < commandData.count; i++) { dataValue[i] = [commandData[i] unsignedIntValue]; } - NSData *data = [[NSData alloc] initWithBytes:dataValue length:2]; + NSData *data = [[NSData alloc] initWithBytes:dataValue length:commandData.count]; NSNumber *instructionClassValue = [[args firstObject] valueForKey:@"instructionClass"]; uint8_t instructionClass = [instructionClassValue unsignedCharValue]; @@ -79,28 +79,28 @@ - (void)sendMiFareISO7816Command:(id)args NSNumber *p2ParameterValue = [[args firstObject] valueForKey:@"p2Parameter"]; uint8_t p2Parameter = [p2ParameterValue unsignedCharValue]; - NSNumber *expectedResponseLengthData = [[args objectAtIndex:0] valueForKey:@"expectedResponseLength"]; + NSNumber *expectedResponseLengthData = [[args firstObject] valueForKey:@"expectedResponseLength"]; NSInteger expectedResponseLength = [expectedResponseLengthData integerValue]; NFCISO7816APDU *apdu = [[NFCISO7816APDU alloc] initWithInstructionClass:instructionClass instructionCode:instructionCode p1Parameter:p1Parameter p2Parameter:p2Parameter data:data expectedResponseLength:expectedResponseLength]; - [[self.tag asNFCMiFareTag] sendMiFareISO7816Command:apdu - completionHandler:^(NSData *responseData, uint8_t sw1, uint8_t sw2, NSError *error) { - if (error == nil) { - if (![self _hasListeners:@"didSendMiFareISO7816Command"]) { - return; - } - TiBuffer *responseDataValue = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; - NSMutableData *responsevalue = [NSMutableData dataWithData:responseData]; - [responseDataValue setData:responsevalue]; - [self fireEvent:@"didSendMiFareISO7816Command" - withObject:@{ - @"errorCode" : NUMINTEGER([error code]), - @"errorDescription" : [error localizedDescription], - @"errorDomain" : [error domain], - @"responseData" : responseDataValue - }]; - } - }]; + [[self.tagProxy asNFCMiFareTag] sendMiFareISO7816Command:apdu + completionHandler:^(NSData *responseData, uint8_t sw1, uint8_t sw2, NSError *error) { + if (error == nil) { + if (![self _hasListeners:@"didSendMiFareISO7816Command"]) { + return; + } + TiBuffer *responseDataValue = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; + NSMutableData *responsevalue = [NSMutableData dataWithData:responseData]; + [responseDataValue setData:responsevalue]; + [self fireEvent:@"didSendMiFareISO7816Command" + withObject:@{ + @"errorCode" : NUMINTEGER([error code]), + @"errorDescription" : [error localizedDescription], + @"errorDomain" : [error domain], + @"responseData" : responseDataValue + }]; + } + }]; } @end diff --git a/ios/Classes/TiNfcNativeTagTechnologyProxy.h b/ios/Classes/TiNfcNativeTagTechnologyProxy.h index 32e1300..c166236 100644 --- a/ios/Classes/TiNfcNativeTagTechnologyProxy.h +++ b/ios/Classes/TiNfcNativeTagTechnologyProxy.h @@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN @interface TiNfcNativeTagTechnologyProxy : TiNfcTagTechnologyProxy @property (nonatomic, weak) NFCTagReaderSession *session; -@property (nonatomic, weak) TiNfcTagProxy *tag; +@property (nonatomic, weak) TiNfcTagProxy *tagProxy; - (id)_initWithPageContext:(id)context andSession:(NFCTagReaderSession *)session andTag:(TiNfcTagProxy *)tag; diff --git a/ios/Classes/TiNfcNativeTagTechnologyProxy.m b/ios/Classes/TiNfcNativeTagTechnologyProxy.m index 51cdeee..653d7a8 100644 --- a/ios/Classes/TiNfcNativeTagTechnologyProxy.m +++ b/ios/Classes/TiNfcNativeTagTechnologyProxy.m @@ -16,7 +16,7 @@ @implementation TiNfcNativeTagTechnologyProxy - (id)_initWithPageContext:(id)context andSession:(NFCTagReaderSession *)session andTag:(TiNfcTagProxy *)tag { if (self = [super _initWithPageContext:context]) { - self.tag = tag; + self.tagProxy = tag; self.session = session; } return self; @@ -26,7 +26,7 @@ - (id)_initWithPageContext:(id)context andSession:(NFCTagReaderSess - (void)connect:(id)unused { - [self.session connectToTag:[self.tag tag] + [self.session connectToTag:[self.tagProxy tag] completionHandler:^(NSError *_Nullable error) { if (![self _hasListeners:@"didConnectTag"]) { return; @@ -34,23 +34,23 @@ - (void)connect:(id)unused if (error != nil) { [self fireEvent:@"didConnectTag" withObject:@{ - @"errorCode" : NUMINTEGER([error code]), - @"errorDescription" : [error localizedDescription], - @"errorDomain" : [error domain], - @"tag" : self.tag + @"errorCode" : error != nil ? NUMINTEGER([error code]) : NULL, + @"errorDescription" : error != nil ? [error localizedDescription] : NULL, + @"errorDomain" : error != nil ? [error domain] : NULL, + @"tag" : self.tagProxy }]; return; } [self fireEvent:@"didConnectTag" withObject:@{ - @"tag" : self.tag + @"tag" : self.tagProxy }]; }]; } - (NSNumber *)isConnected:(id)unused { - return [NSNumber numberWithBool:self.session.connectedTag == [self.tag tag] ? YES : NO]; + return [NSNumber numberWithBool:self.session.connectedTag == [self.tagProxy tag] ? YES : NO]; } @end From fee418aefc892fa829a9c0e04fd483ebc3c26164 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Tue, 2 Mar 2021 14:40:14 +0530 Subject: [PATCH 34/59] fix(ios): removed the had coded value and made it dynamic --- ios/Classes/TiNfcMiFareUltralightTagTechnology.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/Classes/TiNfcMiFareUltralightTagTechnology.m b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m index 12c6b6e..2d12ad0 100644 --- a/ios/Classes/TiNfcMiFareUltralightTagTechnology.m +++ b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m @@ -33,11 +33,11 @@ - (TiBuffer *)historicalBytes - (void)sendMiFareCommand:(id)args { NSArray *commandData = [[args firstObject] valueForKey:@"data"]; - unsigned int dataValue[2]; + unsigned int dataValue[commandData.count]; for (int i = 1; i < commandData.count; i++) { dataValue[i] = [commandData[i] unsignedIntValue]; } - NSData *data = [[NSData alloc] initWithBytes:dataValue length:2]; + NSData *data = [[NSData alloc] initWithBytes:dataValue length:commandData.count]; [[self.tagProxy asNFCMiFareTag] sendMiFareCommand:data completionHandler:^(NSData *response, NSError *error) { if (error == nil) { From 85b9352827692d86440983bbf79253e2f84bc24a Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Tue, 2 Mar 2021 17:07:34 +0530 Subject: [PATCH 35/59] update(ios): updated tag proxy connect to tag method --- ios/Classes/TiNfcNativeTagTechnologyProxy.m | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/ios/Classes/TiNfcNativeTagTechnologyProxy.m b/ios/Classes/TiNfcNativeTagTechnologyProxy.m index 653d7a8..c645557 100644 --- a/ios/Classes/TiNfcNativeTagTechnologyProxy.m +++ b/ios/Classes/TiNfcNativeTagTechnologyProxy.m @@ -31,19 +31,13 @@ - (void)connect:(id)unused if (![self _hasListeners:@"didConnectTag"]) { return; } - if (error != nil) { - [self fireEvent:@"didConnectTag" - withObject:@{ - @"errorCode" : error != nil ? NUMINTEGER([error code]) : NULL, - @"errorDescription" : error != nil ? [error localizedDescription] : NULL, - @"errorDomain" : error != nil ? [error domain] : NULL, - @"tag" : self.tagProxy - }]; - return; - } [self fireEvent:@"didConnectTag" withObject:@{ + @"errorCode" : error != nil ? NUMINTEGER([error code]) : [NSNull null], + @"errorDescription" : error != nil ? [error localizedDescription] : [NSNull null], + @"errorDomain" : error != nil ? [error domain] : [NSNull null], @"tag" : self.tagProxy + }]; }]; } From 6cf9c123a8b160c80fb106fa7881c3dd9effaf9e Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Tue, 2 Mar 2021 17:39:33 +0530 Subject: [PATCH 36/59] update(ios): updated method of mifare send command to read page --- .../TiNfcMiFareUltralightTagTechnology.m | 54 +++++++++---------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/ios/Classes/TiNfcMiFareUltralightTagTechnology.m b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m index 2d12ad0..e7175ab 100644 --- a/ios/Classes/TiNfcMiFareUltralightTagTechnology.m +++ b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m @@ -40,21 +40,20 @@ - (void)sendMiFareCommand:(id)args NSData *data = [[NSData alloc] initWithBytes:dataValue length:commandData.count]; [[self.tagProxy asNFCMiFareTag] sendMiFareCommand:data completionHandler:^(NSData *response, NSError *error) { - if (error == nil) { - if (![self _hasListeners:@"didSendMiFareCommand"]) { - return; - } - TiBuffer *responseData = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; - NSMutableData *responsevalue = [NSMutableData dataWithData:response]; - [responseData setData:responsevalue]; - [self fireEvent:@"didSendMiFareCommand" - withObject:@{ - @"errorCode" : NUMINTEGER([error code]), - @"errorDescription" : [error localizedDescription], - @"errorDomain" : [error domain], - @"response" : responseData - }]; + if (![self _hasListeners:@"didSendMiFareCommand"]) { + return; } + TiBuffer *responseData = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; + NSMutableData *responsevalue = [NSMutableData dataWithData:response]; + [responseData setData:responsevalue]; + [self fireEvent:@"didConnectTag" + withObject:@{ + @"errorCode" : error != nil ? NUMINTEGER([error code]) : [NSNull null], + @"errorDescription" : error != nil ? [error localizedDescription] : [NSNull null], + @"errorDomain" : error != nil ? [error domain] : [NSNull null], + @"response" : responseData + + }]; }]; } @@ -86,21 +85,20 @@ - (void)sendMiFareISO7816Command:(id)args [[self.tagProxy asNFCMiFareTag] sendMiFareISO7816Command:apdu completionHandler:^(NSData *responseData, uint8_t sw1, uint8_t sw2, NSError *error) { - if (error == nil) { - if (![self _hasListeners:@"didSendMiFareISO7816Command"]) { - return; - } - TiBuffer *responseDataValue = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; - NSMutableData *responsevalue = [NSMutableData dataWithData:responseData]; - [responseDataValue setData:responsevalue]; - [self fireEvent:@"didSendMiFareISO7816Command" - withObject:@{ - @"errorCode" : NUMINTEGER([error code]), - @"errorDescription" : [error localizedDescription], - @"errorDomain" : [error domain], - @"responseData" : responseDataValue - }]; + if (![self _hasListeners:@"didSendMiFareISO7816Command"]) { + return; } + TiBuffer *responseDataValue = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; + NSMutableData *responsevalue = [NSMutableData dataWithData:responseData]; + [responseDataValue setData:responsevalue]; + [self fireEvent:@"didSendMiFareISO7816Command" + withObject:@{ + @"errorCode" : error != nil ? NUMINTEGER([error code]) : [NSNull null], + @"errorDescription" : error != nil ? [error localizedDescription] : [NSNull null], + @"errorDomain" : error != nil ? [error domain] : [NSNull null], + @"responseData" : responseDataValue + + }]; }]; } @end From 9f6fe01dfd2256d489d49cdb29c231fc9529a5ba Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Tue, 2 Mar 2021 18:03:25 +0530 Subject: [PATCH 37/59] update(ios): updated event name for didsend mifare command --- ios/Classes/TiNfcMiFareUltralightTagTechnology.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Classes/TiNfcMiFareUltralightTagTechnology.m b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m index e7175ab..c91a67e 100644 --- a/ios/Classes/TiNfcMiFareUltralightTagTechnology.m +++ b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m @@ -46,7 +46,7 @@ - (void)sendMiFareCommand:(id)args TiBuffer *responseData = [[TiBuffer alloc] _initWithPageContext:[self pageContext]]; NSMutableData *responsevalue = [NSMutableData dataWithData:response]; [responseData setData:responsevalue]; - [self fireEvent:@"didConnectTag" + [self fireEvent:@"didSendMiFareCommand" withObject:@{ @"errorCode" : error != nil ? NUMINTEGER([error code]) : [NSNull null], @"errorDescription" : error != nil ? [error localizedDescription] : [NSNull null], From 8fac0e1de7f35339a3ec81fc625d5a76d13ebdbf Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Wed, 3 Mar 2021 15:05:44 +0530 Subject: [PATCH 38/59] update(ios) : updated send mifare command method and invalidate with error method --- ios/Classes/TiNfcMiFareUltralightTagTechnology.m | 8 ++++---- ios/Classes/TiNfcNfcAdapterProxy.m | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ios/Classes/TiNfcMiFareUltralightTagTechnology.m b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m index c91a67e..4bff83e 100644 --- a/ios/Classes/TiNfcMiFareUltralightTagTechnology.m +++ b/ios/Classes/TiNfcMiFareUltralightTagTechnology.m @@ -34,7 +34,7 @@ - (void)sendMiFareCommand:(id)args { NSArray *commandData = [[args firstObject] valueForKey:@"data"]; unsigned int dataValue[commandData.count]; - for (int i = 1; i < commandData.count; i++) { + for (int i = 0; i < commandData.count; i++) { dataValue[i] = [commandData[i] unsignedIntValue]; } NSData *data = [[NSData alloc] initWithBytes:dataValue length:commandData.count]; @@ -51,7 +51,7 @@ - (void)sendMiFareCommand:(id)args @"errorCode" : error != nil ? NUMINTEGER([error code]) : [NSNull null], @"errorDescription" : error != nil ? [error localizedDescription] : [NSNull null], @"errorDomain" : error != nil ? [error domain] : [NSNull null], - @"response" : responseData + @"responseDataLength" : responseData.length }]; }]; @@ -61,7 +61,7 @@ - (void)sendMiFareISO7816Command:(id)args { NSArray *commandData = [[args firstObject] valueForKey:@"data"]; unsigned int dataValue[commandData.count]; - for (int i = 1; i < commandData.count; i++) { + for (int i = 0; i < commandData.count; i++) { dataValue[i] = [commandData[i] unsignedIntValue]; } NSData *data = [[NSData alloc] initWithBytes:dataValue length:commandData.count]; @@ -96,7 +96,7 @@ - (void)sendMiFareISO7816Command:(id)args @"errorCode" : error != nil ? NUMINTEGER([error code]) : [NSNull null], @"errorDescription" : error != nil ? [error localizedDescription] : [NSNull null], @"errorDomain" : error != nil ? [error domain] : [NSNull null], - @"responseData" : responseDataValue + @"responseDataLength" : responseDataValue.length }]; }]; diff --git a/ios/Classes/TiNfcNfcAdapterProxy.m b/ios/Classes/TiNfcNfcAdapterProxy.m index bb265ef..1b0b4c3 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.m +++ b/ios/Classes/TiNfcNfcAdapterProxy.m @@ -204,7 +204,7 @@ - (void)readerSession:(NFCNDEFReaderSession *)session didInvalidateWithError:(NS NO); } -#pragma mark NFCReaderSessionDelegate +#pragma mark NFCTagReaderSessionDelegate - (void)tagReaderSession:(NFCTagReaderSession *)session didInvalidateWithError:(NSError *)error { @@ -214,9 +214,9 @@ - (void)tagReaderSession:(NFCTagReaderSession *)session didInvalidateWithError:( } [self fireEvent:@"didInvalidateWithError" withObject:@{ - @"cancelled" : @(error.code == 200), - @"message" : [error localizedDescription], - @"code" : NUMINTEGER([error code]), + @"errorCode" : error != nil ? NUMINTEGER([error code]) : [NSNull null], + @"errorDescription" : error != nil ? [error localizedDescription] : [NSNull null], + @"errorDomain" : error != nil ? [error domain] : [NSNull null], @"type" : @"NFCTagReaderSession" }]; } From 0f2cbd233187838b64a70e3d722fdcc437eb2d80 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Tue, 9 Feb 2021 18:06:21 +0530 Subject: [PATCH 39/59] feat(ios): added sample to test mifare tag property and methods --- ios/example/app.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ios/example/app.js b/ios/example/app.js index cd3858f..6816925 100644 --- a/ios/example/app.js +++ b/ios/example/app.js @@ -80,7 +80,17 @@ nfcAdapter.addEventListener('didDetectTags', function (e) { alert('Tag Connected: ' + e.tag); }); mifare.connect({mifare}); - nfcAdapter.invalidate(sessionType); + + var identifier = mifare.identifier; + var historicalBytes = mifare.historicalBytes; + var sendMiFareCommand = mifare.sendMiFareCommand({data:[0xA0, 0x00]}); + Ti.API.info('Connected tag object : ' + response); + alert('Tag Connected: ' + responseData); + + var sendMiFareISO7816Command = mifare.sendMiFareISO7816Command({instructionClass: 0, instructionCode: 0, p1Parameter: 0, p2Parameter: 0, expectedResponseLength: 16, data:[0xA0, 0x00]}); + Ti.API.info('Connected tag object : ' + response); + alert('Tag Connected: ' + response); + nfcAdapter.invalidate(sessionType); }); nfcAdapter.addEventListener('didInvalidateWithError', function (e) { Ti.API.info('code: ' + e.code); From 344fcb4ec150c1818af84fa7025b574c58647769 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Fri, 26 Feb 2021 15:43:55 +0530 Subject: [PATCH 40/59] update(ios): updated sample and called mifare command method --- ios/example/app.js | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/ios/example/app.js b/ios/example/app.js index 6816925..c15af34 100644 --- a/ios/example/app.js +++ b/ios/example/app.js @@ -1,6 +1,6 @@ -/* +/* * NFC Tag Viewer Example Application - * + * * This application demonstrates how to use the iOS 11+ NFC module. * * Ensure to include the required entitlements to the section of your tiapp.xml: @@ -26,13 +26,11 @@ * * * Finally, ensure to enable the "NFC Tag Reading" capability in your provisioning profile - * by checking it in the Apple Developer Center (https://developer.apple.com). + * by checking it in the Apple Developer Center (https://developer.apple.com). */ -const IOS = (Ti.Platform.osname === 'iphone' || Ti.Platform.osname === 'ipad'); -const ANDROID = (Ti.Platform.osname === 'android'); + var nfc = require('ti.nfc'); -var sessionType = ({type:nfc.READER_SESSION_NFC_TAG, pollingOptions: [nfc.NFC_TAG_ISO14443]}) -var session = ({type:nfc.READER_SESSION_NFC_TAG}) +var sessionType = ({type:nfc.READER_SESSION_NFC_TAG, pollingOptions: [nfc.NFC_TAG_ISO14443]} ) var nfcAdapter = nfc.createNfcAdapter({ onNdefDiscovered: handleDiscovery }); @@ -64,36 +62,28 @@ var btn = Ti.UI.createButton({ }); btn.addEventListener('click', function() { - if (!nfcAdapter.isEnabled(session)) { + if (!nfcAdapter.isEnabled(sessionType)) { Ti.API.error('This device does not support NFC capabilities!'); return; } - if (IOS){ - nfcAdapter.begin(sessionType); - }// This is required for iOS only. Use "invalidate()" to invalidate a session. + nfcAdapter.begin(sessionType); // This is required for iOS only. Use "invalidate()" to invalidate a session. }); nfcAdapter.addEventListener('didDetectTags', function (e) { var mifare = nfcAdapter.createTagTechMifareUltralight({'tag':e.tags[0]}); mifare.addEventListener('didConnectTag', function (e) { Ti.API.info('Connected tag object : ' + e.tag); - alert('Tag Connected: ' + e.tag); + var sendMiFareCommand = mifare.sendMiFareCommand({data: [0x30,0x04]}) + mifare.addEventListener('didSendMiFareCommand', function (e) { + Ti.API.info('Connected tag object : ' + response); + alert('Tag Connected: ' + response); + }); + nfcAdapter.invalidate(sessionType); }); mifare.connect({mifare}); - - var identifier = mifare.identifier; - var historicalBytes = mifare.historicalBytes; - var sendMiFareCommand = mifare.sendMiFareCommand({data:[0xA0, 0x00]}); - Ti.API.info('Connected tag object : ' + response); - alert('Tag Connected: ' + responseData); - - var sendMiFareISO7816Command = mifare.sendMiFareISO7816Command({instructionClass: 0, instructionCode: 0, p1Parameter: 0, p2Parameter: 0, expectedResponseLength: 16, data:[0xA0, 0x00]}); - Ti.API.info('Connected tag object : ' + response); - alert('Tag Connected: ' + response); - nfcAdapter.invalidate(sessionType); }); nfcAdapter.addEventListener('didInvalidateWithError', function (e) { - Ti.API.info('code: ' + e.code); + Ti.API.info('code: ' + e.error); }); win.add(btn); From 741e74973d925470f2cb24176dad16b45cdbcae5 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Wed, 3 Mar 2021 15:33:34 +0530 Subject: [PATCH 41/59] fix(ios): updated the sample with response from mifare tag --- ios/example/app.js | 215 +++++++++++++++++++++++++++++++-------------- 1 file changed, 150 insertions(+), 65 deletions(-) diff --git a/ios/example/app.js b/ios/example/app.js index c15af34..0c569a9 100644 --- a/ios/example/app.js +++ b/ios/example/app.js @@ -1,90 +1,175 @@ /* - * NFC Tag Viewer Example Application - * - * This application demonstrates how to use the iOS 11+ NFC module. - * - * Ensure to include the required entitlements to the section of your tiapp.xml: - * - * - * - * com.apple.developer.nfc.readersession.formats - * - * NDEF - * - * - * - * - * Also, ensure to include the NFC-privacy key in your section of your tiapp.xml - * - * - * - * - * ... - * NFCReaderUsageDescription - * YOUR_PRIVACY_DESCRIPTION - * - * - * - * Finally, ensure to enable the "NFC Tag Reading" capability in your provisioning profile - * by checking it in the Apple Developer Center (https://developer.apple.com). - */ +* NFC Tag Viewer Example Application +* +* This application demonstrates how to use the iOS 11+ NFC module. +* +* Ensure to include the required entitlements to the section of your tiapp.xml: +* +* +* +* com.apple.developer.nfc.readersession.formats +* +* NDEF +* +* +* +* +* Also, ensure to include the NFC-privacy key in your section of your tiapp.xml +* +* +* +* +* ... +* NFCReaderUsageDescription +* YOUR_PRIVACY_DESCRIPTION +* +* +* +* Finally, ensure to enable the "NFC Tag Reading" capability in your provisioning profile +* by checking it in the Apple Developer Center (https://developer.apple.com). +*/ var nfc = require('ti.nfc'); +var logs = []; var sessionType = ({type:nfc.READER_SESSION_NFC_TAG, pollingOptions: [nfc.NFC_TAG_ISO14443]} ) var nfcAdapter = nfc.createNfcAdapter({ - onNdefDiscovered: handleDiscovery +onNdefDiscovered: handleDiscovery }); function handleDiscovery(e) { - // Add rows for the message, tag, and each of the records - var data = []; +// Add rows for the message, tag, and each of the records +var data = []; - Ti.API.warn(e); +Ti.API.warn(e); - if (e.messages) { - var message = e.messages[0]; - if (message.records) { - for (var i = 0; i < message.records.length; i++) { - data.push(message.records[i]); - } +if (e.messages) { + var message = e.messages[0]; + if (message.records) { + for (var i = 0; i < message.records.length; i++) { + data.push(message.records[i]); } } +} - Ti.API.info(data); +Ti.API.info(data); } -var win = Ti.UI.createWindow({ - backgroundColor: '#fff' -}); -var btn = Ti.UI.createButton({ - title: 'Start Search' +// Configure UI +var deviceWindow = Ti.UI.createWindow({ + backgroundColor: 'white', + title: 'Mifare Sample', + titleAttributes: { color: 'blue' } +}); +var navDeviceWindow = Ti.UI.iOS.createNavigationWindow({ + window: deviceWindow }); -btn.addEventListener('click', function() { - if (!nfcAdapter.isEnabled(sessionType)) { - Ti.API.error('This device does not support NFC capabilities!'); - return; - } - nfcAdapter.begin(sessionType); // This is required for iOS only. Use "invalidate()" to invalidate a session. +var startSearchBtn = Titanium.UI.createButton({ + top: 100, + title: 'Scan and send mifare connect command' }); +startSearchBtn.addEventListener('click', function() { + if (!nfcAdapter.isEnabled(sessionType)) { + Ti.API.error('This device does not support NFC capabilities!'); + return; +} +nfcAdapter.begin(sessionType); // This is required for iOS only. Use "invalidate()" to invalidate a session. +}); nfcAdapter.addEventListener('didDetectTags', function (e) { - var mifare = nfcAdapter.createTagTechMifareUltralight({'tag':e.tags[0]}); - mifare.addEventListener('didConnectTag', function (e) { - Ti.API.info('Connected tag object : ' + e.tag); - var sendMiFareCommand = mifare.sendMiFareCommand({data: [0x30,0x04]}) - mifare.addEventListener('didSendMiFareCommand', function (e) { - Ti.API.info('Connected tag object : ' + response); - alert('Tag Connected: ' + response); - }); - nfcAdapter.invalidate(sessionType); - }); - mifare.connect({mifare}); + if (e.errorCode){ + Ti.API.info('Error when detecting tag with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription); + logs.push('Error when detecting tag with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription); + setData(logs); + }else{ + logs.push('Tag scanning start'); + logs.push('Mifare tag detected'); + setData(logs); + } + var mifare = nfcAdapter.createTagTechMifareUltralight({'tag':e.tags[0]}); + mifare.addEventListener('didConnectTag', function (e) { + if (e.errorCode){ + Ti.API.info('Error when connectiong tag with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription); + logs.push('Error when connectiong tag with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription); + setData(logs); + }else{ + Ti.API.info('Connected tag object : ' + e.tag); + logs.push('Mifare tag connected : ' + e.tag); + setData(logs); + } + var sendMiFareCommand = mifare.sendMiFareCommand({data: [0x30,0x04]}) + mifare.addEventListener('didSendMiFareCommand', function (e) { + if (e.errorCode){ + Ti.API.info('Error when sending command with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription); + logs.push('Error when sending command with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription); + setData(logs); + }else { + Ti.API.info('Connected tag object : ' + e.responseDataLength); + logs.push('Command send to Mifare tag to read page data'); + logs.push('Length of response object : ' + e.responseDataLength); + setData(logs); + } + }); + nfcAdapter.invalidate(sessionType); + }); + if (mifare){ + mifare.connect({mifare}); + }else { + alert('No mifare tag available to disconnect'); + } }); nfcAdapter.addEventListener('didInvalidateWithError', function (e) { - Ti.API.info('code: ' + e.error); + Ti.API.info('Invalidate the session with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription); + logs.push('Invalidate the session with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription); + setData(logs); }); +var clearLogBtn = Titanium.UI.createButton({ + left: 50, + top: 150, + title: 'Clear Log' +}); + +clearLogBtn.addEventListener('click', function() { + var rowCount = logs.length; + for (var i = rowCount ; i > -1; i--) { + tableView.deleteRow(i); + } +}); +var tableView = Titanium.UI.createTableView({ + top: 250, + scrollable: true, + backgroundColor: 'White', + separatorColor: '#DBE1E2', + bottom: '5%', +}); +var tbl_data = []; +function setData(list) { + tbl_data.splice(0, tbl_data.length); + if (list.length > 0) { + var initalValue = list.length - 1; + for (var i = initalValue; i >= 0; i--) { + var btDevicesRow = Ti.UI.createTableViewRow({ + height: 50, + row: i, + hasChild: true + }); + var uuidLabel = Ti.UI.createLabel({ + left: 5, + right: 5, + color: 'blue', + top: 5, + font: { fontSize: 11 }, + text: list[i] + }); + btDevicesRow.add(uuidLabel); + tbl_data.push(btDevicesRow); + } + } + tableView.setData(tbl_data); +} +setData(logs); + +navDeviceWindow.add(startSearchBtn, clearLogBtn, tableView); -win.add(btn); -win.open(); +navDeviceWindow.open(); From d8d6d7d0b2d59a9e72ba3875fcd9e62420a1c8a2 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Thu, 4 Mar 2021 15:48:27 +0530 Subject: [PATCH 42/59] update(ios): updated alert and empety the log array --- ios/example/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ios/example/app.js b/ios/example/app.js index 0c569a9..346deb0 100644 --- a/ios/example/app.js +++ b/ios/example/app.js @@ -116,7 +116,7 @@ nfcAdapter.addEventListener('didDetectTags', function (e) { if (mifare){ mifare.connect({mifare}); }else { - alert('No mifare tag available to disconnect'); + alert('No mifare tag available to connect'); } }); nfcAdapter.addEventListener('didInvalidateWithError', function (e) { @@ -134,6 +134,7 @@ clearLogBtn.addEventListener('click', function() { var rowCount = logs.length; for (var i = rowCount ; i > -1; i--) { tableView.deleteRow(i); + logs.pop(); } }); var tableView = Titanium.UI.createTableView({ From b46829a72e4ab79fa74f562f88020ee49dbee0f6 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Mon, 8 Mar 2021 10:46:35 +0530 Subject: [PATCH 43/59] fix(ios): empty logs array with out running loop --- ios/example/app.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ios/example/app.js b/ios/example/app.js index 346deb0..010cf0b 100644 --- a/ios/example/app.js +++ b/ios/example/app.js @@ -131,11 +131,8 @@ var clearLogBtn = Titanium.UI.createButton({ }); clearLogBtn.addEventListener('click', function() { - var rowCount = logs.length; - for (var i = rowCount ; i > -1; i--) { - tableView.deleteRow(i); - logs.pop(); - } + logs.splice(0, logs.length); + setData(logs); }); var tableView = Titanium.UI.createTableView({ top: 250, From 46ae4d5fee06b2230c71c75269b215e0b0cc95a8 Mon Sep 17 00:00:00 2001 From: Anil Shukla <40199172+anil-shukla-axway@users.noreply.github.com> Date: Wed, 10 Mar 2021 11:47:47 +0530 Subject: [PATCH 44/59] update(ios): updated sample and removed if else --- ios/example/app.js | 39 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/ios/example/app.js b/ios/example/app.js index 010cf0b..75b78ea 100644 --- a/ios/example/app.js +++ b/ios/example/app.js @@ -78,38 +78,21 @@ startSearchBtn.addEventListener('click', function() { nfcAdapter.begin(sessionType); // This is required for iOS only. Use "invalidate()" to invalidate a session. }); nfcAdapter.addEventListener('didDetectTags', function (e) { - if (e.errorCode){ - Ti.API.info('Error when detecting tag with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription); - logs.push('Error when detecting tag with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription); - setData(logs); - }else{ - logs.push('Tag scanning start'); - logs.push('Mifare tag detected'); - setData(logs); - } + Ti.API.info('didDetectTags with message' + (e.errorCode ? (' error code: ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description: ' + e.errorDescription) : ': Tag Detected')); + logs.push('didDetectTags with message' + (e.errorCode ? (' error code: ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description: ' + e.errorDescription) : ': Tag Detected')); + setData(logs); + var mifare = nfcAdapter.createTagTechMifareUltralight({'tag':e.tags[0]}); mifare.addEventListener('didConnectTag', function (e) { - if (e.errorCode){ - Ti.API.info('Error when connectiong tag with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription); - logs.push('Error when connectiong tag with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription); - setData(logs); - }else{ - Ti.API.info('Connected tag object : ' + e.tag); - logs.push('Mifare tag connected : ' + e.tag); - setData(logs); - } + Ti.API.info('didConnectTag with message' + (e.errorCode ? (' error code: ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description: ' + e.errorDescription) : ': MiFare Tag Connected')); + logs.push('didConnectTag with message' + (e.errorCode ? (' error code: ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description: ' + e.errorDescription) : ': MiFare Tag Connected')); + setData(logs); var sendMiFareCommand = mifare.sendMiFareCommand({data: [0x30,0x04]}) mifare.addEventListener('didSendMiFareCommand', function (e) { - if (e.errorCode){ - Ti.API.info('Error when sending command with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription); - logs.push('Error when sending command with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription); - setData(logs); - }else { - Ti.API.info('Connected tag object : ' + e.responseDataLength); - logs.push('Command send to Mifare tag to read page data'); - logs.push('Length of response object : ' + e.responseDataLength); - setData(logs); - } + Ti.API.info('didSendMiFareCommand with message' + (e.errorCode ? (' error code: ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description: ' + e.errorDescription) : ': Mifare Command Send to read page data')); + logs.push('didSendMiFareCommand with message' + (e.errorCode ? (' error code: ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description: ' + e.errorDescription) : ': Mifare Command Send to read page data')); + logs.push('Length of response object : ' + e.responseDataLength); + setData(logs); }); nfcAdapter.invalidate(sessionType); }); From 6aad1c421d97f212bebd137b843d414f31fc25f3 Mon Sep 17 00:00:00 2001 From: Fasihul Haque Date: Tue, 16 Mar 2021 11:57:13 +0530 Subject: [PATCH 45/59] feat(ios): implemented session, methods, property and events for ndef tag --- apidoc/NfcNDEFTag.yml | 17 ++++ apidoc/NfcNDEFTagTechnology.yml | 126 +++++++++++++++++++++++++++ ios/Classes/TiNfcModule.m | 4 + ios/Classes/TiNfcNDEFTagProxy.h | 23 +++++ ios/Classes/TiNfcNDEFTagProxy.m | 31 +++++++ ios/Classes/TiNfcNDEFTagTechnology.h | 12 ++- ios/Classes/TiNfcNDEFTagTechnology.m | 113 ++++++++++++++++++++++++ ios/Classes/TiNfcNdefMessageProxy.h | 1 + ios/Classes/TiNfcNdefMessageProxy.m | 5 ++ ios/Classes/TiNfcNfcAdapterProxy.m | 30 ++++++- ios/ti.nfc.xcodeproj/project.pbxproj | 8 ++ 11 files changed, 368 insertions(+), 2 deletions(-) create mode 100644 apidoc/NfcNDEFTag.yml create mode 100644 apidoc/NfcNDEFTagTechnology.yml create mode 100644 ios/Classes/TiNfcNDEFTagProxy.h create mode 100644 ios/Classes/TiNfcNDEFTagProxy.m diff --git a/apidoc/NfcNDEFTag.yml b/apidoc/NfcNDEFTag.yml new file mode 100644 index 0000000..0131f2e --- /dev/null +++ b/apidoc/NfcNDEFTag.yml @@ -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 + \ No newline at end of file diff --git a/apidoc/NfcNDEFTagTechnology.yml b/apidoc/NfcNDEFTagTechnology.yml new file mode 100644 index 0000000..b4e4ba4 --- /dev/null +++ b/apidoc/NfcNDEFTagTechnology.yml @@ -0,0 +1,126 @@ +--- +name: Modules.Nfc.NfcNDEFTagTechnology +summary: Provides access to NDEF tag and I/O operations on a +description: | + Use the 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 didConnectNDEFTag 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: didConnectNDEFTag + 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. + \ No newline at end of file diff --git a/ios/Classes/TiNfcModule.m b/ios/Classes/TiNfcModule.m index d0ece7d..9763d2d 100644 --- a/ios/Classes/TiNfcModule.m +++ b/ios/Classes/TiNfcModule.m @@ -47,6 +47,10 @@ - (void)startup MAKE_SYSTEM_PROP(NFC_TAG_ISO15693, NFCPollingISO15693); MAKE_SYSTEM_PROP(NFC_TAG_ISO18092, NFCPollingISO18092); +MAKE_SYSTEM_PROP(NFC_NDEF_NOT_SUPPORTED, NFCNDEFStatusNotSupported); +MAKE_SYSTEM_PROP(NFC_NDEF_READ_ONLY, NFCNDEFStatusReadOnly); +MAKE_SYSTEM_PROP(NFC_NDEF_READ_WRITE, NFCNDEFStatusReadWrite); + #if IS_IOS_11 MAKE_SYSTEM_PROP(TNF_EMPTY, NFCTypeNameFormatEmpty); MAKE_SYSTEM_PROP(TNF_WELL_KNOWN, NFCTypeNameFormatNFCWellKnown); diff --git a/ios/Classes/TiNfcNDEFTagProxy.h b/ios/Classes/TiNfcNDEFTagProxy.h new file mode 100644 index 0000000..9b416c6 --- /dev/null +++ b/ios/Classes/TiNfcNDEFTagProxy.h @@ -0,0 +1,23 @@ +/** + * 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 +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface TiNfcNDEFTagProxy : TiProxy { + id _tag; +} + +- (id)_initWithPageContext:(id)context andTag:(id)tag; +- (id)tag; + +@end + +NS_ASSUME_NONNULL_END diff --git a/ios/Classes/TiNfcNDEFTagProxy.m b/ios/Classes/TiNfcNDEFTagProxy.m new file mode 100644 index 0000000..c99acb3 --- /dev/null +++ b/ios/Classes/TiNfcNDEFTagProxy.m @@ -0,0 +1,31 @@ +/** + * 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 "TiNfcNDEFTagProxy.h" + +@implementation TiNfcNDEFTagProxy + +- (id)_initWithPageContext:(id)context + andTag:(id)tag +{ + if (self = [super _initWithPageContext:context]) { + _tag = tag; + } + return self; +} + +- (id)tag +{ + return _tag; +} + +- (NSNumber *)available +{ + return NUMINT([_tag isAvailable]); +} + +@end diff --git a/ios/Classes/TiNfcNDEFTagTechnology.h b/ios/Classes/TiNfcNDEFTagTechnology.h index 78ce9f8..743aeba 100644 --- a/ios/Classes/TiNfcNDEFTagTechnology.h +++ b/ios/Classes/TiNfcNDEFTagTechnology.h @@ -5,13 +5,23 @@ * Please see the LICENSE included with this distribution for details. */ +#import "TiNfcNDEFTagProxy.h" #import "TiNfcNativeTagTechnologyProxy.h" #import #import NS_ASSUME_NONNULL_BEGIN -@interface TiNfcNDEFTagTechnology : TiNfcNativeTagTechnologyProxy +@interface TiNfcNDEFTagTechnology : TiProxy + +- (id)_initWithPageContext:(id)context + andSession:(NFCNDEFReaderSession *)session + andTag:(TiNfcNDEFTagProxy *)tag; +- (void)connect; +- (void)queryNDEFStatus; +- (void)readNDEF; +- (void)writeNDEF:(id)args; +- (void)writeLock; @end diff --git a/ios/Classes/TiNfcNDEFTagTechnology.m b/ios/Classes/TiNfcNDEFTagTechnology.m index 1971dba..7356786 100644 --- a/ios/Classes/TiNfcNDEFTagTechnology.m +++ b/ios/Classes/TiNfcNDEFTagTechnology.m @@ -6,7 +6,120 @@ */ #import "TiNfcNDEFTagTechnology.h" +#import "TiNfcNdefMessageProxy.h" + +@interface TiNfcNDEFTagTechnology () + +@property (nonatomic, weak) NFCNDEFReaderSession *session; +@property (nonatomic, weak) TiNfcNDEFTagProxy *tagProxy; + +@end @implementation TiNfcNDEFTagTechnology +- (id)_initWithPageContext:(id)context + andSession:(NFCNDEFReaderSession *)session + andTag:(TiNfcNDEFTagProxy *)tag +{ + if (self = [super _initWithPageContext:context]) { + self.tagProxy = tag; + self.session = session; + } + return self; +} + +#pragma mark Public API's + +- (void)connect +{ + [self.session connectToTag:[self.tagProxy tag] + completionHandler:^(NSError *_Nullable error) { + if (![self _hasListeners:@"didConnectNDEFTag"]) { + return; + } + [error code]; + [self fireEvent:@"didConnectNDEFTag" + withObject:@{ + @"errorCode" : error != nil ? NUMINTEGER([error code]) : [NSNull null], + @"errorDescription" : error != nil ? [error localizedDescription] : [NSNull null], + @"errorDomain" : error != nil ? [error domain] : [NSNull null] + }]; + }]; +} + +- (void)queryNDEFStatus +{ + [[self.tagProxy tag] queryNDEFStatusWithCompletionHandler:^(NFCNDEFStatus status, NSUInteger capacity, NSError *_Nullable error) { + if (error == nil) { + if (![self _hasListeners:@"didQueryNDEFStatus"]) { + return; + } + [self fireEvent:@"didQueryNDEFStatus" + withObject:@{ + @"errorCode" : error != nil ? NUMINTEGER([error code]) : [NSNull null], + @"errorDescription" : error != nil ? [error localizedDescription] : [NSNull null], + @"errorDomain" : error != nil ? [error domain] : [NSNull null], + @"status" : NUMINTEGER(status), + @"capacity" : NUMINTEGER(capacity) + }]; + } + }]; +} + +- (void)readNDEF +{ + [[self.tagProxy tag] readNDEFWithCompletionHandler:^(NFCNDEFMessage *message, NSError *error) { + if (error == nil) { + if (![self _hasListeners:@"didReadNDEFMessage"]) { + return; + } + [self fireEvent:@"didReadNDEFMessage" + withObject:@{ + @"errorCode" : error != nil ? NUMINTEGER([error code]) : [NSNull null], + @"errorDescription" : error != nil ? [error localizedDescription] : [NSNull null], + @"errorDomain" : error != nil ? [error domain] : [NSNull null], + @"message" : [[TiNfcNdefMessageProxy alloc] _initWithPageContext:[self pageContext] andRecords:message.records] + }]; + } + }]; +} + +- (void)writeNDEF:(id)args +{ + TiNfcNdefMessageProxy *getProxyMessage = [[args firstObject] valueForKey:@"message"]; + NFCNDEFMessage *message = [[NFCNDEFMessage alloc] initWithNDEFRecords:getProxyMessage.nfcNdefPayloads]; + + [[self.tagProxy tag] writeNDEF:message + completionHandler:^(NSError *error) { + if (error == nil) { + if (![self _hasListeners:@"didWirteNDEFMessage"]) { + return; + } + [self fireEvent:@"didWirteNDEFMessage" + withObject:@{ + @"errorCode" : error != nil ? NUMINTEGER([error code]) : [NSNull null], + @"errorDescription" : error != nil ? [error localizedDescription] : [NSNull null], + @"errorDomain" : error != nil ? [error domain] : [NSNull null] + }]; + } + }]; +} + +- (void)writeLock +{ + [[self.tagProxy tag] writeLockWithCompletionHandler:^(NSError *_Nullable error) { + if (error == nil) { + if (![self _hasListeners:@"didWriteLock"]) { + return; + } + [self fireEvent:@"didWriteLock" + withObject:@{ + @"errorCode" : error != nil ? NUMINTEGER([error code]) : [NSNull null], + @"errorDescription" : error != nil ? [error localizedDescription] : [NSNull null], + @"errorDomain" : error != nil ? [error domain] : [NSNull null] + }]; + } + }]; +} + @end diff --git a/ios/Classes/TiNfcNdefMessageProxy.h b/ios/Classes/TiNfcNdefMessageProxy.h index dc628e6..d60cb1a 100644 --- a/ios/Classes/TiNfcNdefMessageProxy.h +++ b/ios/Classes/TiNfcNdefMessageProxy.h @@ -21,6 +21,7 @@ - (NSArray *)records; +- (NSArray *)nfcNdefPayloads; @end #endif diff --git a/ios/Classes/TiNfcNdefMessageProxy.m b/ios/Classes/TiNfcNdefMessageProxy.m index 1c3e533..41d1df5 100644 --- a/ios/Classes/TiNfcNdefMessageProxy.m +++ b/ios/Classes/TiNfcNdefMessageProxy.m @@ -36,6 +36,11 @@ - (id)_initWithPageContext:(id)context andRecords:(NSArray *)nfcNdefPayloads +{ + return _records; +} + @end #endif diff --git a/ios/Classes/TiNfcNfcAdapterProxy.m b/ios/Classes/TiNfcNfcAdapterProxy.m index 1b0b4c3..362f78e 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.m +++ b/ios/Classes/TiNfcNfcAdapterProxy.m @@ -12,6 +12,7 @@ #import "TiNfcISODepTagTechnology.h" #import "TiNfcMiFareUltralightTagTechnology.h" #import "TiNfcModule.h" +#import "TiNfcNDEFTagProxy.h" #import "TiNfcNDEFTagTechnology.h" #import "TiNfcNdefMessageProxy.h" #import "TiNfcTagProxy.h" @@ -110,7 +111,7 @@ - (TiNfcNDEFTagTechnology *)createTagTechNdef:(id)args if ([[args firstObject] valueForKey:@"tag"] == nil) { return nil; } - TiNfcTagProxy *tag = [[args firstObject] valueForKey:@"tag"]; + TiNfcNDEFTagProxy *tag = [[args firstObject] valueForKey:@"tag"]; TiNfcNDEFTagTechnology *ndefTag = [[TiNfcNDEFTagTechnology alloc] _initWithPageContext:[self pageContext] andSession:_nfcSession andTag:tag]; return ndefTag; } @@ -159,6 +160,33 @@ - (void)setOnNdefInvalidated:(KrollCallback *)callback #pragma mark NFCNDEFReaderSessionDelegate +- (void)readerSession:(NFCNDEFReaderSession *)session didDetectTags:(NSArray<__kindof id> *)tags +{ + if (![self _hasListeners:@"didDetectTags"]) { + return; + } + NSMutableArray *tagData = [[NSMutableArray alloc] init]; + for (id tag in tags) { + [tagData addObject:[[TiNfcNDEFTagProxy alloc] _initWithPageContext:[self pageContext] andTag:tag]]; + } + [self fireEvent:@"didDetectTags" + withObject:@{ + @"tags" : tagData, + @"type" : @"NFCNDEFReaderSession" + }]; +} + +- (void)readerSessionDidBecomeActive:(NFCNDEFReaderSession *)session +{ + if (![self _hasListeners:@"tagReaderSessionDidBecomeActive"]) { + return; + } + [self fireEvent:@"tagReaderSessionDidBecomeActive" + withObject:@{ + @"type" : @"NFCNDEFReaderSession" + }]; +} + - (void)readerSession:(NFCNDEFReaderSession *)session didDetectNDEFs:(NSArray *)messages { if (!_ndefDiscoveredCallback) { diff --git a/ios/ti.nfc.xcodeproj/project.pbxproj b/ios/ti.nfc.xcodeproj/project.pbxproj index a5c7ab6..3a165ee 100644 --- a/ios/ti.nfc.xcodeproj/project.pbxproj +++ b/ios/ti.nfc.xcodeproj/project.pbxproj @@ -26,6 +26,8 @@ 24DD6CFA1134B3F500162E58 /* TiNfcModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 24DD6CF81134B3F500162E58 /* TiNfcModule.m */; }; 24DE9E1111C5FE74003F90F6 /* TiNfcModuleAssets.h in Headers */ = {isa = PBXBuildFile; fileRef = 24DE9E0F11C5FE74003F90F6 /* TiNfcModuleAssets.h */; }; 24DE9E1211C5FE74003F90F6 /* TiNfcModuleAssets.m in Sources */ = {isa = PBXBuildFile; fileRef = 24DE9E1011C5FE74003F90F6 /* TiNfcModuleAssets.m */; }; + 31DEA7B425FF487400D97E71 /* TiNfcNDEFTagProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 31DEA7B225FF487400D97E71 /* TiNfcNDEFTagProxy.h */; }; + 31DEA7B525FF487400D97E71 /* TiNfcNDEFTagProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 31DEA7B325FF487400D97E71 /* TiNfcNDEFTagProxy.m */; }; AA747D9F0F9514B9006C5449 /* TiNfc_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = AA747D9E0F9514B9006C5449 /* TiNfc_Prefix.pch */; }; AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; }; DB2394562067C0680092DF6D /* CoreNFC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB856C3F1EE98B1700DE4334 /* CoreNFC.framework */; }; @@ -71,6 +73,8 @@ 24DD6D1B1134B66800162E58 /* titanium.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = titanium.xcconfig; sourceTree = ""; }; 24DE9E0F11C5FE74003F90F6 /* TiNfcModuleAssets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TiNfcModuleAssets.h; path = Classes/TiNfcModuleAssets.h; sourceTree = ""; }; 24DE9E1011C5FE74003F90F6 /* TiNfcModuleAssets.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TiNfcModuleAssets.m; path = Classes/TiNfcModuleAssets.m; sourceTree = ""; }; + 31DEA7B225FF487400D97E71 /* TiNfcNDEFTagProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TiNfcNDEFTagProxy.h; path = Classes/TiNfcNDEFTagProxy.h; sourceTree = ""; }; + 31DEA7B325FF487400D97E71 /* TiNfcNDEFTagProxy.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TiNfcNDEFTagProxy.m; path = Classes/TiNfcNDEFTagProxy.m; sourceTree = ""; }; AA747D9E0F9514B9006C5449 /* TiNfc_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TiNfc_Prefix.pch; sourceTree = SOURCE_ROOT; }; AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; D2AAC07E0554694100DB518D /* libti.nfc.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libti.nfc.a; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -214,6 +218,8 @@ E2DA8E4125AF1EBA006F1DFA /* TiNfcFTagTechnology.m */, E213783525C184E100FE0EED /* TiNfcTagProxy.h */, E213783625C184E100FE0EED /* TiNfcTagProxy.m */, + 31DEA7B225FF487400D97E71 /* TiNfcNDEFTagProxy.h */, + 31DEA7B325FF487400D97E71 /* TiNfcNDEFTagProxy.m */, ); name = "NFC Proxy class"; sourceTree = ""; @@ -231,6 +237,7 @@ E2DA8DF825AEE3F6006F1DFA /* TiNfcTagTechnologyProxy.h in Headers */, DB4613971F8CEF2A003956CF /* TiNfcUtilities.h in Headers */, DBF688331EEB4B3500009357 /* TiNfcNdefMessageProxy.h in Headers */, + 31DEA7B425FF487400D97E71 /* TiNfcNDEFTagProxy.h in Headers */, 24DD6CF91134B3F500162E58 /* TiNfcModule.h in Headers */, E213783725C184E100FE0EED /* TiNfcTagProxy.h in Headers */, E2DA8E3625AF1BA2006F1DFA /* TiNfcISODepTagTechnology.h in Headers */, @@ -322,6 +329,7 @@ DBF688381EEB4CB300009357 /* TiNfcNdefRecordProxy.m in Sources */, E2DA8DFF25AEE4D9006F1DFA /* TiNfcNativeTagTechnologyProxy.m in Sources */, DB856C471EE98C3B00DE4334 /* TiNfcNfcAdapterProxy.m in Sources */, + 31DEA7B525FF487400D97E71 /* TiNfcNDEFTagProxy.m in Sources */, DBF688341EEB4B3500009357 /* TiNfcNdefMessageProxy.m in Sources */, E2DA8DD125A3526B006F1DFA /* TiNfcMiFareUltralightTagTechnology.m in Sources */, E213783825C184E100FE0EED /* TiNfcTagProxy.m in Sources */, From c162e3ec1fe74c7bcbbc00f9254ee82983888b70 Mon Sep 17 00:00:00 2001 From: Fasihul Haque Date: Mon, 22 Mar 2021 23:44:29 +0530 Subject: [PATCH 46/59] refactor(ios): rename didConnectNDEFTag event to didConnectTag --- ios/Classes/TiNfcNDEFTagTechnology.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/Classes/TiNfcNDEFTagTechnology.m b/ios/Classes/TiNfcNDEFTagTechnology.m index 7356786..ab920f0 100644 --- a/ios/Classes/TiNfcNDEFTagTechnology.m +++ b/ios/Classes/TiNfcNDEFTagTechnology.m @@ -34,11 +34,11 @@ - (void)connect { [self.session connectToTag:[self.tagProxy tag] completionHandler:^(NSError *_Nullable error) { - if (![self _hasListeners:@"didConnectNDEFTag"]) { + if (![self _hasListeners:@"didConnectTag"]) { return; } [error code]; - [self fireEvent:@"didConnectNDEFTag" + [self fireEvent:@"didConnectTag" withObject:@{ @"errorCode" : error != nil ? NUMINTEGER([error code]) : [NSNull null], @"errorDescription" : error != nil ? [error localizedDescription] : [NSNull null], From b8441c425894e4f86a18f4c25ca693aeb02ae77b Mon Sep 17 00:00:00 2001 From: Fasihul Haque Date: Tue, 23 Mar 2021 00:11:01 +0530 Subject: [PATCH 47/59] feat(example): added example for ndef tag --- ios/example/NDEF/app.js | 262 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 262 insertions(+) create mode 100644 ios/example/NDEF/app.js diff --git a/ios/example/NDEF/app.js b/ios/example/NDEF/app.js new file mode 100644 index 0000000..04e6937 --- /dev/null +++ b/ios/example/NDEF/app.js @@ -0,0 +1,262 @@ +/* +* NFC Tag Viewer Example Application +* +* This application demonstrates how to use the iOS 11+ NFC module. +* +* Ensure to include the required entitlements to the section of your tiapp.xml: +* +* +* +* com.apple.developer.nfc.readersession.formats +* +* NDEF +* +* +* +* +* Also, ensure to include the NFC-privacy key in your section of your tiapp.xml +* +* +* +* +* ... +* NFCReaderUsageDescription +* YOUR_PRIVACY_DESCRIPTION +* +* +* +* Finally, ensure to enable the "NFC Tag Reading" capability in your provisioning profile +* by checking it in the Apple Developer Center (https://developer.apple.com). +*/ + +var nfc = require('ti.nfc'); +var logs = []; +var ndefTagTechnology; +var sessionType = ({type:nfc.READER_SESSION_NFC_NDEF, pollingOptions: [nfc.NFC_TAG_ISO14443]} ) +var nfcAdapter = nfc.createNfcAdapter({ +onNdefDiscovered: handleDiscovery +}); + +function handleDiscovery(e) { + // Add rows for the message, tag, and each of the records + var data = []; + Ti.API.warn(e); + if (e.messages) { + var message = e.messages[0]; + if (message.records) { + for (var i = 0; i < message.records.length; i++) { + data.push(message.records[i]); + } + } + } + Ti.API.info(data); +} + +//Invalidate Session +function invalidateSession () { + nfcAdapter.invalidate(sessionType); +} + +// Configure UI +var deviceWindow = Ti.UI.createWindow({ + backgroundColor: 'white', + title: 'NDEF Sample', + titleAttributes: { color: 'blue' } +}); + +var navDeviceWindow = Ti.UI.iOS.createNavigationWindow({ + window: deviceWindow +}); + +//Scan button +var startSearchButton = Titanium.UI.createButton({ + top: 100, + title: 'Scan and send NDEF connect command' +}); +var startSearchButtonClick = (e) => { + if (!nfcAdapter.isEnabled(sessionType)) { + Ti.API.error('This device does not support NFC capabilities!'); + return; + } + nfcAdapter.begin(sessionType); // This is required for iOS only. Use "invalidate()" to invalidate a session. +}; + +//Query NDEF status button +var queryNdefStatusButton = Titanium.UI.createButton({ + top: 140, + title: 'Query NDEF status' +}); +var queryNdefStatusButtonClick = (e) => { + if (ndefTagTechnology) { + ndefTagTechnology.queryNDEFStatus(); + } else { + alert('No NDEF tag available to query status'); + } +}; + +//Read NDEF button +var readNdefButton = Titanium.UI.createButton({ + top: 180, + title: 'Read NDEF' +}); +var readNdefButtonClick = (e) => { + if (ndefTagTechnology) { + ndefTagTechnology.readNDEF(); + } else { + alert('No NDEF tag available to read'); + } +}; + +//Clear logs button +var clearLogButton = Titanium.UI.createButton({ + top: 220, + color: 'red', + title: 'Clear Log' +}); +var clearLogButtonClick = (e) => { + logs.splice(0, logs.length); + setData(logs); +}; + +//Module Event Handler +//Tag events +var didConnectTag = (e) => { + var eventMessage = 'didConnectTag with message' + (e.errorCode ? (' error code: ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description: ' + e.errorDescription) : ': NDEF Tag Connected'); + Ti.API.info(eventMessage); + logs.push(eventMessage); + setData(logs); +}; + +var didQueryNDEFStatus = (e) => { + switch (e.status) { + case nfc.NFC_NDEF_NOT_SUPPORTED: + logs.push('NDEF tag not supported'); + break; + + case BLE.NFC_NDEF_READ_ONLY: + logs.push('NDEF tag read only'); + break; + + case BLE.NFC_NDEF_READ_WRITE: + logs.push('NDEF tag read and write and write'); + break; + default: + break; + } + setData(logs); + + var eventMessage = 'Query status with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription + ' status ' + e.status + ' capacity ' + e.capacity; + Ti.API.info(eventMessage); +}; + +var didReadNDEFMessage = (e) => { + var eventMessage = 'Query status with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription + ' message ' + e.message; + Ti.API.info(eventMessage); + logs.push('NDEF message read object ' + e.message); + setData(logs); +}; + +//Session Events +var tagReaderSessionDidBecomeActive = (e) => { + var eventMessage = 'tagReaderSessionDidBecomeActive with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription; + Ti.API.info(eventMessage); + logs.push(eventMessage); + setData(logs); +}; + +var didDetectTags = (e) => { + Ti.API.info('didDetectTags ' + e); + logs.push('didDetectTags with message' + (e.errorCode ? (' error code: ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description: ' + e.errorDescription) : ': Tag Detected')); + setData(logs); + ndefTagTechnology = nfcAdapter.createTagTechNdef({'tag':e.tags[0]});//Create Tag Technology + if (ndefTagTechnology){ + addNDEFTagEvent();//Register Event + ndefTagTechnology.connect(); + } else { + alert('No NDEF tag available to connect'); + } +}; + +var didInvalidateWithError = (e) => { + var eventMessage = 'Invalidate the session with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription + Ti.API.info(eventMessage); + logs.push(eventMessage); + setData(logs); +}; + +//Add Event Listners +nfcAdapter.addEventListener('tagReaderSessionDidBecomeActive', tagReaderSessionDidBecomeActive); +nfcAdapter.addEventListener('didDetectTags', didDetectTags); +nfcAdapter.addEventListener('didInvalidateWithError', didInvalidateWithError); + +startSearchButton.addEventListener('click', startSearchButtonClick); +clearLogButton.addEventListener('click', clearLogButtonClick); +queryNdefStatusButton.addEventListener('click', queryNdefStatusButtonClick); +readNdefButton.addEventListener('click', readNdefButtonClick); + +function addNDEFTagEvent(){ + ndefTagTechnology.addEventListener('didConnectTag', didConnectTag); + ndefTagTechnology.addEventListener('didQueryNDEFStatus', didQueryNDEFStatus); + ndefTagTechnology.addEventListener('didReadNDEFMessage', didReadNDEFMessage); +} + +//Logs tableview +var tableView = Titanium.UI.createTableView({ + top: 250, + scrollable: true, + backgroundColor: 'White', + separatorColor: '#DBE1E2', + bottom: '5%', +}); +var tbl_data = []; +function setData(list) { + tbl_data.splice(0, tbl_data.length); + if (list.length > 0) { + var initalValue = list.length - 1; + for (var i = initalValue; i >= 0; i--) { + var btDevicesRow = Ti.UI.createTableViewRow({ + height: 50, + row: i, + hasChild: true + }); + var uuidLabel = Ti.UI.createLabel({ + left: 5, + right: 5, + color: 'blue', + top: 5, + font: { fontSize: 11 }, + text: list[i] + }); + btDevicesRow.add(uuidLabel); + tbl_data.push(btDevicesRow); + } + } + tableView.setData(tbl_data); +} +setData(logs); + +//Add all UI to window +navDeviceWindow.add(startSearchButton); +navDeviceWindow.add(queryNdefStatusButton); +navDeviceWindow.add(readNdefButton); +navDeviceWindow.add(clearLogButton); +navDeviceWindow.add(tableView); + +//Remove all events +navDeviceWindow.addEventListener('close', function () { + nfcAdapter.removeEventListener('tagReaderSessionDidBecomeActive', didUpdateState); + nfcAdapter.removeEventListener('didDetectTags', didStartAdvertising); + nfcAdapter.removeEventListener('didInvalidateWithError', didStartAdvertising); + if(ndefTagTechnology) { + ndefTagTechnology.removeEventListener('didConnectTag', didConnectTag); + ndefTagTechnology.removeEventListener('didQueryNDEFStatus', didQueryNDEFStatus); + ndefTagTechnology.removeEventListener('didReadNDEFMessage', didReadNDEFMessage); + } + startSearchButton.removeEventListener('click', startSearchButtonClick); + clearLogBtn.removeEventListener('click', clearLogButtonClick); + queryNdefStatusButton.removeEventListener('click', queryNdefStatusButtonClick); + readNdefButton.removeEventListener('click', readNdefButtonClick); + invalidateSession(); +}); + +navDeviceWindow.open(); From 1ea75e0caf8864432b27986d3dd24ef2425cdbea Mon Sep 17 00:00:00 2001 From: Fasihul Haque Date: Tue, 23 Mar 2021 00:42:11 +0530 Subject: [PATCH 48/59] docs(ios): rename didConnectNDEFTag event to didConnectTag --- apidoc/NfcNDEFTagTechnology.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apidoc/NfcNDEFTagTechnology.yml b/apidoc/NfcNDEFTagTechnology.yml index b4e4ba4..ef644ad 100644 --- a/apidoc/NfcNDEFTagTechnology.yml +++ b/apidoc/NfcNDEFTagTechnology.yml @@ -10,7 +10,7 @@ createable: false methods: - name: connect - summary: Call to connect NfcNDEFTag from session NFCNDEFReaderSession, connection success or failure result in a didConnectNDEFTag event. + summary: Call to connect NfcNDEFTag from session NFCNDEFReaderSession, connection success or failure result in a didConnectTag event. returns: type: void @@ -35,7 +35,7 @@ methods: type: void events: - - name: didConnectNDEFTag + - 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. From c44dbb64c3abd0be57e04ac90fd9b1be1baacbd1 Mon Sep 17 00:00:00 2001 From: Fasihul Haque Date: Tue, 23 Mar 2021 15:09:48 +0530 Subject: [PATCH 49/59] fix(example): fixed typo --- ios/example/NDEF/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/example/NDEF/app.js b/ios/example/NDEF/app.js index 04e6937..9364405 100644 --- a/ios/example/NDEF/app.js +++ b/ios/example/NDEF/app.js @@ -133,11 +133,11 @@ var didQueryNDEFStatus = (e) => { logs.push('NDEF tag not supported'); break; - case BLE.NFC_NDEF_READ_ONLY: + case nfc.NFC_NDEF_READ_ONLY: logs.push('NDEF tag read only'); break; - case BLE.NFC_NDEF_READ_WRITE: + case nfc.NFC_NDEF_READ_WRITE: logs.push('NDEF tag read and write and write'); break; default: From 50b4292c0a2c00b1d46825c125e389863821a9f3 Mon Sep 17 00:00:00 2001 From: Fasihul Haque Date: Tue, 23 Mar 2021 15:27:03 +0530 Subject: [PATCH 50/59] fix(ios): make available as public method --- ios/Classes/TiNfcNDEFTagProxy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Classes/TiNfcNDEFTagProxy.h b/ios/Classes/TiNfcNDEFTagProxy.h index 9b416c6..7bde050 100644 --- a/ios/Classes/TiNfcNDEFTagProxy.h +++ b/ios/Classes/TiNfcNDEFTagProxy.h @@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN - (id)_initWithPageContext:(id)context andTag:(id)tag; - (id)tag; - +- (NSNumber *)available; @end NS_ASSUME_NONNULL_END From 7680ae3a60d14171c69a2e5c66e69045c283fdcf Mon Sep 17 00:00:00 2001 From: Fasihul Haque Date: Wed, 24 Mar 2021 13:07:37 +0530 Subject: [PATCH 51/59] fix(ios): added missing event for didInvalidateWithError --- ios/Classes/TiNfcNfcAdapterProxy.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ios/Classes/TiNfcNfcAdapterProxy.m b/ios/Classes/TiNfcNfcAdapterProxy.m index 362f78e..b467af4 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.m +++ b/ios/Classes/TiNfcNfcAdapterProxy.m @@ -215,6 +215,18 @@ - (void)readerSession:(NFCNDEFReaderSession *)session didInvalidateWithError:(NS // Make sure to clear the session so it can be recreated on the next attempt _nfcSession = nil; + _nfcTagReadersession = nil; + if (![self _hasListeners:@"didInvalidateWithError"]) { + return; + } + [self fireEvent:@"didInvalidateWithError" + withObject:@{ + @"errorCode" : error != nil ? NUMINTEGER([error code]) : [NSNull null], + @"errorDescription" : error != nil ? [error localizedDescription] : [NSNull null], + @"errorDomain" : error != nil ? [error domain] : [NSNull null], + @"type" : @"NFCTagReaderSession" + }]; + if (!_nNdefInvalidated) { return; } From fc44752abaaa9a328c50dde584e246059d937dc6 Mon Sep 17 00:00:00 2001 From: Fasihul Haque Date: Wed, 24 Mar 2021 13:09:47 +0530 Subject: [PATCH 52/59] fix(example): fixed session invalidate issue also added action type to manage actions --- ios/example/NDEF/app.js | 81 ++++++++++++++++++++++++++++++++--------- 1 file changed, 63 insertions(+), 18 deletions(-) diff --git a/ios/example/NDEF/app.js b/ios/example/NDEF/app.js index 9364405..61b3260 100644 --- a/ios/example/NDEF/app.js +++ b/ios/example/NDEF/app.js @@ -29,9 +29,17 @@ * by checking it in the Apple Developer Center (https://developer.apple.com). */ +var NDEFActionType = { + None: 0, + Connect: 1, + QueryStatus: 2, + Read: 3, +}; + var nfc = require('ti.nfc'); var logs = []; var ndefTagTechnology; +var actionType = NDEFActionType.None; var sessionType = ({type:nfc.READER_SESSION_NFC_NDEF, pollingOptions: [nfc.NFC_TAG_ISO14443]} ) var nfcAdapter = nfc.createNfcAdapter({ onNdefDiscovered: handleDiscovery @@ -54,9 +62,19 @@ function handleDiscovery(e) { //Invalidate Session function invalidateSession () { + actionType = NDEFActionType.None; nfcAdapter.invalidate(sessionType); } +//Check Device Capabilities +function isDeviceSupportNFC () { + if (nfcAdapter.isEnabled(sessionType)) { + Ti.API.error('This device support NFC capabilities!'); + return true; + } + Ti.API.error('This device does not support NFC capabilities!'); + return false; +} // Configure UI var deviceWindow = Ti.UI.createWindow({ backgroundColor: 'white', @@ -73,12 +91,12 @@ var startSearchButton = Titanium.UI.createButton({ top: 100, title: 'Scan and send NDEF connect command' }); + var startSearchButtonClick = (e) => { - if (!nfcAdapter.isEnabled(sessionType)) { - Ti.API.error('This device does not support NFC capabilities!'); - return; + if (isDeviceSupportNFC()) { + actionType = NDEFActionType.Connect; + nfcAdapter.begin(sessionType); // This is required for iOS only. Use "invalidate()" to invalidate a session. } - nfcAdapter.begin(sessionType); // This is required for iOS only. Use "invalidate()" to invalidate a session. }; //Query NDEF status button @@ -86,11 +104,11 @@ var queryNdefStatusButton = Titanium.UI.createButton({ top: 140, title: 'Query NDEF status' }); + var queryNdefStatusButtonClick = (e) => { - if (ndefTagTechnology) { - ndefTagTechnology.queryNDEFStatus(); - } else { - alert('No NDEF tag available to query status'); + if (isDeviceSupportNFC()) { + actionType = NDEFActionType.QueryStatus; + nfcAdapter.begin(sessionType); } }; @@ -100,10 +118,9 @@ var readNdefButton = Titanium.UI.createButton({ title: 'Read NDEF' }); var readNdefButtonClick = (e) => { - if (ndefTagTechnology) { - ndefTagTechnology.readNDEF(); - } else { - alert('No NDEF tag available to read'); + if (isDeviceSupportNFC()) { + actionType = NDEFActionType.Read; + nfcAdapter.begin(sessionType); } }; @@ -124,6 +141,27 @@ var didConnectTag = (e) => { var eventMessage = 'didConnectTag with message' + (e.errorCode ? (' error code: ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description: ' + e.errorDescription) : ': NDEF Tag Connected'); Ti.API.info(eventMessage); logs.push(eventMessage); + + if (!e.errorCode) { + switch (actionType) { + case NDEFActionType.Connect: + invalidateSession(); + //Connection done, no further action required + break; + + case NDEFActionType.QueryStatus: + logs.push('NDEF tag read in-progress'); + ndefTagTechnology.queryNDEFStatus; + break; + + case NDEFActionType.Read: + logs.push('NDEF tag read in-progress'); + ndefTagTechnology.readNDEF; + break; + default: + break; + } + } setData(logs); }; @@ -147,6 +185,8 @@ var didQueryNDEFStatus = (e) => { var eventMessage = 'Query status with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription + ' status ' + e.status + ' capacity ' + e.capacity; Ti.API.info(eventMessage); + + invalidateSession(); }; var didReadNDEFMessage = (e) => { @@ -154,6 +194,8 @@ var didReadNDEFMessage = (e) => { Ti.API.info(eventMessage); logs.push('NDEF message read object ' + e.message); setData(logs); + + invalidateSession(); }; //Session Events @@ -166,22 +208,25 @@ var tagReaderSessionDidBecomeActive = (e) => { var didDetectTags = (e) => { Ti.API.info('didDetectTags ' + e); - logs.push('didDetectTags with message' + (e.errorCode ? (' error code: ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description: ' + e.errorDescription) : ': Tag Detected')); + logs.push('Tag Detected'); setData(logs); ndefTagTechnology = nfcAdapter.createTagTechNdef({'tag':e.tags[0]});//Create Tag Technology if (ndefTagTechnology){ - addNDEFTagEvent();//Register Event - ndefTagTechnology.connect(); + if (actionType === (NDEFActionType.Connect || NDEFActionType.QueryStatus || NDEFActionType.Read)) { + addNDEFTagEvent();//Register Event + ndefTagTechnology.connect; + } } else { alert('No NDEF tag available to connect'); } }; var didInvalidateWithError = (e) => { + logs.push('Error for NDEF action type ' + actionType); var eventMessage = 'Invalidate the session with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription - Ti.API.info(eventMessage); - logs.push(eventMessage); - setData(logs); + Ti.API.info(eventMessage); + logs.push(eventMessage); + setData(logs); }; //Add Event Listners From 587162773ad63f102aefcf62d7745e5d29e41a1b Mon Sep 17 00:00:00 2001 From: Fasihul Haque Date: Wed, 24 Mar 2021 14:50:08 +0530 Subject: [PATCH 53/59] style(ios): fix lint issue --- ios/Classes/TiNfcNfcAdapterProxy.m | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ios/Classes/TiNfcNfcAdapterProxy.m b/ios/Classes/TiNfcNfcAdapterProxy.m index b467af4..c263014 100644 --- a/ios/Classes/TiNfcNfcAdapterProxy.m +++ b/ios/Classes/TiNfcNfcAdapterProxy.m @@ -215,18 +215,18 @@ - (void)readerSession:(NFCNDEFReaderSession *)session didInvalidateWithError:(NS // Make sure to clear the session so it can be recreated on the next attempt _nfcSession = nil; - _nfcTagReadersession = nil; - if (![self _hasListeners:@"didInvalidateWithError"]) { - return; - } - [self fireEvent:@"didInvalidateWithError" - withObject:@{ - @"errorCode" : error != nil ? NUMINTEGER([error code]) : [NSNull null], - @"errorDescription" : error != nil ? [error localizedDescription] : [NSNull null], - @"errorDomain" : error != nil ? [error domain] : [NSNull null], - @"type" : @"NFCTagReaderSession" - }]; - + _nfcTagReadersession = nil; + if (![self _hasListeners:@"didInvalidateWithError"]) { + return; + } + [self fireEvent:@"didInvalidateWithError" + withObject:@{ + @"errorCode" : error != nil ? NUMINTEGER([error code]) : [NSNull null], + @"errorDescription" : error != nil ? [error localizedDescription] : [NSNull null], + @"errorDomain" : error != nil ? [error domain] : [NSNull null], + @"type" : @"NFCTagReaderSession" + }]; + if (!_nNdefInvalidated) { return; } From 032addda51b384a23c65bed78142f8eaf1c0875a Mon Sep 17 00:00:00 2001 From: Fasihul Haque Date: Wed, 24 Mar 2021 15:25:44 +0530 Subject: [PATCH 54/59] refactor(test): refactor required module test case --- test/unit/specs/module.spec.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/unit/specs/module.spec.js b/test/unit/specs/module.spec.js index 5baf7d2..fd41199 100644 --- a/test/unit/specs/module.spec.js +++ b/test/unit/specs/module.spec.js @@ -1,4 +1,4 @@ -let NFC; +const NFC = require('ti.nfc'); let nfcAdapter; const IOS = (Ti.Platform.osname === 'iphone' || Ti.Platform.osname === 'ipad'); @@ -6,8 +6,6 @@ const ANDROID = (Ti.Platform.osname === 'android'); describe('ti.nfc', () => { it('can be required', () => { - NFC = require('ti.nfc'); - expect(NFC).toBeDefined(); }); From c7fcb981082f4fc4413609b2a97d5c6d4ba89831 Mon Sep 17 00:00:00 2001 From: Fasihul Haque Date: Wed, 24 Mar 2021 17:20:40 +0530 Subject: [PATCH 55/59] fix(example): removed action type check also refactored some code --- ios/example/NDEF/app.js | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/ios/example/NDEF/app.js b/ios/example/NDEF/app.js index 61b3260..b0b8805 100644 --- a/ios/example/NDEF/app.js +++ b/ios/example/NDEF/app.js @@ -176,7 +176,7 @@ var didQueryNDEFStatus = (e) => { break; case nfc.NFC_NDEF_READ_WRITE: - logs.push('NDEF tag read and write and write'); + logs.push('NDEF tag read and write'); break; default: break; @@ -209,24 +209,23 @@ var tagReaderSessionDidBecomeActive = (e) => { var didDetectTags = (e) => { Ti.API.info('didDetectTags ' + e); logs.push('Tag Detected'); - setData(logs); ndefTagTechnology = nfcAdapter.createTagTechNdef({'tag':e.tags[0]});//Create Tag Technology if (ndefTagTechnology){ - if (actionType === (NDEFActionType.Connect || NDEFActionType.QueryStatus || NDEFActionType.Read)) { - addNDEFTagEvent();//Register Event - ndefTagTechnology.connect; - } + logs.push('Trying to connect tag with action type ' + actionType); + addNDEFTagEvent();//Register Event + ndefTagTechnology.connect; } else { alert('No NDEF tag available to connect'); } + setData(logs); }; var didInvalidateWithError = (e) => { - logs.push('Error for NDEF action type ' + actionType); var eventMessage = 'Invalidate the session with - error code ' + e.errorCode + ' error domain: ' + e.errorDomain + ' error description ' + e.errorDescription Ti.API.info(eventMessage); logs.push(eventMessage); setData(logs); + removeNDEFTagEventListener(); }; //Add Event Listners @@ -292,11 +291,7 @@ navDeviceWindow.addEventListener('close', function () { nfcAdapter.removeEventListener('tagReaderSessionDidBecomeActive', didUpdateState); nfcAdapter.removeEventListener('didDetectTags', didStartAdvertising); nfcAdapter.removeEventListener('didInvalidateWithError', didStartAdvertising); - if(ndefTagTechnology) { - ndefTagTechnology.removeEventListener('didConnectTag', didConnectTag); - ndefTagTechnology.removeEventListener('didQueryNDEFStatus', didQueryNDEFStatus); - ndefTagTechnology.removeEventListener('didReadNDEFMessage', didReadNDEFMessage); - } + removeNDEFTagEventListener(); startSearchButton.removeEventListener('click', startSearchButtonClick); clearLogBtn.removeEventListener('click', clearLogButtonClick); queryNdefStatusButton.removeEventListener('click', queryNdefStatusButtonClick); @@ -304,4 +299,11 @@ navDeviceWindow.addEventListener('close', function () { invalidateSession(); }); +function removeNDEFTagEventListener () { + if(ndefTagTechnology) { + ndefTagTechnology.removeEventListener('didConnectTag', didConnectTag); + ndefTagTechnology.removeEventListener('didQueryNDEFStatus', didQueryNDEFStatus); + ndefTagTechnology.removeEventListener('didReadNDEFMessage', didReadNDEFMessage); + } +} navDeviceWindow.open(); From 53adb76d6fcdc223830d5220c16f865dd09c4db4 Mon Sep 17 00:00:00 2001 From: Ewan Harris Date: Mon, 4 Jan 2021 14:57:24 +0000 Subject: [PATCH 56/59] chore(devdeps): remove socket.io --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 9a0ca4b..c5caa54 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,6 @@ "karma-mocha-reporter": "^2.2.5", "karma-titanium-launcher": "^0.8.1", "lint-staged": "^10.0.7", - "socket.io": "^2.2.0", "titanium-docgen": "^4.2.0" }, "dependencies": {}, From 1f7f720c8694a7d4e34106ccc05fc0c499e870dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 12 Dec 2020 23:11:27 +0000 Subject: [PATCH 57/59] build(deps): bump ini from 1.3.5 to 1.3.8 Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8) Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7e8bd80..a5f8c13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5411,9 +5411,9 @@ "dev": true }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, "inquirer": { From 78de050f91e4edc2f53c5870c46053ebef4812a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Jan 2021 15:50:13 +0000 Subject: [PATCH 58/59] build(deps): bump socket.io from 2.3.0 to 2.4.1 Bumps [socket.io](https://github.com/socketio/socket.io) from 2.3.0 to 2.4.1. - [Release notes](https://github.com/socketio/socket.io/releases) - [Changelog](https://github.com/socketio/socket.io/blob/2.4.1/CHANGELOG.md) - [Commits](https://github.com/socketio/socket.io/compare/2.3.0...2.4.1) Signed-off-by: dependabot[bot] --- package-lock.json | 404 +++++++++++++++++++++++----------------------- 1 file changed, 204 insertions(+), 200 deletions(-) diff --git a/package-lock.json b/package-lock.json index a5f8c13..955b61b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2116,12 +2116,6 @@ "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", "dev": true }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", - "dev": true - }, "async-retry": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.2.3.tgz", @@ -2508,10 +2502,10 @@ } } }, - "base64-arraybuffer": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", - "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", + "base64id": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", + "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", "dev": true }, "bcrypt-pbkdf": { @@ -2529,15 +2523,6 @@ "integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==", "dev": true }, - "better-assert": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", - "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", - "dev": true, - "requires": { - "callsite": "1.0.0" - } - }, "binary-extensions": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", @@ -2702,12 +2687,6 @@ "caller-callsite": "^2.0.0" } }, - "callsite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", - "dev": true - }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -3256,12 +3235,6 @@ "safe-buffer": "~5.1.1" } }, - "cookie": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", - "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=", - "dev": true - }, "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", @@ -3742,6 +3715,106 @@ "once": "^1.4.0" } }, + "engine.io": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.5.0.tgz", + "integrity": "sha512-21HlvPUKaitDGE4GXNtQ7PLP0Sz4aWLddMPw2VTyFz1FVZqu/kZsJUO8WNpKuE/OCL7nkfRaOui2ZCJloGznGA==", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "base64id": "2.0.0", + "cookie": "~0.4.1", + "debug": "~4.1.0", + "engine.io-parser": "~2.2.0", + "ws": "~7.4.2" + }, + "dependencies": { + "cookie": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", + "dev": true + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } + } + }, + "engine.io-client": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.5.0.tgz", + "integrity": "sha512-12wPRfMrugVw/DNyJk34GQ5vIVArEcVMXWugQGGuw2XxUSztFNmJggZmv8IZlLyEdnpO1QB9LkcjeWewO2vxtA==", + "dev": true, + "requires": { + "component-emitter": "~1.3.0", + "component-inherit": "0.0.3", + "debug": "~3.1.0", + "engine.io-parser": "~2.2.0", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parseqs": "0.0.6", + "parseuri": "0.0.6", + "ws": "~7.4.2", + "xmlhttprequest-ssl": "~1.5.4", + "yeast": "0.1.2" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "parseqs": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz", + "integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==", + "dev": true + }, + "parseuri": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.6.tgz", + "integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==", + "dev": true + } + } + }, + "engine.io-parser": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.1.tgz", + "integrity": "sha512-x+dN/fBH8Ro8TFwJ+rkB2AmuVw9Yu2mockR/p3W8f8YtExwFgDvBDi0GWyb4ZLkpahtDGZgtr3zLovanJghPqg==", + "dev": true, + "requires": { + "after": "0.8.2", + "arraybuffer.slice": "~0.0.7", + "base64-arraybuffer": "0.1.4", + "blob": "0.0.5", + "has-binary2": "~1.0.2" + }, + "dependencies": { + "base64-arraybuffer": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz", + "integrity": "sha1-mBjHngWbE1X5fgQooBfIOOkLqBI=", + "dev": true + } + } + }, "enquirer": { "version": "2.3.5", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.5.tgz", @@ -7471,12 +7544,6 @@ "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "dev": true }, - "object-component": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", - "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=", - "dev": true - }, "object-copy": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", @@ -7753,24 +7820,6 @@ "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", "dev": true }, - "parseqs": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", - "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", - "dev": true, - "requires": { - "better-assert": "~1.0.0" - } - }, - "parseuri": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", - "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", - "dev": true, - "requires": { - "better-assert": "~1.0.0" - } - }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -8585,31 +8634,19 @@ } }, "socket.io": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.3.0.tgz", - "integrity": "sha512-2A892lrj0GcgR/9Qk81EaY2gYhCBxurV0PfmmESO6p27QPrUK1J3zdns+5QPqvUYK2q657nSj0guoIil9+7eFg==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.4.1.tgz", + "integrity": "sha512-Si18v0mMXGAqLqCVpTxBa8MGqriHGQh8ccEOhmsmNS3thNCGBwO8WGrwMibANsWtQQ5NStdZwHqZR3naJVFc3w==", "dev": true, "requires": { "debug": "~4.1.0", - "engine.io": "~3.4.0", + "engine.io": "~3.5.0", "has-binary2": "~1.0.2", "socket.io-adapter": "~1.1.0", - "socket.io-client": "2.3.0", + "socket.io-client": "2.4.0", "socket.io-parser": "~3.4.0" }, "dependencies": { - "base64id": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", - "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", - "dev": true - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", - "dev": true - }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -8619,67 +8656,103 @@ "ms": "^2.1.1" } }, - "engine.io": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.4.2.tgz", - "integrity": "sha512-b4Q85dFkGw+TqgytGPrGgACRUhsdKc9S9ErRAXpPGy/CXKs4tYoHDkvIRdsseAF7NjfVwjRFIn6KTnbw7LwJZg==", + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } + } + }, + "socket.io-adapter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz", + "integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==", + "dev": true + }, + "socket.io-client": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.4.0.tgz", + "integrity": "sha512-M6xhnKQHuuZd4Ba9vltCLT9oa+YvTsP8j9NcEiLElfIg8KeYPyhWOes6x4t+LTAC8enQbE/995AdTem2uNyKKQ==", + "dev": true, + "requires": { + "backo2": "1.0.2", + "component-bind": "1.0.0", + "component-emitter": "~1.3.0", + "debug": "~3.1.0", + "engine.io-client": "~3.5.0", + "has-binary2": "~1.0.2", + "indexof": "0.0.1", + "parseqs": "0.0.6", + "parseuri": "0.0.6", + "socket.io-parser": "~3.3.0", + "to-array": "0.1.4" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "dev": true, "requires": { - "accepts": "~1.3.4", - "base64id": "2.0.0", - "cookie": "0.3.1", - "debug": "~4.1.0", - "engine.io-parser": "~2.2.0", - "ws": "^7.1.2" + "ms": "2.0.0" } }, - "engine.io-client": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.4.3.tgz", - "integrity": "sha512-0NGY+9hioejTEJCaSJZfWZLk4FPI9dN+1H1C4+wj2iuFba47UgZbJzfWs4aNFajnX/qAaYKbe2lLTfEEWzCmcw==", + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=", + "dev": true + }, + "parseqs": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.6.tgz", + "integrity": "sha512-jeAGzMDbfSHHA091hr0r31eYfTig+29g3GKKE/PPbEQ65X0lmMwlEoqmhzu0iztID5uJpZsFlUPDP8ThPL7M8w==", + "dev": true + }, + "parseuri": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.6.tgz", + "integrity": "sha512-AUjen8sAkGgao7UyCX6Ahv0gIK2fABKmYjvP4xmy5JaKvcbTRueIqIPHLAfq30xJddqSE033IOMUSOMCcK3Sow==", + "dev": true + }, + "socket.io-parser": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.2.tgz", + "integrity": "sha512-FJvDBuOALxdCI9qwRrO/Rfp9yfndRtc1jSgVgV8FDraihmSP/MLGD5PEuJrNfjALvcQ+vMDM/33AWOYP/JSjDg==", "dev": true, "requires": { "component-emitter": "~1.3.0", - "component-inherit": "0.0.3", - "debug": "~4.1.0", - "engine.io-parser": "~2.2.0", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "ws": "~6.1.0", - "xmlhttprequest-ssl": "~1.5.4", - "yeast": "0.1.2" - }, - "dependencies": { - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, - "ws": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.4.tgz", - "integrity": "sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0" - } - } + "debug": "~3.1.0", + "isarray": "2.0.1" } + } + } + }, + "socket.io-parser": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.4.1.tgz", + "integrity": "sha512-11hMgzL+WCLWf1uFtHSNvliI++tcRUWdoeYuwIl+Axvwy9z2gQM+7nJyN3STj1tLj5JyIUH8/gpDGxzAlDdi0A==", + "dev": true, + "requires": { + "component-emitter": "1.2.1", + "debug": "~4.1.0", + "isarray": "2.0.1" + }, + "dependencies": { + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "dev": true }, - "engine.io-parser": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.0.tgz", - "integrity": "sha512-6I3qD9iUxotsC5HEMuuGsKA0cXerGz+4uGcXQEkfBidgKf0amsjrrtwcbwK/nzpZBxclXlV7gGl9dgWvu4LF6w==", + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { - "after": "0.8.2", - "arraybuffer.slice": "~0.0.7", - "base64-arraybuffer": "0.1.5", - "blob": "0.0.5", - "has-binary2": "~1.0.2" + "ms": "^2.1.1" } }, "isarray": { @@ -8689,88 +8762,13 @@ "dev": true }, "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "socket.io-client": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.3.0.tgz", - "integrity": "sha512-cEQQf24gET3rfhxZ2jJ5xzAOo/xhZwK+mOqtGRg5IowZsMgwvHwnf/mCRapAAkadhM26y+iydgwsXGObBB5ZdA==", - "dev": true, - "requires": { - "backo2": "1.0.2", - "base64-arraybuffer": "0.1.5", - "component-bind": "1.0.0", - "component-emitter": "1.2.1", - "debug": "~4.1.0", - "engine.io-client": "~3.4.0", - "has-binary2": "~1.0.2", - "has-cors": "1.1.0", - "indexof": "0.0.1", - "object-component": "0.0.3", - "parseqs": "0.0.5", - "parseuri": "0.0.5", - "socket.io-parser": "~3.3.0", - "to-array": "0.1.4" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "socket.io-parser": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.0.tgz", - "integrity": "sha512-hczmV6bDgdaEbVqhAeVMM/jfUfzuEZHsQg6eOmLgJht6G3mPKMxYm75w2+qhAQZ+4X+1+ATZ+QFKeOZD5riHng==", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "debug": "~3.1.0", - "isarray": "2.0.1" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - } - } - } - } - }, - "socket.io-parser": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.4.1.tgz", - "integrity": "sha512-11hMgzL+WCLWf1uFtHSNvliI++tcRUWdoeYuwIl+Axvwy9z2gQM+7nJyN3STj1tLj5JyIUH8/gpDGxzAlDdi0A==", - "dev": true, - "requires": { - "component-emitter": "1.2.1", - "debug": "~4.1.0", - "isarray": "2.0.1" - } - }, - "ws": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.0.tgz", - "integrity": "sha512-iFtXzngZVXPGgpTlP1rBqsUK82p9tKqsWRPg5L56egiljujJT3vGAYnHANvFxBieXrTFavhzhxW52jnaWV+w2w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true } } }, - "socket.io-adapter": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz", - "integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g==", - "dev": true - }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -9754,6 +9752,12 @@ "mkdirp": "^0.5.1" } }, + "ws": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.2.tgz", + "integrity": "sha512-T4tewALS3+qsrpGI/8dqNMLIVdq/g/85U98HPMa6F0m6xTbvhXU6RCQLqPH3+SlomNV/LdY6RXEbBpMH6EOJnA==", + "dev": true + }, "xmlbuilder": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-12.0.0.tgz", From 0dc576a6d7086e2b2a72d9626d72d9aef977ff9b Mon Sep 17 00:00:00 2001 From: Fasihul Haque Date: Tue, 30 Mar 2021 17:22:51 +0530 Subject: [PATCH 59/59] ios(build): bumped ios version to 4.0.0 and package version to 6.0.0 --- ios/manifest | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/manifest b/ios/manifest index 5aa0db6..8ed7202 100644 --- a/ios/manifest +++ b/ios/manifest @@ -2,7 +2,7 @@ # this is your module manifest and used by Titanium # during compilation, packaging, distribution, etc. # -version: 3.0.0 +version: 4.0.0 apiversion: 2 architectures: armv7 arm64 i386 x86_64 description: ti.nfc diff --git a/package-lock.json b/package-lock.json index 955b61b..a2c79bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@titanium-sdk/ti.nfc", - "version": "5.0.0", + "version": "6.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index c5caa54..7853740 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@titanium-sdk/ti.nfc", - "version": "5.0.0", + "version": "6.0.0", "description": "Titanium NFC module.", "scripts": { "ci": "node updater/index.js ci",