capacitor-secure-storage-plugin 0.6.4 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
13
|
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
-
s.ios.deployment_target = '
|
|
14
|
+
s.ios.deployment_target = '13.0'
|
|
15
15
|
s.dependency 'Capacitor'
|
|
16
16
|
s.dependency 'SwiftKeychainWrapper'
|
|
17
17
|
s.swift_version = '5.1'
|
package/android/build.gradle
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
ext {
|
|
2
|
-
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.
|
|
3
|
-
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.2
|
|
4
|
-
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.
|
|
5
|
-
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.
|
|
2
|
+
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
3
|
+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.4.2'
|
|
4
|
+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.3'
|
|
5
|
+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.4.0'
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
buildscript {
|
|
9
9
|
repositories {
|
|
10
10
|
google()
|
|
11
|
-
|
|
11
|
+
mavenCentral()
|
|
12
12
|
}
|
|
13
13
|
dependencies {
|
|
14
|
-
classpath 'com.android.tools.build:gradle:
|
|
14
|
+
classpath 'com.android.tools.build:gradle:7.2.1'
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
apply plugin: 'com.android.library'
|
|
19
19
|
|
|
20
20
|
android {
|
|
21
|
-
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion :
|
|
21
|
+
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 32
|
|
22
22
|
defaultConfig {
|
|
23
|
-
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion :
|
|
24
|
-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion :
|
|
23
|
+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
|
|
24
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 32
|
|
25
25
|
versionCode 1
|
|
26
26
|
versionName "1.0"
|
|
27
27
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
@@ -36,22 +36,21 @@ android {
|
|
|
36
36
|
abortOnError false
|
|
37
37
|
}
|
|
38
38
|
compileOptions {
|
|
39
|
-
sourceCompatibility JavaVersion.
|
|
40
|
-
targetCompatibility JavaVersion.
|
|
39
|
+
sourceCompatibility JavaVersion.VERSION_11
|
|
40
|
+
targetCompatibility JavaVersion.VERSION_11
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
repositories {
|
|
45
45
|
google()
|
|
46
46
|
mavenCentral()
|
|
47
|
-
jcenter()
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
|
|
51
50
|
dependencies {
|
|
52
|
-
implementation fileTree(
|
|
53
|
-
implementation project(':capacitor-android')
|
|
51
|
+
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
54
52
|
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
53
|
+
implementation project(':capacitor-android')
|
|
55
54
|
testImplementation "junit:junit:$junitVersion"
|
|
56
55
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
57
56
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
@@ -13,7 +13,7 @@ public class SecureStoragePlugin: CAPPlugin {
|
|
|
13
13
|
@objc func set(_ call: CAPPluginCall) {
|
|
14
14
|
let key = call.getString("key") ?? ""
|
|
15
15
|
let value = call.getString("value") ?? ""
|
|
16
|
-
let saveSuccessful: Bool = keychainwrapper.set(value, forKey: key, withAccessibility: .
|
|
16
|
+
let saveSuccessful: Bool = keychainwrapper.set(value, forKey: key, withAccessibility: .afterFirstUnlock)
|
|
17
17
|
if(saveSuccessful) {
|
|
18
18
|
call.resolve([
|
|
19
19
|
"value": saveSuccessful
|
|
@@ -34,7 +34,7 @@ public class SecureStoragePlugin: CAPPlugin {
|
|
|
34
34
|
let syncValueSuccessful: Bool = keychainwrapper.set(
|
|
35
35
|
KeychainWrapper.standard.string(forKey: key) ?? "",
|
|
36
36
|
forKey: key,
|
|
37
|
-
withAccessibility: .
|
|
37
|
+
withAccessibility: .afterFirstUnlock
|
|
38
38
|
)
|
|
39
39
|
let removeValueSuccessful: Bool = KeychainWrapper.standard.removeObject(forKey: key)
|
|
40
40
|
if (!syncValueSuccessful || !removeValueSuccessful) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "capacitor-secure-storage-plugin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Securely store secrets such as usernames, passwords, tokens, certificates or other sensitive information (strings) on iOS & Android",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"prepublishOnly": "npm run build"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@capacitor/android": "^
|
|
48
|
-
"@capacitor/core": "^
|
|
49
|
-
"@capacitor/docgen": "^0.0
|
|
50
|
-
"@capacitor/ios": "^
|
|
47
|
+
"@capacitor/android": "^4.0.0",
|
|
48
|
+
"@capacitor/core": "^4.0.0",
|
|
49
|
+
"@capacitor/docgen": "^0.2.0",
|
|
50
|
+
"@capacitor/ios": "^4.0.0",
|
|
51
51
|
"@ionic/eslint-config": "^0.3.0",
|
|
52
52
|
"@ionic/prettier-config": "^1.0.1",
|
|
53
53
|
"@ionic/swiftlint-config": "^1.1.2",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"typescript": "~4.0.3"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@capacitor/core": "^
|
|
63
|
+
"@capacitor/core": "^4.0.0"
|
|
64
64
|
},
|
|
65
65
|
"prettier": "@ionic/prettier-config",
|
|
66
66
|
"swiftlint": "@ionic/swiftlint-config",
|
package/CHANGELOG.md
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
## v0.7.0
|
|
2
|
-
|
|
3
|
-
- based on current Capacitor 3.5.1 plugin template
|
|
4
|
-
- iOS - access when a device is locked
|
|
5
|
-
- fixed keys() on Web
|
|
6
|
-
|
|
7
|
-
## v0.6.2
|
|
8
|
-
|
|
9
|
-
- fix keys() serialization error on Android
|
|
10
|
-
|
|
11
|
-
## v0.6.1
|
|
12
|
-
|
|
13
|
-
- fix keys() serializable error on iOS
|
|
14
|
-
|
|
15
|
-
## v0.6.0
|
|
16
|
-
|
|
17
|
-
- migrate to capacitor 3.0
|
|
18
|
-
- for Capacitor 2.X.X install vesrion v0.5.1
|
|
19
|
-
|
|
20
|
-
- `npm install capacitor-secure-storage-plugin@0.5.1`
|
|
21
|
-
|
|
22
|
-
- import plugin in web project in Capacitor v3 is `import { SecureStoragePlugin } from 'capacitor-secure-storage-plugin';` directly, instead of import of Plugins from capacitor/core
|
|
23
|
-
|
|
24
|
-
## v0.5.1
|
|
25
|
-
|
|
26
|
-
- fix Capacitor version to 2.X.X
|
|
27
|
-
|
|
28
|
-
## v0.5.0
|
|
29
|
-
|
|
30
|
-
- added keys() method - warning: returns just keys saved from this version up
|
|
31
|
-
- iOS: instead on standard keychain, wrapper service is used
|
|
32
|
-
- migration is not needed, plugin saves new values to wrapped keychain and get method uses standard keychain as a fallback
|
|
33
|
-
|
|
34
|
-
## v0.4.0
|
|
35
|
-
|
|
36
|
-
- rebased on Capacitor v2 plugin template
|
|
37
|
-
- added getPlatform() method
|
|
38
|
-
|
|
39
|
-
## v0.3.2
|
|
40
|
-
|
|
41
|
-
- update Capacitor dependencies
|
|
42
|
-
|
|
43
|
-
## v0.3.1
|
|
44
|
-
|
|
45
|
-
- fix long string handling
|