Skip to content

Instantly share code, notes, and snippets.

@kamend
Forked from capyvara/gist:5230032
Created April 24, 2014 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kamend/11256148 to your computer and use it in GitHub Desktop.
Save kamend/11256148 to your computer and use it in GitHub Desktop.
// Adjust dSYM generation
var xcodeProjectPath = Path.Combine(xcodeProjectDir, "Unity-iPhone.xcodeproj");
var pbxPath = Path.Combine(xcodeProjectPath, "project.pbxproj");
var sb = new System.Text.StringBuilder();
var xcodeProjectLines = File.ReadAllLines(pbxPath);
foreach (var line in xcodeProjectLines)
{
// Remove from OTHER_LDFLAGS
if (line.Contains("-Wl,-S,-x"))
continue;
// iOS Default when not present is dwarf-with-dsym
if (line.Contains("DEBUG_INFORMATION_FORMAT"))
{
// Replace line to stripping on postprocess deployment flags
sb.AppendLine("\t\t\t\tDEPLOYMENT_POSTPROCESSING = YES;");
sb.AppendLine("\t\t\t\tSEPARATE_STRIP = YES;");
sb.AppendLine("\t\t\t\tSTRIP_INSTALLED_PRODUCT = YES;");
continue;
}
// Defaults to Yes
if (line.Contains("COPY_PHASE_STRIP"))
continue;
// Defaults to Yes
if (line.Contains("GCC_GENERATE_DEBUGGING_SYMBOLS"))
continue;
sb.AppendLine(line);
}
File.WriteAllText(pbxPath, sb.ToString());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment