Skip to content

Commit f6ec1c5

Browse files
authored
Merge pull request #2 from StansAssets/Fixes-for-roomful
chore: Updated project in order to use it in roomful project.
2 parents 2d49c02 + 3c8adbd commit f6ec1c5

File tree

7 files changed

+78
-10
lines changed

7 files changed

+78
-10
lines changed

com.stansassets.xcode-project/Editor/Config/XCodeProjectSettings.cs

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,60 @@
1414

1515
namespace StansAssets.IOS.XCode
1616
{
17-
class XCodeProjectSettings : PackageScriptableSettingsSingleton<XCodeProjectSettings>
17+
/// <summary>
18+
/// Xcode projects settings object.
19+
/// Through it you can get access to all frameworks, libraries plist.list variables and others settings.
20+
/// </summary>
21+
public class XCodeProjectSettings : PackageScriptableSettingsSingleton<XCodeProjectSettings>
1822
{
23+
/// <summary>
24+
/// Name of the package.
25+
/// </summary>
1926
public override string PackageName => XCodePackage.PackageName;
2027
protected override bool IsEditorOnly => true;
2128
public const string DefaultEntitlementsFileName = "default.entitlements";
2229
public const string CfLocalizationsPlistKey = "CFBundleLocalizations";
2330

2431
//Post Process Libs
32+
/// <summary>
33+
/// Entry point for all frameworks in the xcode project.
34+
/// </summary>
2535
public List<XCodeFramework> Frameworks = new List<XCodeFramework>();
36+
/// <summary>
37+
/// List of all embedded frameworks in the xcode project.
38+
/// </summary>
2639
public List<XCodeEmbedFramework> EmbededFrameworks = new List<XCodeEmbedFramework>();
40+
/// <summary>
41+
/// List of all libraries in the xcode project.
42+
/// </summary>
2743
public List<XCodeLibrary> Libraries = new List<XCodeLibrary>();
44+
/// <summary>
45+
/// List of all flags in the xcode project.
46+
/// </summary>
2847
public List<XCodeProjectFlag> Flags = new List<XCodeProjectFlag>();
48+
/// <summary>
49+
/// List of info plist variables in the xcode project.
50+
/// </summary>
2951
public List<InfoPlistKey> PlistVariables = new List<InfoPlistKey>();
52+
/// <summary>
53+
/// List of plist id's variables in the xcode project.
54+
/// </summary>
3055
public List<PlistKeyId> VariableDictionary = new List<PlistKeyId>();
56+
/// <summary>
57+
/// List of all languages in the xcode project.
58+
/// </summary>
3159
public List<SA_ISOLanguage> Languages = new List<SA_ISOLanguage>();
32-
60+
/// <summary>
61+
/// Entry point for all shell scripts in the xcode project.
62+
/// </summary>
3363
public List<XCodeShellScript> ShellScripts = new List<XCodeShellScript>();
3464

3565
[SerializeField]
3666
List<XCodeProjectProperty> m_BuildProperties = new List<XCodeProjectProperty>();
3767

68+
/// <summary>
69+
/// Is Post Process Enabled.
70+
/// </summary>
3871
public static bool PostProcessEnabled
3972
{
4073
get
@@ -46,7 +79,13 @@ public static bool PostProcessEnabled
4679
}
4780
}
4881

82+
/// <summary>
83+
/// Capability Settings.
84+
/// </summary>
4985
public XCodeCapabilitySettings Capability = new XCodeCapabilitySettings();
86+
/// <summary>
87+
/// Xcode assets.
88+
/// </summary>
5089
public List<XCodeAsset> Files = new List<XCodeAsset>();
5190
public EntitlementsGenerationMode EntitlementsMode = EntitlementsGenerationMode.Automatic;
5291
public Object EntitlementsFile = null;
@@ -55,6 +94,11 @@ public static bool PostProcessEnabled
5594
// Variables
5695
//--------------------------------------
5796

97+
/// <summary>
98+
/// Method for adding new variable into <c>VariableDictionary</c> list.
99+
/// </summary>
100+
/// <param name="uniqueIdKey"> Unique id key</param>
101+
/// <param name="var"> Info plist key value</param>
58102
public void AddVariableToDictionary(string uniqueIdKey, InfoPlistKey var)
59103
{
60104
var newVar = new PlistKeyId();
@@ -63,6 +107,11 @@ public void AddVariableToDictionary(string uniqueIdKey, InfoPlistKey var)
63107
VariableDictionary.Add(newVar);
64108
}
65109

110+
/// <summary>
111+
/// Method that removes info plist key from <c>VariableDictionary</c> list.
112+
/// </summary>
113+
/// <param name="v"> Info plist key value.</param>
114+
/// <param name="listWithThisVariable"> </param>
66115
public void RemoveVariable(InfoPlistKey v, IList listWithThisVariable)
67116
{
68117
if (Instance.PlistVariables.Contains(v))
@@ -91,6 +140,12 @@ public void RemoveVariable(InfoPlistKey v, IList listWithThisVariable)
91140
VariableDictionary = keysInUse;
92141
}
93142

143+
/// <summary>
144+
/// Method that returns does <c>list</c> contains children with given <c>key</c>.
145+
/// </summary>
146+
/// <param name="id"> Id that we want to check for.</param>
147+
/// <param name="list"> List of info plist in which we what to check.</param>
148+
/// <returns></returns>
94149
bool IsInUse(string id, List<InfoPlistKey> list)
95150
{
96151
foreach (var key in list)
@@ -107,6 +162,11 @@ bool IsInUse(string id, List<InfoPlistKey> list)
107162
return false;
108163
}
109164

165+
/// <summary>
166+
/// Method that returns info plist key by given key id.
167+
/// </summary>
168+
/// <param name="uniqueIdKey"> Uniques id</param>
169+
/// <returns> <c>InfoPlistKey</c> or null if we couldn't find any.</returns>
110170
public InfoPlistKey GetVariableById(string uniqueIdKey)
111171
{
112172
foreach (var vid in VariableDictionary)
@@ -119,6 +179,9 @@ public InfoPlistKey GetVariableById(string uniqueIdKey)
119179
// Build Properties
120180
//--------------------------------------
121181

182+
/// <summary>
183+
/// List of project build properties.
184+
/// </summary>
122185
public List<XCodeProjectProperty> BuildProperties
123186
{
124187
get

com.stansassets.xcode-project/Editor/Core/XCodeProject.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ public static class XCodeProject
1212
/// </summary>
1313
public static XCodeCapabilitySettings Capability => XCodeProjectSettings.Instance.Capability;
1414

15+
/// <summary>
16+
/// Project Settings.
17+
/// </summary>
18+
public static XCodeProjectSettings Settings => XCodeProjectSettings.Instance;
19+
1520
/// <summary>
1621
/// Sets a build property to the given value in all build configurations.
1722
/// </summary>

com.stansassets.xcode-project/Editor/Enum/EntitlementsGenerationMode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace StansAssets.IOS.XCode
22
{
3-
enum EntitlementsGenerationMode
3+
public enum EntitlementsGenerationMode
44
{
55
Automatic,
66
Manual,

com.stansassets.xcode-project/Editor/Models/PlistKeyId.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
namespace StansAssets.IOS.XCode
22
{
33
[System.Serializable]
4-
class PlistKeyId
4+
public class PlistKeyId
55
{
66
public InfoPlistKey VariableValue;
77
public string uniqueIdKey;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
namespace StansAssets.IOS.XCode
22
{
33
[System.Serializable]
4-
class XCodeEmbedFramework : XCodeAsset { }
4+
public class XCodeEmbedFramework : XCodeAsset { }
55
}

com.stansassets.xcode-project/Editor/Models/XCodeShellScript.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
namespace StansAssets.IOS.XCode
22
{
33
[System.Serializable]
4-
class XCodeShellScript
4+
public class XCodeShellScript
55
{
66
public string Name = "New Run Script";
77
public string Shell = string.Empty;

com.stansassets.xcode-project/Editor/StansAssets.IOS.XCode.asmdef

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "StansAssets.IOS.XCode",
33
"references": [
4-
"GUID:9c2d25c8e11a94c0db463f6b069b38f4",
5-
"GUID:618d739a61acd4b7d86dceb8592359b2",
6-
"GUID:db0eb1f6c1244402aa4d287a997cdb47",
7-
"GUID:e322f1a843d5b4f8095d71c70e5fbccc"
4+
"StansAssets.Foundation.Editor",
5+
"StansAssets.Foundation",
6+
"StansAssets.Plugins",
7+
"StansAssets.Plugins.Editor"
88
],
99
"includePlatforms": [
1010
"Editor"

0 commit comments

Comments
 (0)