From b7f6f1c9894645d00a69ba80a78b6bc3ce3931f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Murat=20=C3=87orlu?= Date: Mon, 30 Jul 2018 14:15:44 +0200 Subject: [PATCH 1/6] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8e7ac0a..3b75a2e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "nativescript-ios-uuid", "version": "0.0.1", "description": "A NativeScript plugin for iOS that allows you to get a UUID (Universal Unique Identifier) for a device.", - "main": "index.js", + "main": "index", "nativescript": { "id": "org.nativescript.iosuuid", "platforms": { From 4f2958ca6ba8616a86f5a306e0d530030762a9f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Murat=20=C3=87orlu?= Date: Mon, 30 Jul 2018 16:24:45 +0200 Subject: [PATCH 2/6] SSKeychain has been deprecated in favor of SAMKeychain --- platforms/ios/Podfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/ios/Podfile b/platforms/ios/Podfile index 749bc13..7507847 100644 --- a/platforms/ios/Podfile +++ b/platforms/ios/Podfile @@ -1 +1 @@ -pod 'SSKeychain' +pod 'SAMKeychain' From 8fd118d9682b55c13ad95dc7d9f7ff55ace4bc24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Murat=20=C3=87orlu?= Date: Mon, 30 Jul 2018 16:26:19 +0200 Subject: [PATCH 3/6] SAMKeychain --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b19b250..bc4ece6 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This is a plugin for iOS that allows you to get a UUID (Universal Unique Identif Inspired from [`StackOverflow: How to preserve identifierForVendor in ios after uninstalling ios app on device?`] (http://stackoverflow.com/questions/21878560/how-to-preserve-identifierforvendor-in-ios-after-uninstalling-ios-app-on-device). -Uses [`SSKeychain Cocoa Pod`](https://cocoapods.org/pods/SSKeychain). +Uses [`SAMKeychain Cocoa Pod`](https://cocoapods.org/pods/SAMKeychain). ## Installation `tns plugin add nativescript-ios-uuid` From 7b360f6d4d6e3dd65f43884bb3bcea209ae226fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Murat=20=C3=87orlu?= Date: Mon, 30 Jul 2018 16:54:24 +0200 Subject: [PATCH 4/6] Placeholder file for android --- index.android.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 index.android.js diff --git a/index.android.js b/index.android.js new file mode 100644 index 0000000..1ad7e90 --- /dev/null +++ b/index.android.js @@ -0,0 +1,5 @@ +const platformModule = require("tns-core-modules/platform"); + +exports.getUUID = function () { + return platformModule.device.uuid; +}; From c55944b47adf49551ce98715525177ffed011b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Murat=20=C3=87orlu?= Date: Mon, 30 Jul 2018 23:23:04 +0200 Subject: [PATCH 5/6] SSKeychain -> SAMKeychain --- index.ios.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.ios.js b/index.ios.js index 1b108f8..71f373e 100644 --- a/index.ios.js +++ b/index.ios.js @@ -1,9 +1,9 @@ function getUUID() { var appName = NSBundle.mainBundle.infoDictionary.objectForKey(kCFBundleNameKey); - var strApplicationUUID = SSKeychain.passwordForServiceAccount(appName, "incoding"); + var strApplicationUUID = SAMKeychain.passwordForServiceAccount(appName, "incoding"); if (!strApplicationUUID){ strApplicationUUID = UIDevice.currentDevice.identifierForVendor.UUIDString; - SSKeychain.setPasswordForServiceAccount(strApplicationUUID, appName, "incoding"); + SAMKeychain.setPasswordForServiceAccount(strApplicationUUID, appName, "incoding"); } return strApplicationUUID; From 53594f710ec282eda03bebfb190529116e9035a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Murat=20=C3=87orlu?= Date: Tue, 31 Jul 2018 15:50:18 +0200 Subject: [PATCH 6/6] Supported platforms --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 3b75a2e..416fcc1 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "nativescript": { "id": "org.nativescript.iosuuid", "platforms": { - "ios": "1.3.0" + "android": "3.0.0", + "ios": "3.0.0" } }, "repository": {