diff --git a/link.rb b/link.rb index d803e5e03..a5a1c7b4c 100644 --- a/link.rb +++ b/link.rb @@ -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' } @@ -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 \ No newline at end of file