com.amanotes.gdk 0.1.20 → 0.2.1

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.
Files changed (58) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/Editor/AmaGDKEditor.cs +91 -46
  3. package/Editor/AmaGDKManager.cs +26 -27
  4. package/Editor/Utils/AmaGDKEditor.ExtractVersion.cs +133 -103
  5. package/Editor/Utils/AmaGDKEditor.GUI.cs +54 -51
  6. package/Editor/Utils/AmaGDKEditor.Utils.cs +2 -3
  7. package/Packages/AmaGDKConfig.unitypackage +0 -0
  8. package/Packages/AmaGDKExample.unitypackage +0 -0
  9. package/Packages/AmaGDKTest.unitypackage +0 -0
  10. package/Packages/AmaPassport.ATTSupport.unitypackage +0 -0
  11. package/{Samples~/Example/AmaGDKExample.unity.meta → Packages/AmaPassport.ATTSupport.unitypackage.meta} +1 -1
  12. package/Packages/AmaPassport.AdvertisingID.unitypackage +0 -0
  13. package/{Sample~/Example/AmaGDKExample.unity.meta → Packages/AmaPassport.AdvertisingID.unitypackage.meta} +1 -1
  14. package/Packages/AppsFlyerAdapter_v6.5.4.unitypackage +0 -0
  15. package/Packages/FirebaseAnalyticsAdapter_v9.1.0.unitypackage +0 -0
  16. package/Packages/FirebaseRemoteConfigAdapter_v9.1.0.unitypackage +0 -0
  17. package/{Runtime/AmaPassport/Plugins.meta → Packages/FirebaseRemoteConfigAdapter_v9.1.0.unitypackage.meta} +1 -2
  18. package/Packages/IronsourceAdapter_v7.2.6.unitypackage +0 -0
  19. package/Runtime/AmaGDK.Adapters.cs +30 -12
  20. package/Runtime/AmaGDK.Ads.cs +520 -162
  21. package/Runtime/{AmaPassport/AmaGDK.AmaPassport.cs → AmaGDK.AmaPassport.cs} +36 -47
  22. package/Runtime/{AmaPassport/AmaGDK.AmaPassport.cs.meta → AmaGDK.AmaPassport.cs.meta} +1 -1
  23. package/Runtime/AmaGDK.Analytics.cs +78 -89
  24. package/Runtime/AmaGDK.Config.cs +23 -19
  25. package/Runtime/AmaGDK.Internal.SemVer.cs +11 -29
  26. package/Runtime/AmaGDK.Internal.cs +17 -11
  27. package/Runtime/AmaGDK.RemoteConfig.cs +352 -0
  28. package/Runtime/{AmaPassport/Plugins/Android/AdvertisingIdFetcher.cs.meta → AmaGDK.RemoteConfig.cs.meta} +1 -1
  29. package/Runtime/AmaGDK.UserProfile.cs +5 -8
  30. package/Runtime/AmaGDK.Utils.cs +79 -60
  31. package/Runtime/AmaGDK.WebUtils.cs +45 -48
  32. package/Runtime/AmaGDK.cs +74 -22
  33. package/Runtime/AssemblyInfo.cs +0 -1
  34. package/package.json +1 -1
  35. package/Packages/AppsflyerAdapter_v6.5.4.unitypackage +0 -0
  36. package/Runtime/AmaPassport/Plugins/Android/AdvertisingIdCallback.java +0 -7
  37. package/Runtime/AmaPassport/Plugins/Android/AdvertisingIdCallback.java.meta +0 -32
  38. package/Runtime/AmaPassport/Plugins/Android/AdvertisingIdFetcher.cs +0 -96
  39. package/Runtime/AmaPassport/Plugins/Android/AdvertisingIdFetcher.java +0 -79
  40. package/Runtime/AmaPassport/Plugins/Android/AdvertisingIdFetcher.java.meta +0 -32
  41. package/Runtime/AmaPassport/Plugins/Android.meta +0 -8
  42. package/Runtime/AmaPassport/Plugins/iOS/KeyChain.cs +0 -59
  43. package/Runtime/AmaPassport/Plugins/iOS/KeyChain.cs.meta +0 -11
  44. package/Runtime/AmaPassport/Plugins/iOS/KeyChainPlugin.mm +0 -52
  45. package/Runtime/AmaPassport/Plugins/iOS/KeyChainPlugin.mm.meta +0 -33
  46. package/Runtime/AmaPassport/Plugins/iOS/UICKeyChainStore.h +0 -281
  47. package/Runtime/AmaPassport/Plugins/iOS/UICKeyChainStore.h.meta +0 -33
  48. package/Runtime/AmaPassport/Plugins/iOS/UICKeyChainStore.m +0 -1393
  49. package/Runtime/AmaPassport/Plugins/iOS/UICKeyChainStore.m.meta +0 -33
  50. package/Runtime/AmaPassport/Plugins/iOS.meta +0 -8
  51. package/Runtime/AmaPassport.meta +0 -8
  52. package/Samples~/Example/AmaGDKExample.cs +0 -87
  53. package/Samples~/Example/AmaGDKExample.cs.meta +0 -11
  54. package/Samples~/Example/AmaGDKExample.unity +0 -3114
  55. package/Sample~/Example/AmaGDKExample.cs +0 -87
  56. package/Sample~/Example/AmaGDKExample.cs.meta +0 -11
  57. package/Sample~/Example/AmaGDKExample.unity +0 -3114
  58. /package/Packages/{AppsflyerAdapter_v6.5.4.unitypackage.meta → AppsFlyerAdapter_v6.5.4.unitypackage.meta} +0 -0
