diff --git a/Assets/AppCenter/Editor/PBXProjectWrapper.cs b/Assets/AppCenter/Editor/PBXProjectWrapper.cs index b79bfc9f..4d28f429 100644 --- a/Assets/AppCenter/Editor/PBXProjectWrapper.cs +++ b/Assets/AppCenter/Editor/PBXProjectWrapper.cs @@ -76,8 +76,9 @@ public class PBXProjectWrapper public void AddBuildProperty(string name, string value) { - var targetGuid = PBXProjectType.GetMethod("GetUnityMainTargetGuid") - .Invoke(_pbxProject, null); + var targetName = GetUnityTargetName(); + var targetGuid = PBXProjectType.GetMethod("TargetGuidByName") + .Invoke(_pbxProject, new object[] { targetName }); PBXProjectType.GetMethod("AddBuildProperty", new[] { typeof(string), typeof(string), typeof(string) }) .Invoke(_pbxProject,