Skip to content

Commit 9da0ed7

Browse files
authored
Automatically add Crashlytics Input Files for the Run Script in Xcode 15 (#809)
1 parent 43edcc6 commit 9da0ed7

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

editor/crashlytics/src/iOSPostBuild.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ public class iOSPostBuild {
5757

5858
private const string ShellPath = "/bin/sh -x";
5959

60+
private static List<string> InputFiles = new List<string>(new [] {
61+
"$(BUILT_PRODUCTS_DIR)/$(UNLOCALIZED_RESOURCES_FOLDER_PATH)/GoogleService-Info.plist",
62+
"$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)",
63+
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}",
64+
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist",
65+
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${PRODUCT_NAME}"
66+
});
67+
6068
/// <summary>
6169
/// When building out to iOS, write Firebase specific values to the appropriate Plist files.
6270
/// </summary>
@@ -137,11 +145,11 @@ private static void SetupGUIDForSymbolUploads(object pbxProjectObj,
137145

138146
internal static iOSBuildPhaseMethodCall GetBuildPhaseMethodCall(string unityVersion, string targetGuid, string completeRunScriptBody) {
139147
if (VersionInfo.GetUnityMajorVersion(unityVersion) >= 2019) {
140-
Debug.Log("Using AddShellScriptBuildPhase to add the Crashlytics Run Script");
148+
Debug.Log("Using AddShellScriptBuildPhase with Input Files to add the Crashlytics Run Script");
141149
return new iOSBuildPhaseMethodCall {
142150
MethodName = "AddShellScriptBuildPhase",
143-
ArgumentTypes = new [] { typeof(string), typeof(string), typeof(string), typeof(string) },
144-
Arguments = new object [] { targetGuid, RunScriptName, ShellPath, completeRunScriptBody },
151+
ArgumentTypes = new [] { typeof(string), typeof(string), typeof(string), typeof(string), typeof(List<string>) },
152+
Arguments = new object [] { targetGuid, RunScriptName, ShellPath, completeRunScriptBody, InputFiles },
145153
};
146154
} else {
147155
Debug.Log("Using AppendShellScriptBuildPhase to add the Crashlytics Run Script");

0 commit comments

Comments
 (0)