@@ -1,96 +0,0 @@
1
- using System;
2
- using UnityEngine;
3
- using static Amanotes.Core.Internal.Logging;
4
-
5
- namespace Amanotes.Core
6
- {
7
- public partial class AmaGDK //AmaPassport
8
- {
9
- public partial class AmaPassport //AdvertisingId
10
- {
11
- internal static void GetAdvertisingId(Action oncomplete)
12
- {
13
- AdvertisingIdFetcher.RequestAdvertisingId(advertisingId =>
14
- {
15
- var device = User.amaPassport.device;
16
- switch (Application.platform)
17
- {
18
- case RuntimePlatform.IPhonePlayer:
19
- device.idfa = advertisingId;
20
- device.idfv = SystemInfo.deviceUniqueIdentifier;
21
- var v = KeyChain.GetKeyChain(AMA_DEVICE_ID_KEY);
22
- if (string.IsNullOrEmpty(v))
23
- {
24
- v = Guid.NewGuid().ToString();
25
- KeyChain.SetKeyChain(AMA_DEVICE_ID_KEY, v);
26
- }
27
- device.amaDeviceId = v;
28
- break;
29
-
30
- case RuntimePlatform.Android:
31
- device.gaid = advertisingId;
32
- device.androidId = SystemInfo.deviceUniqueIdentifier;
33
- break;
34
-
35
- default:
36
- LogWarning("Unsupported platform: " + Application.platform);
37
- break;
38
- }
39
-
40
- oncomplete?.Invoke();
41
- });
42
- }
43
- }
44
-
45
- private class AdvertisingIdFetcher
46
- {
47
- public static void RequestAdvertisingId(Action<string> callback)
48
- {
49
- new AdvertisingIdFetcher().DoRequestAdvertisingId(callback);
50
- }
51
-
52
- private Action<string> mCallback;
53
-
54
- private void DoRequestAdvertisingId(Action<string> callback)
55
- {
56
- mCallback = callback;
57
-
58
- #if UNITY_EDITOR
59
- OnAdvertisingIdReceived("0000-0000-0000-0000");
60
- #elif UNITY_ANDROID && UNITY_2020_1_OR_NEWER
61
- var fetcher = new AndroidJavaObject("com.miniit.android.AdvertisingIdFetcher");
62
- fetcher.Call("requestAdvertisingId", new AdvertisingIdPluginCallback(OnAdvertisingIdReceived));
63
- #else
64
- Application.RequestAdvertisingIdentifierAsync(OnAdvertisingIdReceived);
65
- #endif
66
- }
67
-
68
- private void OnAdvertisingIdReceived(string advertisingId)
69
- {
70
- mCallback?.Invoke(advertisingId);
71
- }
72
-
73
- private void OnAdvertisingIdReceived(string advertisingId, bool trackingEnabled, string errorMsg)
74
- {
75
- mCallback?.Invoke(advertisingId);
76
- }
77
- }
78
-
79
- #if UNITY_ANDROID && UNITY_2020_1_OR_NEWER
80
- public class AdvertisingIdPluginCallback : AndroidJavaProxy
81
- {
82
- private Action<string> mCallback;
83
-
84
- public AdvertisingIdPluginCallback(Action<string> callback) : base("com.miniit.android.AdvertisingIdCallback")
85
- {
86
- mCallback = callback;
87
- }
88
-
89
- public void onResult(string adid)
90
- {
91
- mCallback?.Invoke(adid);
92
- }
93
- }
94
- #endif
95
- }
96
- }
@@ -1,79 +0,0 @@
1
-
2
- package com.miniit.android;
3
-
4
- import com.unity3d.player.UnityPlayer;
5
-
6
- import android.content.Context;
7
- import android.os.AsyncTask;
8
- //import androidx.ads.identifier.AdvertisingIdClient;
9
- //import androidx.ads.identifier.AdvertisingIdInfo;
10
- import com.google.android.gms.ads.identifier.AdvertisingIdClient;
11
- import java.lang.Exception;
12
-
13
- public class AdvertisingIdFetcher
14
- {
15
- private AdvertisingIdCallback callback;
16
-
17
- public void requestAdvertisingId(AdvertisingIdCallback callback)
18
- {
19
- if (callback == null)
20
- return;
21
-
22
- Context context = UnityPlayer.currentActivity.getApplicationContext();
23
-
24
- // if (!AdvertisingIdClient.isAdvertisingIdProviderAvailable(context))
25
- // {
26
- // callback.onResult("");
27
- // return;
28
- // }
29
-
30
- this.callback = callback;
31
-
32
- new GetAdIdTask(context).execute();
33
- }
34
-
35
- private class GetAdIdTask extends AsyncTask<String, Integer, String>
36
- {
37
- private Context context;
38
-
39
- public GetAdIdTask(Context context)
40
- {
41
- super();
42
- this.context = context;
43
- }
44
-
45
- @Override
46
- protected String doInBackground(String... strings)
47
- {
48
- // if (!AdvertisingIdClient.isAdvertisingIdProviderAvailable(context))
49
- // return "";
50
-
51
- AdvertisingIdClient.Info adInfo;
52
- adInfo = null;
53
- try
54
- {
55
- adInfo = AdvertisingIdClient.getAdvertisingIdInfo(context);
56
- if (adInfo.isLimitAdTrackingEnabled()) // check if user has opted out of tracking
57
- {
58
- return "";
59
- }
60
- }
61
- catch (Exception e)
62
- {
63
- e.printStackTrace();
64
- }
65
-
66
- if (adInfo != null)
67
- return adInfo.getId();
68
-
69
- return "";
70
- }
71
-
72
- @Override
73
- protected void onPostExecute(String adid)
74
- {
75
- if (callback != null)
76
- callback.onResult(adid);
77
- }
78
- }
79
- }
@@ -1,32 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 67f1e7c55f07420489df8e0cef2c7069
3
- PluginImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- iconMap: {}
7
- executionOrder: {}
8
- defineConstraints: []
9
- isPreloaded: 0
10
- isOverridable: 1
11
- isExplicitlyReferenced: 0
12
- validateReferences: 1
13
- platformData:
14
- - first:
15
- Android: Android
16
- second:
17
- enabled: 1
18
- settings: {}
19
- - first:
20
- Any:
21
- second:
22
- enabled: 0
23
- settings: {}
24
- - first:
25
- Editor: Editor
26
- second:
27
- enabled: 0
28
- settings:
29
- DefaultValueInitialized: true
30
- userData:
31
- assetBundleName:
32
- assetBundleVariant:
@@ -1,8 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 5bbece61d1e624b6fa9af5810f48a26b
3
- folderAsset: yes
4
- DefaultImporter:
5
- externalObjects: {}
6
- userData:
7
- assetBundleName:
8
- assetBundleVariant:
@@ -1,59 +0,0 @@
1
- using UnityEngine;
2
- using System.Runtime.InteropServices;
3
-
4
- namespace Amanotes.Core
5
- {
6
- public partial class AmaGDK //AmaPassport
7
- {
8
- public partial class AmaPassport
9
- {
10
- internal class KeyChain
11
- {
12
-
13
- #if UNITY_IOS && !UNITY_EDITOR
14
-
15
- [DllImport("__Internal")]
16
- private static extern string getKeyChain(string key);
17
-
18
- public static string GetKeyChain(string key)
19
- {
20
- return getKeyChain(key);
21
- }
22
-
23
- [DllImport("__Internal")]
24
- private static extern void setKeyChain(string key, string value);
25
-
26
- public static void SetKeyChain(string key, string value)
27
- {
28
- setKeyChain(key, value);
29
- }
30
-
31
- [DllImport("__Internal")]
32
- private static extern void deleteKeyChain(string key);
33
-
34
- public static void DeleteKeyChain(string key)
35
- {
36
- deleteKeyChain(key);
37
- }
38
-
39
- #else
40
- public static string GetKeyChain(string key)
41
- {
42
- Debug.LogWarning("[Keychain] Not support platform");
43
- return "";
44
- }
45
-
46
- public static void SetKeyChain(string key, string value)
47
- {
48
- Debug.LogWarning("[Keychain] Not support platform");
49
- }
50
-
51
- public static void DeleteKeyChain(string key)
52
- {
53
- Debug.LogWarning("[Keychain] Not support platform");
54
- }
55
- #endif
56
- }
57
- }
58
- }
59
- }
@@ -1,11 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 9e869282c35c845eab8440d98d054729
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
@@ -1,52 +0,0 @@
1
- #import "UICKeyChainStore.h"
2
-  
3
- @implementation KeyChainPlugin
4
-
5
- NSString * const ACCESS_GROUP = @"VB9LPSKB3A.com.amanotes.shared";
6
- NSString * const SERVICE = @"keychain";
7
-
8
- extern "C" {
9
-     char* getKeyChain(const char* key);
10
-     void setKeyChain(const char* key, const char* value);
11
-     void deleteKeyChain(const char* key);
12
- }
13
-  
14
- char* getKeyChain(const char* key)
15
- {
16
- NSString *nskey = [NSString stringWithCString: key encoding:NSUTF8StringEncoding];
17
-     NSString *nsvalue = [UICKeyChainStore stringForKey:nskey service:SERVICE accessGroup:ACCESS_GROUP];
18
-  
19
-     if (nsvalue == nil || [nsvalue isEqualToString:@""]) {
20
-         NSLog(@"No value for key %@", nskey);        
21
-         nsvalue = @"";
22
-     }
23
-  
24
-     return makeStringCopy([nsvalue UTF8String]);
25
- }
26
-  
27
- void setKeyChain(const char* key, const char* value)
28
- {
29
-     NSString *nskey = [NSString stringWithCString: key encoding:NSUTF8StringEncoding];
30
-     NSString *nsvalue = [NSString stringWithCString: value encoding:NSUTF8StringEncoding];
31
-  
32
-     [UICKeyChainStore setString:nsvalue forKey:nskey service:SERVICE accessGroup:ACCESS_GROUP];
33
- }
34
-  
35
- void deleteKeyChain(const char* key)
36
- {
37
- NSString *nskey = [NSString stringWithCString: key encoding:NSUTF8StringEncoding];
38
-     [UICKeyChainStore removeItemForKey:nskey service:SERVICE accessGroup:ACCESS_GROUP];
39
- }
40
-  
41
- char* makeStringCopy(const char* str)
42
- {
43
-     if (str == NULL) {
44
-         return NULL;
45
-     }
46
-  
47
-     char* res = (char*)malloc(strlen(str) + 1);
48
-     strcpy(res, str);
49
-     return res;
50
- }
51
-  
52
- @end
@@ -1,33 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: b1c82bcdd19224b3394a58acd5a146d5
3
- PluginImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- iconMap: {}
7
- executionOrder: {}
8
- defineConstraints: []
9
- isPreloaded: 0
10
- isOverridable: 0
11
- isExplicitlyReferenced: 0
12
- validateReferences: 1
13
- platformData:
14
- - first:
15
- Any:
16
- second:
17
- enabled: 0
18
- settings: {}
19
- - first:
20
- Editor: Editor
21
- second:
22
- enabled: 0
23
- settings:
24
- DefaultValueInitialized: true
25
- - first:
26
- iPhone: iOS
27
- second:
28
- enabled: 1
29
- settings:
30
- AddToEmbeddedBinaries: false
31
- userData:
32
- assetBundleName:
33
- assetBundleVariant:
@@ -1,281 +0,0 @@
1
- //
2
- // UICKeyChainStore.h
3
- // UICKeyChainStore
4
- //
5
- // Created by Kishikawa Katsumi on 11/11/20.
6
- // Copyright (c) 2011 Kishikawa Katsumi. All rights reserved.
7
- //
8
-
9
- #import <Foundation/Foundation.h>
10
-
11
- #if !__has_feature(nullability)
12
- #define NS_ASSUME_NONNULL_BEGIN
13
- #define NS_ASSUME_NONNULL_END
14
- #define nullable
15
- #define nonnull
16
- #define null_unspecified
17
- #define null_resettable
18
- #define __nullable
19
- #define __nonnull
20
- #define __null_unspecified
21
- #endif
22
-
23
- #if __has_extension(objc_generics)
24
- #define UIC_KEY_TYPE <NSString *>
25
- #define UIC_CREDENTIAL_TYPE <NSDictionary <NSString *, NSString *>*>
26
- #else
27
- #define UIC_KEY_TYPE
28
- #define UIC_CREDENTIAL_TYPE
29
- #endif
30
-
31
- NS_ASSUME_NONNULL_BEGIN
32
-
33
- extern NSString * const UICKeyChainStoreErrorDomain;
34
-
35
- typedef NS_ENUM(NSInteger, UICKeyChainStoreErrorCode) {
36
- UICKeyChainStoreErrorInvalidArguments = 1,
37
- };
38
-
39
- typedef NS_ENUM(NSInteger, UICKeyChainStoreItemClass) {
40
- UICKeyChainStoreItemClassGenericPassword = 1,
41
- UICKeyChainStoreItemClassInternetPassword,
42
- };
43
-
44
- typedef NS_ENUM(NSInteger, UICKeyChainStoreProtocolType) {
45
- UICKeyChainStoreProtocolTypeFTP = 1,
46
- UICKeyChainStoreProtocolTypeFTPAccount,
47
- UICKeyChainStoreProtocolTypeHTTP,
48
- UICKeyChainStoreProtocolTypeIRC,
49
- UICKeyChainStoreProtocolTypeNNTP,
50
- UICKeyChainStoreProtocolTypePOP3,
51
- UICKeyChainStoreProtocolTypeSMTP,
52
- UICKeyChainStoreProtocolTypeSOCKS,
53
- UICKeyChainStoreProtocolTypeIMAP,
54
- UICKeyChainStoreProtocolTypeLDAP,
55
- UICKeyChainStoreProtocolTypeAppleTalk,
56
- UICKeyChainStoreProtocolTypeAFP,
57
- UICKeyChainStoreProtocolTypeTelnet,
58
- UICKeyChainStoreProtocolTypeSSH,
59
- UICKeyChainStoreProtocolTypeFTPS,
60
- UICKeyChainStoreProtocolTypeHTTPS,
61
- UICKeyChainStoreProtocolTypeHTTPProxy,
62
- UICKeyChainStoreProtocolTypeHTTPSProxy,
63
- UICKeyChainStoreProtocolTypeFTPProxy,
64
- UICKeyChainStoreProtocolTypeSMB,
65
- UICKeyChainStoreProtocolTypeRTSP,
66
- UICKeyChainStoreProtocolTypeRTSPProxy,
67
- UICKeyChainStoreProtocolTypeDAAP,
68
- UICKeyChainStoreProtocolTypeEPPC,
69
- UICKeyChainStoreProtocolTypeNNTPS,
70
- UICKeyChainStoreProtocolTypeLDAPS,
71
- UICKeyChainStoreProtocolTypeTelnetS,
72
- UICKeyChainStoreProtocolTypeIRCS,
73
- UICKeyChainStoreProtocolTypePOP3S,
74
- };
75
-
76
- typedef NS_ENUM(NSInteger, UICKeyChainStoreAuthenticationType) {
77
- UICKeyChainStoreAuthenticationTypeNTLM = 1,
78
- UICKeyChainStoreAuthenticationTypeMSN,
79
- UICKeyChainStoreAuthenticationTypeDPA,
80
- UICKeyChainStoreAuthenticationTypeRPA,
81
- UICKeyChainStoreAuthenticationTypeHTTPBasic,
82
- UICKeyChainStoreAuthenticationTypeHTTPDigest,
83
- UICKeyChainStoreAuthenticationTypeHTMLForm,
84
- UICKeyChainStoreAuthenticationTypeDefault,
85
- };
86
-
87
- typedef NS_ENUM(NSInteger, UICKeyChainStoreAccessibility) {
88
- UICKeyChainStoreAccessibilityWhenUnlocked = 1,
89
- UICKeyChainStoreAccessibilityAfterFirstUnlock,
90
- UICKeyChainStoreAccessibilityAlways,
91
- UICKeyChainStoreAccessibilityWhenPasscodeSetThisDeviceOnly
92
- __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0),
93
- UICKeyChainStoreAccessibilityWhenUnlockedThisDeviceOnly,
94
- UICKeyChainStoreAccessibilityAfterFirstUnlockThisDeviceOnly,
95
- UICKeyChainStoreAccessibilityAlwaysThisDeviceOnly,
96
- }
97
- __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_4_0);
98
-
99
- typedef NS_ENUM(NSInteger, UICKeyChainStoreAuthenticationPolicy) {
100
- UICKeyChainStoreAuthenticationPolicyUserPresence = kSecAccessControlUserPresence,
101
- };
102
-
103
- @interface UICKeyChainStore : NSObject
104
-
105
- @property (nonatomic, readonly) UICKeyChainStoreItemClass itemClass;
106
-
107
- @property (nonatomic, readonly, nullable) NSString *service;
108
- @property (nonatomic, readonly, nullable) NSString *accessGroup;
109
-
110
- @property (nonatomic, readonly, nullable) NSURL *server;
111
- @property (nonatomic, readonly) UICKeyChainStoreProtocolType protocolType;
112
- @property (nonatomic, readonly) UICKeyChainStoreAuthenticationType authenticationType;
113
-
114
- @property (nonatomic) UICKeyChainStoreAccessibility accessibility;
115
- @property (nonatomic, readonly) UICKeyChainStoreAuthenticationPolicy authenticationPolicy
116
- __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);
117
-
118
- @property (nonatomic) BOOL synchronizable;
119
-
120
- @property (nonatomic, nullable) NSString *authenticationPrompt
121
- __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_8_0);
122
-
123
- @property (nonatomic, readonly, nullable) NSArray UIC_KEY_TYPE *allKeys;
124
- @property (nonatomic, readonly, nullable) NSArray *allItems;
125
-
126
- + (NSString *)defaultService;
127
- + (void)setDefaultService:(NSString *)defaultService;
128
-
129
- + (UICKeyChainStore *)keyChainStore;
130
- + (UICKeyChainStore *)keyChainStoreWithService:(nullable NSString *)service;
131
- + (UICKeyChainStore *)keyChainStoreWithService:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup;
132
-
133
- + (UICKeyChainStore *)keyChainStoreWithServer:(NSURL *)server protocolType:(UICKeyChainStoreProtocolType)protocolType;
134
- + (UICKeyChainStore *)keyChainStoreWithServer:(NSURL *)server protocolType:(UICKeyChainStoreProtocolType)protocolType authenticationType:(UICKeyChainStoreAuthenticationType)authenticationType;
135
-
136
- - (instancetype)init;
137
- - (instancetype)initWithService:(nullable NSString *)service;
138
- - (instancetype)initWithService:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup;
139
-
140
- - (instancetype)initWithServer:(NSURL *)server protocolType:(UICKeyChainStoreProtocolType)protocolType;
141
- - (instancetype)initWithServer:(NSURL *)server protocolType:(UICKeyChainStoreProtocolType)protocolType authenticationType:(UICKeyChainStoreAuthenticationType)authenticationType;
142
-
143
- + (nullable NSString *)stringForKey:(NSString *)key;
144
- + (nullable NSString *)stringForKey:(NSString *)key service:(nullable NSString *)service;
145
- + (nullable NSString *)stringForKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup;
146
- + (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key;
147
- + (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key service:(nullable NSString *)service;
148
- + (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup;
149
-
150
- + (nullable NSData *)dataForKey:(NSString *)key;
151
- + (nullable NSData *)dataForKey:(NSString *)key service:(nullable NSString *)service;
152
- + (nullable NSData *)dataForKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup;
153
- + (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key;
154
- + (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key service:(nullable NSString *)service;
155
- + (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup;
156
-
157
- - (BOOL)contains:(nullable NSString *)key;
158
-
159
- - (BOOL)setString:(nullable NSString *)string forKey:(nullable NSString *)key;
160
- - (BOOL)setString:(nullable NSString *)string forKey:(nullable NSString *)key label:(nullable NSString *)label comment:(nullable NSString *)comment;
161
- - (nullable NSString *)stringForKey:(NSString *)key;
162
-
163
- - (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key;
164
- - (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key label:(nullable NSString *)label comment:(nullable NSString *)comment;
165
- - (nullable NSData *)dataForKey:(NSString *)key;
166
-
167
- + (BOOL)removeItemForKey:(NSString *)key;
168
- + (BOOL)removeItemForKey:(NSString *)key service:(nullable NSString *)service;
169
- + (BOOL)removeItemForKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup;
170
-
171
- + (BOOL)removeAllItems;
172
- + (BOOL)removeAllItemsForService:(nullable NSString *)service;
173
- + (BOOL)removeAllItemsForService:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup;
174
-
175
- - (BOOL)removeItemForKey:(NSString *)key;
176
-
177
- - (BOOL)removeAllItems;
178
-
179
- - (nullable NSString *)objectForKeyedSubscript:(NSString<NSCopying> *)key;
180
- - (void)setObject:(nullable NSString *)obj forKeyedSubscript:(NSString<NSCopying> *)key;
181
-
182
- + (nullable NSArray UIC_KEY_TYPE *)allKeysWithItemClass:(UICKeyChainStoreItemClass)itemClass;
183
- - (nullable NSArray UIC_KEY_TYPE *)allKeys;
184
-
185
- + (nullable NSArray *)allItemsWithItemClass:(UICKeyChainStoreItemClass)itemClass;
186
- - (nullable NSArray *)allItems;
187
-
188
- - (void)setAccessibility:(UICKeyChainStoreAccessibility)accessibility authenticationPolicy:(UICKeyChainStoreAuthenticationPolicy)authenticationPolicy
189
- __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0);
190
-
191
- #if TARGET_OS_IOS
192
- - (void)sharedPasswordWithCompletion:(nullable void (^)(NSString * __nullable account, NSString * __nullable password, NSError * __nullable error))completion;
193
- - (void)sharedPasswordForAccount:(NSString *)account completion:(nullable void (^)(NSString * __nullable password, NSError * __nullable error))completion;
194
-
195
- - (void)setSharedPassword:(nullable NSString *)password forAccount:(NSString *)account completion:(nullable void (^)(NSError * __nullable error))completion;
196
- - (void)removeSharedPasswordForAccount:(NSString *)account completion:(nullable void (^)(NSError * __nullable error))completion;
197
-
198
- + (void)requestSharedWebCredentialWithCompletion:(nullable void (^)(NSArray UIC_CREDENTIAL_TYPE *credentials, NSError * __nullable error))completion;
199
- + (void)requestSharedWebCredentialForDomain:(nullable NSString *)domain account:(nullable NSString *)account completion:(nullable void (^)(NSArray UIC_CREDENTIAL_TYPE *credentials, NSError * __nullable error))completion;
200
-
201
- + (NSString *)generatePassword;
202
- #endif
203
-
204
- @end
205
-
206
- @interface UICKeyChainStore (ErrorHandling)
207
-
208
- + (nullable NSString *)stringForKey:(NSString *)key error:(NSError * __nullable __autoreleasing * __nullable)error;
209
- + (nullable NSString *)stringForKey:(NSString *)key service:(nullable NSString *)service error:(NSError * __nullable __autoreleasing * __nullable)error;
210
- + (nullable NSString *)stringForKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup error:(NSError * __nullable __autoreleasing * __nullable)error;
211
-
212
- + (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key error:(NSError * __nullable __autoreleasing * __nullable)error;
213
- + (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key service:(nullable NSString *)service error:(NSError * __nullable __autoreleasing * __nullable)error;
214
- + (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup error:(NSError * __nullable __autoreleasing * __nullable)error;
215
-
216
- + (nullable NSData *)dataForKey:(NSString *)key error:(NSError * __nullable __autoreleasing * __nullable)error;
217
- + (nullable NSData *)dataForKey:(NSString *)key service:(nullable NSString *)service error:(NSError * __nullable __autoreleasing * __nullable)error;
218
- + (nullable NSData *)dataForKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup error:(NSError * __nullable __autoreleasing * __nullable)error;
219
-
220
- + (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key error:(NSError * __nullable __autoreleasing * __nullable)error;
221
- + (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key service:(nullable NSString *)service error:(NSError * __nullable __autoreleasing * __nullable)error;
222
- + (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup error:(NSError * __nullable __autoreleasing * __nullable)error;
223
-
224
- - (BOOL)setString:(nullable NSString *)string forKey:(NSString * )key error:(NSError * __nullable __autoreleasing * __nullable)error;
225
- - (BOOL)setString:(nullable NSString *)string forKey:(NSString * )key label:(nullable NSString *)label comment:(nullable NSString *)comment error:(NSError * __nullable __autoreleasing * __nullable)error;
226
-
227
- - (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key error:(NSError * __nullable __autoreleasing * __nullable)error;
228
- - (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key label:(nullable NSString *)label comment:(nullable NSString *)comment error:(NSError * __nullable __autoreleasing * __nullable)error;
229
-
230
- - (nullable NSString *)stringForKey:(NSString *)key error:(NSError * __nullable __autoreleasing * __nullable)error;
231
- - (nullable NSData *)dataForKey:(NSString *)key error:(NSError * __nullable __autoreleasing * __nullable)error;
232
-
233
- + (BOOL)removeItemForKey:(NSString *)key error:(NSError * __nullable __autoreleasing * __nullable)error;
234
- + (BOOL)removeItemForKey:(NSString *)key service:(nullable NSString *)service error:(NSError * __nullable __autoreleasing * __nullable)error;
235
- + (BOOL)removeItemForKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup error:(NSError * __nullable __autoreleasing * __nullable)error;
236
-
237
- + (BOOL)removeAllItemsWithError:(NSError * __nullable __autoreleasing * __nullable)error;
238
- + (BOOL)removeAllItemsForService:(nullable NSString *)service error:(NSError * __nullable __autoreleasing * __nullable)error;
239
- + (BOOL)removeAllItemsForService:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup error:(NSError * __nullable __autoreleasing * __nullable)error;
240
-
241
- - (BOOL)removeItemForKey:(NSString *)key error:(NSError * __nullable __autoreleasing * __nullable)error;
242
- - (BOOL)removeAllItemsWithError:(NSError * __nullable __autoreleasing * __nullable)error;
243
-
244
- @end
245
-
246
- @interface UICKeyChainStore (ForwardCompatibility)
247
-
248
- + (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key genericAttribute:(nullable id)genericAttribute;
249
- + (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key genericAttribute:(nullable id)genericAttribute error:(NSError * __nullable __autoreleasing * __nullable)error;
250
-
251
- + (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key service:(nullable NSString *)service genericAttribute:(nullable id)genericAttribute;
252
- + (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key service:(nullable NSString *)service genericAttribute:(nullable id)genericAttribute error:(NSError * __nullable __autoreleasing * __nullable)error;
253
-
254
- + (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup genericAttribute:(nullable id)genericAttribute;
255
- + (BOOL)setString:(nullable NSString *)value forKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup genericAttribute:(nullable id)genericAttribute error:(NSError * __nullable __autoreleasing * __nullable)error;
256
-
257
- + (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key genericAttribute:(nullable id)genericAttribute;
258
- + (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key genericAttribute:(nullable id)genericAttribute error:(NSError * __nullable __autoreleasing * __nullable)error;
259
-
260
- + (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key service:(nullable NSString *)service genericAttribute:(nullable id)genericAttribute;
261
- + (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key service:(nullable NSString *)service genericAttribute:(nullable id)genericAttribute error:(NSError * __nullable __autoreleasing * __nullable)error;
262
-
263
- + (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup genericAttribute:(nullable id)genericAttribute;
264
- + (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key service:(nullable NSString *)service accessGroup:(nullable NSString *)accessGroup genericAttribute:(nullable id)genericAttribute error:(NSError * __nullable __autoreleasing * __nullable)error;
265
-
266
- - (BOOL)setString:(nullable NSString *)string forKey:(NSString *)key genericAttribute:(nullable id)genericAttribute;
267
- - (BOOL)setString:(nullable NSString *)string forKey:(NSString *)key genericAttribute:(nullable id)genericAttribute error:(NSError * __nullable __autoreleasing * __nullable)error;
268
-
269
- - (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key genericAttribute:(nullable id)genericAttribute;
270
- - (BOOL)setData:(nullable NSData *)data forKey:(NSString *)key genericAttribute:(nullable id)genericAttribute error:(NSError * __nullable __autoreleasing * __nullable)error;
271
-
272
- @end
273
-
274
- @interface UICKeyChainStore (Deprecation)
275
-
276
- - (void)synchronize __attribute__((deprecated("calling this method is no longer required")));
277
- - (BOOL)synchronizeWithError:(NSError * __nullable __autoreleasing * __nullable)error __attribute__((deprecated("calling this method is no longer required")));
278
-
279
- @end
280
-
281
- NS_ASSUME_NONNULL_END