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.
- package/CHANGELOG.md +6 -0
- package/Editor/AmaGDKEditor.cs +91 -46
- package/Editor/AmaGDKManager.cs +26 -27
- package/Editor/Utils/AmaGDKEditor.ExtractVersion.cs +133 -103
- package/Editor/Utils/AmaGDKEditor.GUI.cs +54 -51
- package/Editor/Utils/AmaGDKEditor.Utils.cs +2 -3
- package/Packages/AmaGDKConfig.unitypackage +0 -0
- package/Packages/AmaGDKExample.unitypackage +0 -0
- package/Packages/AmaGDKTest.unitypackage +0 -0
- package/Packages/AmaPassport.ATTSupport.unitypackage +0 -0
- package/{Samples~/Example/AmaGDKExample.unity.meta → Packages/AmaPassport.ATTSupport.unitypackage.meta} +1 -1
- package/Packages/AmaPassport.AdvertisingID.unitypackage +0 -0
- package/{Sample~/Example/AmaGDKExample.unity.meta → Packages/AmaPassport.AdvertisingID.unitypackage.meta} +1 -1
- 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/{Runtime/AmaPassport/Plugins.meta → Packages/FirebaseRemoteConfigAdapter_v9.1.0.unitypackage.meta} +1 -2
- package/Packages/IronsourceAdapter_v7.2.6.unitypackage +0 -0
- package/Runtime/AmaGDK.Adapters.cs +30 -12
- package/Runtime/AmaGDK.Ads.cs +520 -162
- package/Runtime/{AmaPassport/AmaGDK.AmaPassport.cs → AmaGDK.AmaPassport.cs} +36 -47
- package/Runtime/{AmaPassport/AmaGDK.AmaPassport.cs.meta → AmaGDK.AmaPassport.cs.meta} +1 -1
- package/Runtime/AmaGDK.Analytics.cs +78 -89
- package/Runtime/AmaGDK.Config.cs +23 -19
- package/Runtime/AmaGDK.Internal.SemVer.cs +11 -29
- package/Runtime/AmaGDK.Internal.cs +17 -11
- package/Runtime/AmaGDK.RemoteConfig.cs +352 -0
- package/Runtime/{AmaPassport/Plugins/Android/AdvertisingIdFetcher.cs.meta → AmaGDK.RemoteConfig.cs.meta} +1 -1
- package/Runtime/AmaGDK.UserProfile.cs +5 -8
- package/Runtime/AmaGDK.Utils.cs +79 -60
- package/Runtime/AmaGDK.WebUtils.cs +45 -48
- package/Runtime/AmaGDK.cs +74 -22
- package/Runtime/AssemblyInfo.cs +0 -1
- package/package.json +1 -1
- package/Packages/AppsflyerAdapter_v6.5.4.unitypackage +0 -0
- package/Runtime/AmaPassport/Plugins/Android/AdvertisingIdCallback.java +0 -7
- package/Runtime/AmaPassport/Plugins/Android/AdvertisingIdCallback.java.meta +0 -32
- package/Runtime/AmaPassport/Plugins/Android/AdvertisingIdFetcher.cs +0 -96
- package/Runtime/AmaPassport/Plugins/Android/AdvertisingIdFetcher.java +0 -79
- package/Runtime/AmaPassport/Plugins/Android/AdvertisingIdFetcher.java.meta +0 -32
- package/Runtime/AmaPassport/Plugins/Android.meta +0 -8
- package/Runtime/AmaPassport/Plugins/iOS/KeyChain.cs +0 -59
- package/Runtime/AmaPassport/Plugins/iOS/KeyChain.cs.meta +0 -11
- package/Runtime/AmaPassport/Plugins/iOS/KeyChainPlugin.mm +0 -52
- package/Runtime/AmaPassport/Plugins/iOS/KeyChainPlugin.mm.meta +0 -33
- package/Runtime/AmaPassport/Plugins/iOS/UICKeyChainStore.h +0 -281
- package/Runtime/AmaPassport/Plugins/iOS/UICKeyChainStore.h.meta +0 -33
- package/Runtime/AmaPassport/Plugins/iOS/UICKeyChainStore.m +0 -1393
- package/Runtime/AmaPassport/Plugins/iOS/UICKeyChainStore.m.meta +0 -33
- package/Runtime/AmaPassport/Plugins/iOS.meta +0 -8
- package/Runtime/AmaPassport.meta +0 -8
- package/Samples~/Example/AmaGDKExample.cs +0 -87
- package/Samples~/Example/AmaGDKExample.cs.meta +0 -11
- package/Samples~/Example/AmaGDKExample.unity +0 -3114
- package/Sample~/Example/AmaGDKExample.cs +0 -87
- package/Sample~/Example/AmaGDKExample.cs.meta +0 -11
- package/Sample~/Example/AmaGDKExample.unity +0 -3114
- /package/Packages/{AppsflyerAdapter_v6.5.4.unitypackage.meta → AppsFlyerAdapter_v6.5.4.unitypackage.meta} +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
using System;
|
|
2
2
|
using System.Collections.Generic;
|
|
3
|
-
|
|
4
|
-
using static Amanotes.Core.Internal.Logging;
|
|
5
3
|
using System.Linq;
|
|
4
|
+
using static Amanotes.Core.Internal.Logging;
|
|
6
5
|
|
|
7
6
|
namespace Amanotes.Core.Internal
|
|
8
7
|
{
|
|
@@ -14,7 +13,7 @@ namespace Amanotes.Core.Internal
|
|
|
14
13
|
|
|
15
14
|
// Status support
|
|
16
15
|
public Status status = Status.None;
|
|
17
|
-
public bool IsReady
|
|
16
|
+
public bool IsReady => status == Status.Ready;
|
|
18
17
|
|
|
19
18
|
public void Init()
|
|
20
19
|
{
|
|
@@ -25,7 +24,7 @@ namespace Amanotes.Core.Internal
|
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
status = Status.Initialize;
|
|
28
|
-
Init(
|
|
27
|
+
Init(success =>
|
|
29
28
|
{
|
|
30
29
|
status = success ? Status.Ready : Status.Failed;
|
|
31
30
|
});
|
|
@@ -53,18 +52,18 @@ namespace Amanotes.Core.Internal
|
|
|
53
52
|
return;
|
|
54
53
|
}
|
|
55
54
|
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
T adapter = createFunc(AmaGDK.Config);
|
|
56
|
+
InitOrder orderConfig = AmaGDK.Config.initOrder.FirstOrDefault(item => item.id == adapter.adapterId);
|
|
58
57
|
if (orderConfig != null) adapter.initOrder = orderConfig.order;
|
|
59
58
|
listAdapters.Add(adapter);
|
|
60
59
|
}
|
|
61
|
-
|
|
60
|
+
|
|
62
61
|
public static AdapterContext Find<T>()
|
|
63
62
|
{
|
|
64
63
|
for (var i = 0; i < listAdapters.Count; i++)
|
|
65
64
|
{
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
AdapterContext item = listAdapters[i];
|
|
66
|
+
Type itemType = item.GetType();
|
|
68
67
|
if (!typeof(T).IsAssignableFrom(itemType)) continue;
|
|
69
68
|
return item;
|
|
70
69
|
}
|
|
@@ -77,8 +76,8 @@ namespace Amanotes.Core.Internal
|
|
|
77
76
|
var result = new List<AdapterContext>();
|
|
78
77
|
for (var i = 0; i < listAdapters.Count; i++)
|
|
79
78
|
{
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
AdapterContext item = listAdapters[i];
|
|
80
|
+
Type itemType = item.GetType();
|
|
82
81
|
if (!typeof(T).IsAssignableFrom(itemType)) continue;
|
|
83
82
|
result.Add(item);
|
|
84
83
|
}
|
|
@@ -86,9 +85,28 @@ namespace Amanotes.Core.Internal
|
|
|
86
85
|
return result;
|
|
87
86
|
}
|
|
88
87
|
|
|
88
|
+
public static T GetSingleAdapter<T>() where T : class
|
|
89
|
+
{
|
|
90
|
+
List<AdapterContext> adapters = FindAll<T>();
|
|
91
|
+
|
|
92
|
+
if (adapters == null || adapters.Count < 1)
|
|
93
|
+
{
|
|
94
|
+
LogError($"Not found adapter for <{nameof(T)}>!");
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (adapters.Count > 1)
|
|
99
|
+
{
|
|
100
|
+
LogError($"Multiple adapters detected. <{nameof(T)}> supports only one adapter!");
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return adapters[0].GetAdapterApi<T>();
|
|
105
|
+
}
|
|
106
|
+
|
|
89
107
|
public static T GetConfig<T>() where T : ConfigAsset
|
|
90
108
|
{
|
|
91
109
|
return (T)AmaGDK.Config;
|
|
92
110
|
}
|
|
93
111
|
}
|
|
94
|
-
}
|
|
112
|
+
}
|