com.amanotes.gdk 0.1.21 → 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 (32) hide show
  1. package/CHANGELOG.md +5 -5
  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/Packages/AmaPassport.ATTSupport.unitypackage.meta +7 -0
  12. package/Packages/AmaPassport.AdvertisingID.unitypackage +0 -0
  13. package/Packages/AmaPassport.AdvertisingID.unitypackage.meta +7 -0
  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/Packages/FirebaseRemoteConfigAdapter_v9.1.0.unitypackage.meta +1 -1
  18. package/Runtime/AmaGDK.Adapters.cs +13 -14
  19. package/Runtime/AmaGDK.Ads.cs +523 -151
  20. package/Runtime/AmaGDK.AmaPassport.cs +433 -0
  21. package/Runtime/AmaGDK.AmaPassport.cs.meta +11 -0
  22. package/Runtime/AmaGDK.Analytics.cs +78 -89
  23. package/Runtime/AmaGDK.Config.cs +23 -19
  24. package/Runtime/AmaGDK.Internal.SemVer.cs +11 -29
  25. package/Runtime/AmaGDK.Internal.cs +16 -10
  26. package/Runtime/AmaGDK.RemoteConfig.cs +32 -23
  27. package/Runtime/AmaGDK.UserProfile.cs +5 -8
  28. package/Runtime/AmaGDK.Utils.cs +40 -50
  29. package/Runtime/AmaGDK.WebUtils.cs +42 -42
  30. package/Runtime/AmaGDK.cs +70 -20
  31. package/Runtime/AssemblyInfo.cs +0 -1
  32. package/package.json +1 -1
@@ -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 { get { return status == Status.Ready; } }
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((success) =>
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
- var adapter = createFunc(AmaGDK.Config);
57
- var orderConfig = AmaGDK.Config.initOrder.FirstOrDefault(item => item.id == adapter.adapterId);
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
- var item = listAdapters[i];
67
- var itemType = item.GetType();
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
- var item = listAdapters[i];
81
- var itemType = item.GetType();
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,9 @@ namespace Amanotes.Core.Internal
86
85
  return result;
87
86
  }
88
87
 
89
- public static T GetSingleAdapter<T>() where T: class
88
+ public static T GetSingleAdapter<T>() where T : class
90
89
  {
91
- var adapters = Adapter.FindAll<T>();
90
+ List<AdapterContext> adapters = FindAll<T>();
92
91
 
93
92
  if (adapters == null || adapters.Count < 1)
94
93
  {
@@ -110,4 +109,4 @@ namespace Amanotes.Core.Internal
110
109
  return (T)AmaGDK.Config;
111
110
  }
112
111
  }
113
- }
112
+ }