Skip to content

Commit

Permalink
🤝 Merge pull request #68 from Instabug/hotfix/update_script
Browse files Browse the repository at this point in the history
📝 Add new Run Script Phase to Build Phases to remove the simulator ar…
  • Loading branch information
salmatarzi authored Sep 1, 2017
2 parents 584befd + ff8e1ee commit 74b3afc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions link.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
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' }
Expand Down Expand Up @@ -43,5 +48,9 @@
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

0 comments on commit 74b3afc

Please sign in to comment.