Skip to content

Commit

Permalink
[msbuild] Don't try to find frameworks in a directory that doesn't ex…
Browse files Browse the repository at this point in the history
…ist. (xamarin#10591)

Check if the .app has a Frameworks directory before trying to iterate over any
*.framework directories it may have.

Co-authored-by: Rolf Bjarne Kvinge <[email protected]>
  • Loading branch information
1 parent 11a1c24 commit c2461fc
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions msbuild/Xamarin.iOS.Tasks.Core/Tasks/ArchiveTaskBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,15 @@ public override bool Execute ()
}

// for each user framework that is bundled inside the app we must also archive their dSYMs, if available
foreach (var fx in Directory.GetDirectories (Path.Combine (AppBundleDir.ItemSpec, "Frameworks"), "*.framework")) {
var dsym = Path.GetFileName (fx) + ".dSYM";
var fq_dsym = Path.Combine (AppBundleDir.ItemSpec, "..", dsym);
if (Directory.Exists (fq_dsym)) {
var destDir = Path.Combine (archiveDir, "dSYMs", dsym);
Ditto (fq_dsym, destDir);
var fwks = Path.Combine (AppBundleDir.ItemSpec, "Frameworks");
if (Directory.Exists (fwks)) {
foreach (var fx in Directory.GetDirectories (fwks, "*.framework")) {
var dsym = Path.GetFileName (fx) + ".dSYM";
var fq_dsym = Path.Combine (AppBundleDir.ItemSpec, "..", dsym);
if (Directory.Exists (fq_dsym)) {
var destDir = Path.Combine (archiveDir, "dSYMs", dsym);
Ditto (fq_dsym, destDir);
}
}
}

Expand Down

0 comments on commit c2461fc

Please sign in to comment.