File tree Expand file tree Collapse file tree 1 file changed +24
-3
lines changed Expand file tree Collapse file tree 1 file changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,30 @@ public class iOSPostBuild {
47
47
48
48
// In Unity 2019.3 - PODS_ROOT is no longer an environment variable that is exposed.
49
49
// Use ${PROJECT_DIR}/Pods.
50
- private const string RunScriptBody = "chmod u+x \" ${PROJECT_DIR}/Pods/FirebaseCrashlytics/run\" \n " +
51
- "chmod u+x \" ${PROJECT_DIR}/Pods/FirebaseCrashlytics/upload-symbols\" \n " +
52
- "\" ${PROJECT_DIR}/Pods/FirebaseCrashlytics/run\" " ;
50
+ private const string RunScriptBody = @"
51
+ # Define the path to the Cocoapods FirebaseCrashlytics 'run' script
52
+ COCOAPODS_RUN_PATH=""${PROJECT_DIR}/Pods/FirebaseCrashlytics/run""
53
+
54
+ # Check if the file exists at the Cocoapods path
55
+ if [ -f ""$COCOAPODS_RUN_PATH"" ]; then
56
+ # --- File exists (Cocoapods integration) ---
57
+ echo ""Running Firebase Crashlytics (Cocoapods)""
58
+
59
+ # Make scripts executable
60
+ chmod u+x ""$COCOAPODS_RUN_PATH""
61
+ chmod u+x ""${PROJECT_DIR}/Pods/FirebaseCrashlytics/upload-symbols""
62
+
63
+ # Run the script
64
+ ""$COCOAPODS_RUN_PATH"" -gsp ""${PROJECT_DIR}/GoogleService-Info.plist""
65
+
66
+ else
67
+ # --- File does not exist (Swift Package Manager integration) ---
68
+ echo ""Running Firebase Crashlytics (SPM)""
69
+
70
+ # Run the SPM script
71
+ ""${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run"" -gsp ""${PROJECT_DIR}/GoogleService-Info.plist""
72
+ fi
73
+ " ;
53
74
54
75
private const string GooglePlistPath = "${PROJECT_DIR}/GoogleService-Info.plist" ;
55
76
You can’t perform that action at this time.
0 commit comments