Skip to content

Commit 2ad7cc9

Browse files
author
Stewart Miles
committed
Only target UnityFramework when integrating Cocoapods.
Unity 2019.3 split iOS builds into a launcher target called Unity-iPhone and a framework called UnityFramework. When support for this was added in I2236b4cfa08f64feb6e6a7957d71987cdacaa6a9 and I1f236eaeca28bcfd051cc6ea317e5a888efe231e the iOS resolver was changed to add Cocoapods to both targets. However, this can result in build errors where symbols are duplicated from Cocoapods being included in both targets as UnityFramework is eventually included by Unity-iPhone. This changes the resolver to only add to the UnityFramework target when multiple Xcode targets are exported by Unity. Fixes googlesamples#282 Bug: 136038764 Bug: 141944403 Change-Id: Ie26cc8ee8d503ddcb5a6fc779f8f9e814355c4cb
1 parent 858f65e commit 2ad7cc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/IOSResolver/src/IOSResolver.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,7 +1617,7 @@ public static IEnumerable<string> XcodeTargetNames {
16171617
get {
16181618
// Return hard coded names in the UnityEditor.iOS.Xcode.PBXProject DLL.
16191619
return MultipleXcodeTargetsSupported ?
1620-
new List<string>() { "Unity-iPhone", "UnityFramework" } :
1620+
new List<string>() { "UnityFramework" } :
16211621
new List<string>() { InitializeTargetName() };
16221622
}
16231623
}
@@ -1635,7 +1635,7 @@ public static IEnumerable<string> GetXcodeTargetGuids(object xcodeProject) {
16351635
// NOTE: The test target is not exposed.
16361636
try {
16371637
foreach (var guidMethod in
1638-
new[] { "GetUnityMainTargetGuid", "GetUnityFrameworkTargetGuid" }) {
1638+
new[] { "GetUnityFrameworkTargetGuid" }) {
16391639
targets.Add((string)VersionHandler.InvokeInstanceMethod(project, guidMethod,
16401640
null));
16411641
}

0 commit comments

Comments
 (0)