com.amanotes.gdk 0.2.81-a3 → 0.2.81-a4
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 +1 -1
- package/Editor/Extra/GDKPostBuildAsset.cs +64 -30
- package/Runtime/AmaGDK.cs +1 -1
- package/package.json +1 -1
- package/Runtime/GDKAudio/Plugins.meta +0 -8
- package/Runtime/GDKAudio.meta +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
using System;
|
|
1
2
|
using UnityEngine;
|
|
2
3
|
using UnityEditor;
|
|
3
4
|
|
|
@@ -27,16 +28,27 @@ namespace Amanotes.Editor
|
|
|
27
28
|
[System.Serializable]
|
|
28
29
|
public class PodFramework
|
|
29
30
|
{
|
|
30
|
-
public string
|
|
31
|
+
public string podFrameworkName;
|
|
31
32
|
public bool enable;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
[System.Serializable]
|
|
35
|
-
public class
|
|
36
|
+
public class PlistEntry
|
|
36
37
|
{
|
|
38
|
+
public enum PlistValueType
|
|
39
|
+
{
|
|
40
|
+
String,
|
|
41
|
+
Boolean,
|
|
42
|
+
Integer,
|
|
43
|
+
Real,
|
|
44
|
+
Array,
|
|
45
|
+
Dictionary,
|
|
46
|
+
Date
|
|
47
|
+
}
|
|
48
|
+
|
|
37
49
|
public string key;
|
|
38
50
|
public string value;
|
|
39
|
-
public
|
|
51
|
+
public PlistValueType type;
|
|
40
52
|
public bool enable;
|
|
41
53
|
}
|
|
42
54
|
|
|
@@ -75,19 +87,23 @@ namespace Amanotes.Editor
|
|
|
75
87
|
[Header("Pod Frameworks to Add")]
|
|
76
88
|
public List<PodFramework> podFrameworks = new List<PodFramework>
|
|
77
89
|
{
|
|
78
|
-
new PodFramework {
|
|
79
|
-
new PodFramework {
|
|
90
|
+
new PodFramework { podFrameworkName = "AppLovinSDK", enable = true },
|
|
91
|
+
new PodFramework { podFrameworkName = "InMobiSDK", enable = true }
|
|
80
92
|
};
|
|
81
93
|
|
|
82
|
-
[Header("Info.plist
|
|
83
|
-
public List<
|
|
94
|
+
[Header("Info.plist Entries to Add")]
|
|
95
|
+
public List<PlistEntry> plistKeys = new List<PlistEntry>
|
|
84
96
|
{
|
|
85
|
-
new
|
|
86
|
-
new
|
|
87
|
-
new
|
|
88
|
-
new
|
|
89
|
-
new
|
|
90
|
-
new
|
|
97
|
+
new PlistEntry { key = "NSCalendarsUsageDescription", value = "App requires calendar access.", type = PlistEntry.PlistValueType.String, enable = true },
|
|
98
|
+
new PlistEntry { key = "NSCameraUsageDescription", value = "App requires camera access.", type = PlistEntry.PlistValueType.String, enable = true },
|
|
99
|
+
new PlistEntry { key = "NSPhotoLibraryUsageDescription", value = "App requires photo library access.", type = PlistEntry.PlistValueType.String, enable = true },
|
|
100
|
+
new PlistEntry { key = "NSMotionUsageDescription", value = "App requires motion control.", type = PlistEntry.PlistValueType.String, enable = true },
|
|
101
|
+
new PlistEntry { key = "NSLocationWhenInUseUsageDescription", value = "App requires location access.", type = PlistEntry.PlistValueType.String, enable = true },
|
|
102
|
+
new PlistEntry { key = "NSUserTrackingUsageDescription", value = "App requires user tracking permission.", type = PlistEntry.PlistValueType.String, enable = true },
|
|
103
|
+
|
|
104
|
+
new PlistEntry { key = "ITSAppUsesNonExemptEncryption", value = "false", type = PlistEntry.PlistValueType.Boolean, enable = true },
|
|
105
|
+
new PlistEntry { key = "FacebookAutoLogAppEventsEnabled", value = "true", type = PlistEntry.PlistValueType.Boolean, enable = true },
|
|
106
|
+
new PlistEntry { key = "FacebookAdvertiserIDCollectionEnabled", value = "true", type = PlistEntry.PlistValueType.Boolean, enable = true }
|
|
91
107
|
};
|
|
92
108
|
|
|
93
109
|
[Header("Build Properties to Set")]
|
|
@@ -160,14 +176,12 @@ namespace Amanotes.Editor
|
|
|
160
176
|
proj.WriteToFile(projectPath);
|
|
161
177
|
}, pathToBuildProject);
|
|
162
178
|
}
|
|
163
|
-
|
|
164
179
|
private void RemoveDeprecatedInfoPListKeys(string pathToBuildProject)
|
|
165
180
|
{
|
|
166
181
|
string plistPath = Path.Combine(pathToBuildProject, PLIST_FILE);
|
|
167
|
-
|
|
182
|
+
var plist = new PlistDocument();
|
|
168
183
|
plist.ReadFromString(File.ReadAllText(plistPath));
|
|
169
|
-
|
|
170
|
-
PlistElementDict rootDict = plist.root;
|
|
184
|
+
var rootDict = plist.root;
|
|
171
185
|
|
|
172
186
|
if (rootDict.values.ContainsKey(EXIST_ON_SUSPEND_KEY))
|
|
173
187
|
{
|
|
@@ -243,11 +257,11 @@ namespace Amanotes.Editor
|
|
|
243
257
|
foreach (var podFramework in podFrameworks)
|
|
244
258
|
{
|
|
245
259
|
if (!podFramework.enable) continue;
|
|
246
|
-
|
|
247
|
-
|
|
260
|
+
string frameworkPath = SearchForPodFramework(pathToBuildProject, podFramework.podFrameworkName);
|
|
261
|
+
|
|
248
262
|
if (string.IsNullOrEmpty(frameworkPath))
|
|
249
263
|
{
|
|
250
|
-
Debug.LogError($"Failed to find Pod framework for: {podFramework.
|
|
264
|
+
Debug.LogError($"Failed to find Pod framework for: {podFramework.podFrameworkName}");
|
|
251
265
|
continue;
|
|
252
266
|
}
|
|
253
267
|
|
|
@@ -291,20 +305,40 @@ namespace Amanotes.Editor
|
|
|
291
305
|
plist.ReadFromFile(plistPath);
|
|
292
306
|
var rootDict = plist.root;
|
|
293
307
|
|
|
294
|
-
foreach (var
|
|
308
|
+
foreach (var plistEntry in plistKeys)
|
|
295
309
|
{
|
|
296
|
-
if (!
|
|
310
|
+
if (!plistEntry.enable) continue;
|
|
297
311
|
|
|
298
|
-
|
|
312
|
+
switch (plistEntry.type)
|
|
299
313
|
{
|
|
300
|
-
|
|
314
|
+
case PlistEntry.PlistValueType.String:
|
|
315
|
+
rootDict.SetString(plistEntry.key, plistEntry.value);
|
|
316
|
+
break;
|
|
317
|
+
case PlistEntry.PlistValueType.Boolean:
|
|
318
|
+
rootDict.SetBoolean(plistEntry.key, bool.Parse(plistEntry.value));
|
|
319
|
+
break;
|
|
320
|
+
case PlistEntry.PlistValueType.Integer:
|
|
321
|
+
rootDict.SetInteger(plistEntry.key, int.Parse(plistEntry.value));
|
|
322
|
+
break;
|
|
323
|
+
case PlistEntry.PlistValueType.Real:
|
|
324
|
+
rootDict.SetReal(plistEntry.key, float.Parse(plistEntry.value));
|
|
325
|
+
break;
|
|
326
|
+
case PlistEntry.PlistValueType.Array:
|
|
327
|
+
var array = rootDict.CreateArray(plistEntry.key);
|
|
328
|
+
foreach (var item in plistEntry.value.Split(',')) array.AddString(item.Trim());
|
|
329
|
+
break;
|
|
330
|
+
case PlistEntry.PlistValueType.Dictionary:
|
|
331
|
+
var dict = rootDict.CreateDict(plistEntry.key);
|
|
332
|
+
foreach (var pair in plistEntry.value.Split(','))
|
|
333
|
+
{
|
|
334
|
+
var keyValue = pair.Split(':');
|
|
335
|
+
dict.SetString(keyValue[0].Trim(), keyValue[1].Trim());
|
|
336
|
+
}
|
|
337
|
+
break;
|
|
338
|
+
case PlistEntry.PlistValueType.Date:
|
|
339
|
+
rootDict.SetDate(plistEntry.key, DateTime.Parse(plistEntry.value));
|
|
340
|
+
break;
|
|
301
341
|
}
|
|
302
|
-
else if (bool.TryParse(plistKey.value, out bool boolValue))
|
|
303
|
-
{
|
|
304
|
-
rootDict.SetBoolean(plistKey.key, boolValue);
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
Debug.Log($"Added/Updated Info.plist key: {plistKey.key}");
|
|
308
342
|
}
|
|
309
343
|
|
|
310
344
|
plist.WriteToFile(plistPath);
|
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.81-
|
|
30
|
+
public const string VERSION = "0.2.81-a4";
|
|
31
31
|
|
|
32
32
|
internal static Status _status = Status.None;
|
|
33
33
|
internal static ConfigAsset _config = null;
|
package/package.json
CHANGED