mirror of
https://github.com/status-im/instabug-reactnative.git
synced 2025-03-02 14:10:40 +00:00
📝 Add new Run Script Phase to Build Phases to remove the simulator architectures from the binary when archiving the app to the app store
This commit is contained in:
parent
584befd354
commit
ff8e1ee5f0
9
link.rb
9
link.rb
@ -16,6 +16,11 @@ target_name = file_name
|
||||
framework_root = '../node_modules/instabug-reactnative/ios'
|
||||
framework_name = 'Instabug.framework'
|
||||
|
||||
INSTABUG_PHASE_NAME = "Strip Frameworks"
|
||||
INSTABUG_PHASE_SCRIPT = <<-SCRIPTEND
|
||||
bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Instabug.framework/Instabug.bundle/strip-frameworks.sh"
|
||||
SCRIPTEND
|
||||
|
||||
# Get useful variables
|
||||
project = Xcodeproj::Project.open(project_location)
|
||||
frameworks_group = project.groups.find { |group| group.display_name == 'Frameworks' }
|
||||
@ -43,5 +48,9 @@ build_file = embed_frameworks_build_phase.add_file_reference(framework_ref)
|
||||
frameworks_build_phase.add_file_reference(framework_ref)
|
||||
build_file.settings = { 'ATTRIBUTES' => ['CodeSignOnCopy', 'RemoveHeadersOnCopy'] }
|
||||
|
||||
#Add New Run Script Phase to Build Phases
|
||||
phase = target.new_shell_script_build_phase(INSTABUG_PHASE_NAME)
|
||||
phase.shell_script = INSTABUG_PHASE_SCRIPT
|
||||
|
||||
# Save Xcode project
|
||||
project.save
|
Loading…
x
Reference in New Issue
Block a user