com.amanotes.gdk 0.2.16 → 0.2.18
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.
- package/CHANGELOG.md +7 -0
- package/Editor/MatchSDKVersion.cs +1 -4
- package/Editor/UserProfile.PostBuild.cs +72 -0
- package/{Runtime/AmaGDK.AmaPassport.cs.meta → Editor/UserProfile.PostBuild.cs.meta} +1 -1
- package/Editor/UserProfileDependencies.xml +5 -0
- package/Editor/UserProfileDependencies.xml.meta +7 -0
- package/Extra/AmaGDKInstaller.unitypackage +0 -0
- package/Extra/AmaGDKProject.unitypackage +0 -0
- package/Packages/AmaGDKConfig.unitypackage +0 -0
- package/Packages/AmaGDKConfig.unitypackage.meta +0 -1
- package/Packages/AmaGDKExample.unitypackage +0 -0
- package/Packages/AmaGDKTest.unitypackage +0 -0
- package/Packages/AppsFlyerAdapter_v6.5.4.unitypackage +0 -0
- package/Packages/FirebaseAnalyticsAdapter_v9.1.0.unitypackage +0 -0
- package/Packages/FirebaseRemoteConfigAdapter_v9.1.0.unitypackage +0 -0
- package/Packages/IronSourceAdapter_v7.2.6.unitypackage +0 -0
- package/Packages/RevenueCatAdapter_v5.1.3.unitypackage +0 -0
- package/Packages/{AmaPassport.ATTSupport.unitypackage.meta → RevenueCatAdapter_v5.1.3.unitypackage.meta} +1 -1
- package/Runtime/AmaGDK.IAP.cs +83 -30
- package/Runtime/AmaGDK.UserProfile.cs +95 -2
- package/Runtime/AmaGDK.cs +2 -2
- package/Runtime/UserProfile/Plugins/Android/AdvertisingIdCallback.java +7 -0
- package/Runtime/UserProfile/Plugins/Android/AdvertisingIdCallback.java.meta +32 -0
- package/Runtime/UserProfile/Plugins/Android/AdvertisingIdFetcher.cs +57 -0
- package/Runtime/UserProfile/Plugins/Android/AdvertisingIdFetcher.cs.meta +11 -0
- package/Runtime/UserProfile/Plugins/Android/AdvertisingIdFetcher.java +79 -0
- package/Runtime/UserProfile/Plugins/Android/AdvertisingIdFetcher.java.meta +32 -0
- package/Runtime/UserProfile/Plugins/Android.meta +8 -0
- package/Runtime/UserProfile/Plugins/iOS/KeyChain.cs +53 -0
- package/Runtime/UserProfile/Plugins/iOS/KeyChain.cs.meta +11 -0
- package/Runtime/UserProfile/Plugins/iOS/KeyChainPlugin.mm +52 -0
- package/Runtime/UserProfile/Plugins/iOS/KeyChainPlugin.mm.meta +33 -0
- package/Runtime/UserProfile/Plugins/iOS/UICKeyChainStore.h +281 -0
- package/Runtime/UserProfile/Plugins/iOS/UICKeyChainStore.h.meta +33 -0
- package/Runtime/UserProfile/Plugins/iOS/UICKeyChainStore.m +1393 -0
- package/Runtime/UserProfile/Plugins/iOS/UICKeyChainStore.m.meta +33 -0
- package/Runtime/UserProfile/Plugins/iOS.meta +8 -0
- package/Runtime/UserProfile/Plugins.meta +8 -0
- package/{Packages/AmaPassportAdapter_v1.0.0.unitypackage.meta → Runtime/UserProfile.meta} +2 -1
- package/package.json +1 -1
- package/Packages/AmaPassport.ATTSupport.unitypackage +0 -0
- package/Packages/AmaPassportAdapter_v1.0.0.unitypackage +0 -0
- package/Packages/IronsourceAdapter_v7.2.6.unitypackage +0 -0
- package/Runtime/AmaGDK.AmaPassport.cs +0 -440
- /package/Packages/{IronsourceAdapter_v7.2.6.unitypackage.meta → IronSourceAdapter_v7.2.6.unitypackage.meta} +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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:
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
using UnityEngine;
|
|
2
|
+
using System.Runtime.InteropServices;
|
|
3
|
+
|
|
4
|
+
namespace Amanotes.Core
|
|
5
|
+
{
|
|
6
|
+
internal class KeyChain
|
|
7
|
+
{
|
|
8
|
+
|
|
9
|
+
#if UNITY_IOS && !UNITY_EDITOR
|
|
10
|
+
|
|
11
|
+
[DllImport("__Internal")]
|
|
12
|
+
private static extern string getKeyChain(string key);
|
|
13
|
+
|
|
14
|
+
public static string GetKeyChain(string key)
|
|
15
|
+
{
|
|
16
|
+
return getKeyChain(key);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
[DllImport("__Internal")]
|
|
20
|
+
private static extern void setKeyChain(string key, string value);
|
|
21
|
+
|
|
22
|
+
public static void SetKeyChain(string key, string value)
|
|
23
|
+
{
|
|
24
|
+
setKeyChain(key, value);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
[DllImport("__Internal")]
|
|
28
|
+
private static extern void deleteKeyChain(string key);
|
|
29
|
+
|
|
30
|
+
public static void DeleteKeyChain(string key)
|
|
31
|
+
{
|
|
32
|
+
deleteKeyChain(key);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
#else
|
|
36
|
+
public static string GetKeyChain(string key)
|
|
37
|
+
{
|
|
38
|
+
Debug.LogWarning("[Keychain] Not support platform");
|
|
39
|
+
return "";
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
public static void SetKeyChain(string key, string value)
|
|
43
|
+
{
|
|
44
|
+
Debug.LogWarning("[Keychain] Not support platform");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public static void DeleteKeyChain(string key)
|
|
48
|
+
{
|
|
49
|
+
Debug.LogWarning("[Keychain] Not support platform");
|
|
50
|
+
}
|
|
51
|
+
#endif
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
|
@@ -0,0 +1,33 @@
|
|
|
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:
|
|
@@ -0,0 +1,281 @@
|
|
|
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
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: 7291a238b08894fa79de7f980fecf05e
|
|
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:
|