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

Commit 6e380de

Browse files
SotoiGhostSotoiGhost
authored andcommitted
Fixed a bug where some fat frameworks were not build correctly
1 parent 132687c commit 6e380de

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

common.cake

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ void BuildXcodeFatFramework (FilePath xcodeProject, PodSpec [] podSpecs, Platfor
261261
}
262262

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

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

280-
var buildPath = buildSettings != null && buildSettings.ContainsKey ("SYMROOT") ?
281-
Directory (buildSettings ["SYMROOT"]) : workingDirectory.Combine ("build");
281+
var buildSettingsCopy = new Dictionary<string, string> (buildSettings);
282+
283+
if (!buildSettingsCopy.ContainsKey ("SYMROOT"))
284+
buildSettingsCopy ["SYMROOT"] = MakeAbsolute (workingDirectory.Combine ($"build-{arch}")).FullPath;
285+
286+
var buildPath = Directory (buildSettingsCopy ["SYMROOT"]).Path;
282287

283288
XCodeBuild (new XCodeBuildSettings {
284289
Project = workingDirectory.CombineWithFilePath (xcodeProject).ToString (),
@@ -287,7 +292,7 @@ void BuildXcodeFatFramework (FilePath xcodeProject, PodSpec [] podSpecs, Platfor
287292
Arch = arch,
288293
Configuration = "Release",
289294
Verbose = true,
290-
BuildSettings = buildSettings
295+
BuildSettings = buildSettingsCopy
291296
});
292297

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

0 commit comments

Comments
 (0)