Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Fixed a bug where some fat frameworks were not build correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
SotoiGhost authored and SotoiGhost committed Feb 4, 2020
1 parent 132687c commit 6e380de
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions common.cake
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ void BuildXcodeFatFramework (FilePath xcodeProject, PodSpec [] podSpecs, Platfor
}

workingDirectory = workingDirectory ?? Directory("./externals/");
buildSettings = buildSettings ?? new Dictionary<string, string> ();

foreach (var podSpec in podSpecs) {
var target = podSpec.TargetName;
Expand All @@ -277,8 +278,12 @@ void BuildXcodeFatFramework (FilePath xcodeProject, PodSpec [] podSpecs, Platfor
if (DirectoryExists (platformFrameworkPath))
continue;

var buildPath = buildSettings != null && buildSettings.ContainsKey ("SYMROOT") ?
Directory (buildSettings ["SYMROOT"]) : workingDirectory.Combine ("build");
var buildSettingsCopy = new Dictionary<string, string> (buildSettings);

if (!buildSettingsCopy.ContainsKey ("SYMROOT"))
buildSettingsCopy ["SYMROOT"] = MakeAbsolute (workingDirectory.Combine ($"build-{arch}")).FullPath;

var buildPath = Directory (buildSettingsCopy ["SYMROOT"]).Path;

XCodeBuild (new XCodeBuildSettings {
Project = workingDirectory.CombineWithFilePath (xcodeProject).ToString (),
Expand All @@ -287,7 +292,7 @@ void BuildXcodeFatFramework (FilePath xcodeProject, PodSpec [] podSpecs, Platfor
Arch = arch,
Configuration = "Release",
Verbose = true,
BuildSettings = buildSettings
BuildSettings = buildSettingsCopy
});

var releasePath = buildPath.Combine ($"Release-{sdk}");
Expand Down

0 comments on commit 6e380de

Please sign in to comment.