Skip to content

Commit 62f163d

Browse files
committed
pls
1 parent a3d1ec7 commit 62f163d

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

scripts/patch_crashlytics_run_path.rb

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,23 @@
1919
# This script patches the Crashlytics Quickstart's Xcode project to fix the
2020
# path to the `run` script for XCFramework-based builds.
2121
#
22-
# The default project assumes an SPM dependency and has a hardcoded path:
23-
# ${BUILD_DIR%Build/*}SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run
24-
#
25-
# This script changes it to the path used by the XCFramework distribution:
26-
# "${SRCROOT}/Firebase/FirebaseCrashlytics/run"
22+
# The default project assumes an SPM dependency. This script changes the path
23+
# to point to the location where the `run` script is placed in the zip
24+
# distribution test environment.
2725

2826
project_path = 'quickstart-ios/crashlytics/CrashlyticsExample.xcodeproj'
2927
project = Xcodeproj::Project.open(project_path)
28+
new_path = '"${SRCROOT}/Firebase/run"'
3029

3130
project.targets.each do |target|
3231
target.build_phases.each do |phase|
3332
if phase.is_a?(Xcodeproj::Project::Object::PBXShellScriptBuildPhase) && phase.name == 'Run Script'
3433
if phase.shell_script.include?('SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run')
35-
puts "Patching Run Script phase in target: #{target.name}"
36-
phase.shell_script = '"${SRCROOT}/Firebase/FirebaseCrashlytics/run"'
34+
puts "Patching Run Script phase in target '#{target.name}' to: #{new_path}"
35+
phase.shell_script = new_path
3736
end
3837
end
3938
end
4039
end
4140

42-
project.save
41+
project.save

0 commit comments

Comments
 (0)