com.amanotes.gdk 0.2.78 → 0.2.80
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 +9 -0
- package/Extra/AmaGDKInstaller.unitypackage +0 -0
- package/Extra/AutoEventQC.unitypackage +0 -0
- package/Extra/CheckDiskSpace.unitypackage +0 -0
- package/Extra/Consent.unitypackage +0 -0
- package/Extra/CrashlyticHook.unitypackage +0 -0
- package/Extra/{SDKVersionTracking.unitypackage.meta → CrashlyticHook.unitypackage.meta} +1 -1
- package/Extra/ForceUpdate.unitypackage +0 -0
- package/Extra/LegacyGDKUpdateHelper.unitypackage +0 -0
- package/Extra/PostProcessor.unitypackage +0 -0
- package/Packages/AmaGDKConfig.unitypackage +0 -0
- package/Packages/AmaGDKExample.unitypackage +0 -0
- package/Packages/AmaGDKTest.unitypackage +0 -0
- package/Packages/AppsFlyerAdapter.PurchaseConnector.unitypackage +0 -0
- package/Packages/AppsFlyerAdapter.unitypackage +0 -0
- package/Packages/FirebaseAnalyticsAdapter.unitypackage +0 -0
- package/Packages/FirebaseRemoteConfigAdapter.unitypackage +0 -0
- package/Packages/IronSourceAdapter.AdQuality.unitypackage +0 -0
- package/Packages/IronSourceAdapter.unitypackage +0 -0
- package/Packages/MaxAdNetworkAdapter.unitypackage +0 -0
- package/Packages/RevenueCatAdapter.unitypackage +0 -0
- package/Packages/SqliteAnalyticsAdapter.unitypackage +0 -0
- package/Runtime/AmaGDK.IAP.cs +87 -3
- package/Runtime/AmaGDK.cs +1 -1
- package/package.json +1 -1
- package/Extra/SDKVersionTracking.unitypackage +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.80] - 2024-11-13
|
|
4
|
+
- [Dev] Don't use obsolete functions
|
|
5
|
+
- [Dev] Add CrashlyticHook
|
|
6
|
+
|
|
7
|
+
## [0.2.79] - 2024-11-13
|
|
8
|
+
- [Dev] Add callbacks for IAP module
|
|
9
|
+
- [Fix] Return empty collections instead of null in RevenueCatAdapter
|
|
10
|
+
- [GameOps] Remove durationInSecs
|
|
11
|
+
|
|
3
12
|
## [0.2.78] - 2024-11-11
|
|
4
13
|
- [Dev] Add iOS and Android ad unit configuration for MAX
|
|
5
14
|
- [Dev] Track Adapters and Third-party packages used in games
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/Runtime/AmaGDK.IAP.cs
CHANGED
|
@@ -23,6 +23,58 @@ namespace Amanotes.Core
|
|
|
23
23
|
public static readonly Dictionary<string, ProductInfo> AllProducts = new Dictionary<string, ProductInfo>();
|
|
24
24
|
private const string DATE_FORMAT = "yyyy/MM/yy HH:mm:ss";
|
|
25
25
|
|
|
26
|
+
public static void SetCallback_OnModuleReady(Action onReady)
|
|
27
|
+
{
|
|
28
|
+
if (onReady == null) return;
|
|
29
|
+
|
|
30
|
+
if (IsModuleReady)
|
|
31
|
+
{
|
|
32
|
+
onReady();
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
_onModuleReady -= onReady;
|
|
37
|
+
_onModuleReady += onReady;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
public static void SetCallback_OnGetProductsComplete(Action onComplete)
|
|
41
|
+
{
|
|
42
|
+
if (onComplete == null) return;
|
|
43
|
+
|
|
44
|
+
if (isGetProductComplete)
|
|
45
|
+
{
|
|
46
|
+
onComplete();
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
_onGetProductsComplete -= onComplete;
|
|
51
|
+
_onGetProductsComplete += onComplete;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
public static void SetCallback_OnGetCustomerInfoComplete(Action onComplete)
|
|
55
|
+
{
|
|
56
|
+
if (onComplete == null) return;
|
|
57
|
+
|
|
58
|
+
if (isGetCustomerInfoComplete)
|
|
59
|
+
{
|
|
60
|
+
onComplete();
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
_onGetCustomerInfoComplete -= onComplete;
|
|
65
|
+
_onGetCustomerInfoComplete += onComplete;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
public static void SyncCustomerInfo(Action<bool> onComplete = null)
|
|
69
|
+
{
|
|
70
|
+
if (_adapter == null)
|
|
71
|
+
{
|
|
72
|
+
onComplete?.Invoke(false);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
_adapter.SyncCustomerInfo(onComplete);
|
|
76
|
+
}
|
|
77
|
+
|
|
26
78
|
public static ISetupBuilder GetProducts(bool appendExistingList = false)
|
|
27
79
|
{
|
|
28
80
|
if (!appendExistingList)
|
|
@@ -129,6 +181,13 @@ namespace Amanotes.Core
|
|
|
129
181
|
}
|
|
130
182
|
}
|
|
131
183
|
|
|
184
|
+
private static bool isGetProductComplete;
|
|
185
|
+
private static bool isGetCustomerInfoComplete;
|
|
186
|
+
private static bool IsModuleReady => isGetProductComplete && isGetCustomerInfoComplete;
|
|
187
|
+
private static Action _onGetProductsComplete;
|
|
188
|
+
private static Action _onGetCustomerInfoComplete;
|
|
189
|
+
private static Action _onModuleReady;
|
|
190
|
+
|
|
132
191
|
internal static bool InitModule()
|
|
133
192
|
{
|
|
134
193
|
_adapter = Adapter2.GetAdapter<IAPAdapter>();
|
|
@@ -140,8 +199,31 @@ namespace Amanotes.Core
|
|
|
140
199
|
internal static void StartModule()
|
|
141
200
|
{
|
|
142
201
|
if (_adapter == null) return;
|
|
202
|
+
_adapter.SyncCustomerInfo(
|
|
203
|
+
success =>
|
|
204
|
+
{
|
|
205
|
+
isGetCustomerInfoComplete = true;
|
|
206
|
+
GDKUtils.SafeInvokeAndClear(ref _onGetCustomerInfoComplete);
|
|
207
|
+
if (IsModuleReady) GDKUtils.SafeInvokeAndClear(ref _onModuleReady);
|
|
208
|
+
});
|
|
143
209
|
localData.Sync();
|
|
144
|
-
if (Config.iap.autoGetProducts)
|
|
210
|
+
if (Config.iap.autoGetProducts)
|
|
211
|
+
{
|
|
212
|
+
GetProducts()
|
|
213
|
+
.OnSuccess(_ => OnGetProductsComplete())
|
|
214
|
+
.OnFail(_ => OnGetProductsComplete());
|
|
215
|
+
}
|
|
216
|
+
else
|
|
217
|
+
{
|
|
218
|
+
OnGetProductsComplete();
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
private static void OnGetProductsComplete()
|
|
223
|
+
{
|
|
224
|
+
isGetProductComplete = true;
|
|
225
|
+
GDKUtils.SafeInvokeAndClear(ref _onGetProductsComplete);
|
|
226
|
+
if (IsModuleReady) GDKUtils.SafeInvokeAndClear(ref _onModuleReady);
|
|
145
227
|
}
|
|
146
228
|
}
|
|
147
229
|
|
|
@@ -442,6 +524,7 @@ namespace Amanotes.Core.Internal
|
|
|
442
524
|
if (ls == null || ls.Count == 0)
|
|
443
525
|
{
|
|
444
526
|
LogWarning("There is no IAP product");
|
|
527
|
+
onSuccess?.Invoke(AllProducts);
|
|
445
528
|
return;
|
|
446
529
|
}
|
|
447
530
|
|
|
@@ -506,8 +589,7 @@ namespace Amanotes.Core.Internal
|
|
|
506
589
|
{
|
|
507
590
|
foreach (var p in pList)
|
|
508
591
|
{
|
|
509
|
-
|
|
510
|
-
else AllProducts.Add(p.id, p);
|
|
592
|
+
AllProducts[p.id] = p;
|
|
511
593
|
}
|
|
512
594
|
GDKUtils.DelayCall(0f, GetNextProductsInQueue);
|
|
513
595
|
}, error => onFail?.Invoke(error));
|
|
@@ -573,5 +655,7 @@ namespace Amanotes.Core.Internal
|
|
|
573
655
|
public abstract DateTime? GetUnsubscribedDate();
|
|
574
656
|
public abstract HashSet<PurchaseRecord> GetPurchaseHistory();
|
|
575
657
|
public abstract DateTime? GetLastPurchaseDate(string productAndPlanId);
|
|
658
|
+
|
|
659
|
+
public abstract void SyncCustomerInfo(Action<bool> onComplete = null);
|
|
576
660
|
}
|
|
577
661
|
}
|
package/Runtime/AmaGDK.cs
CHANGED
|
@@ -27,7 +27,7 @@ namespace Amanotes.Core
|
|
|
27
27
|
{
|
|
28
28
|
public partial class AmaGDK : MonoBehaviour
|
|
29
29
|
{
|
|
30
|
-
public const string VERSION = "0.2.
|
|
30
|
+
public const string VERSION = "0.2.80";
|
|
31
31
|
|
|
32
32
|
internal static Status _status = Status.None;
|
|
33
33
|
private static ConfigAsset _config = null;
|
package/package.json
CHANGED
|
Binary file
|