Skip to content

Commit 61c3a0d

Browse files
committedFeb 3, 2021
Preserve user's pods when building incrementally.
Attempt to preserve user's pods when building Xcode incrementally if multiple Xcode project is supported. Currently it only preserve the pods added into the target which contains Unity libraries. That is, `Unity-iPhone` for Unity 2019.2 or below and `UnityFramework` for Unity 2019.3+. Change-Id: I46a4838a9e61cda14f6be2bb67716d6474eed1b8
1 parent 717fd0a commit 61c3a0d

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed
 

‎source/IOSResolver/src/IOSResolver.cs

+14-1
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,18 @@ public static string XcodeUnityFrameworkTargetName {
831831
}
832832
}
833833

834+
/// <summary>
835+
/// Name of the Xcode target which contains Unity libraries.
836+
/// From Unity 2019.3+, Unity includes all its libraries and native libraries under Assets
837+
/// folder to 'UnityFramework' instead of 'Unity-iPhone'.
838+
/// </summary>
839+
public static string XcodeTargetWithUnityLibraries {
840+
get {
841+
return MultipleXcodeTargetsSupported ?
842+
XcodeUnityFrameworkTargetName : XcodeMainTargetName;
843+
}
844+
}
845+
834846
/// <summary>
835847
/// Initialize the TARGET_NAME property.
836848
/// This will be "Unity-iPhone" in versions of Unity (2019.3+) that added support for using
@@ -1975,7 +1987,8 @@ private static void ParseUnityDeps(string unityPodfilePath) {
19751987
continue;
19761988
}
19771989
// TODO: Properly support multiple targets.
1978-
if (line.StartsWith(String.Format("target '{0}' do", XcodeMainTargetName))) {
1990+
if (line.StartsWith(String.Format("target '{0}' do",
1991+
XcodeTargetWithUnityLibraries))) {
19791992
capturingPodsDepth++;
19801993
continue;
19811994
}

0 commit comments

Comments
 (0)
Please sign in to comment.