Skip to content

Commit

Permalink
Preserve user's pods when building incrementally.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
chkuang-g committed Feb 3, 2021
1 parent 717fd0a commit 61c3a0d
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion source/IOSResolver/src/IOSResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,18 @@ public static string XcodeUnityFrameworkTargetName {
}
}

/// <summary>
/// Name of the Xcode target which contains Unity libraries.
/// From Unity 2019.3+, Unity includes all its libraries and native libraries under Assets
/// folder to 'UnityFramework' instead of 'Unity-iPhone'.
/// </summary>
public static string XcodeTargetWithUnityLibraries {
get {
return MultipleXcodeTargetsSupported ?
XcodeUnityFrameworkTargetName : XcodeMainTargetName;
}
}

/// <summary>
/// Initialize the TARGET_NAME property.
/// This will be "Unity-iPhone" in versions of Unity (2019.3+) that added support for using
Expand Down Expand Up @@ -1975,7 +1987,8 @@ private static void ParseUnityDeps(string unityPodfilePath) {
continue;
}
// TODO: Properly support multiple targets.
if (line.StartsWith(String.Format("target '{0}' do", XcodeMainTargetName))) {
if (line.StartsWith(String.Format("target '{0}' do",
XcodeTargetWithUnityLibraries))) {
capturingPodsDepth++;
continue;
}
Expand Down

0 comments on commit 61c3a0d

Please sign in to comment.