From bf23ae07b484e1d92efb70320e9983881e5e9149 Mon Sep 17 00:00:00 2001 From: Dimitris Koutsogiorgas Date: Tue, 26 Feb 2019 10:04:53 -0800 Subject: [PATCH] Include `bcsymbolmap` file output paths into script phase. --- CHANGELOG.md | 6 +++++- .../user_project_integrator/target_integrator.rb | 13 +++++++++---- .../target_integrator_spec.rb | 5 ++++- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4e294d42e..b3a6e7d90a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ##### Bug Fixes -* Copy `bcsymbolmap` files into correct destination to avoid invalid app archives +* Include `bcsymbolmap` file output paths into script phase. + [Dimitris Koutsogiorgas](https://github.com/dnkoutso) + [#8563](https://github.com/CocoaPods/CocoaPods/pull/8563) + +* Copy `bcsymbolmap` files into correct destination to avoid invalid app archives [florianbuerger](https://github.com/florianbuerger) [#8558](https://github.com/CocoaPods/CocoaPods/pull/8558) diff --git a/lib/cocoapods/installer/user_project_integrator/target_integrator.rb b/lib/cocoapods/installer/user_project_integrator/target_integrator.rb index b1dd08deb4..d03c7c2ced 100644 --- a/lib/cocoapods/installer/user_project_integrator/target_integrator.rb +++ b/lib/cocoapods/installer/user_project_integrator/target_integrator.rb @@ -324,10 +324,15 @@ def resource_output_paths(resource_input_paths) def framework_output_paths(framework_input_paths) framework_input_paths.flat_map do |framework_path| framework_output_path = "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/#{File.basename(framework_path.source_path)}" - dsym_path = if (dsym_input_path = framework_path.dsym_path) - "${DWARF_DSYM_FOLDER_PATH}/#{File.basename(dsym_input_path)}" - end - [framework_output_path, dsym_path] + dsym_output_path = if (dsym_input_path = framework_path.dsym_path) + "${DWARF_DSYM_FOLDER_PATH}/#{File.basename(dsym_input_path)}" + end + bcsymbol_output_paths = unless framework_path.bcsymbolmap_paths.nil? + framework_path.bcsymbolmap_paths.map do |bcsymbolmap_path| + "${BUILT_PRODUCTS_DIR}/#{File.basename(bcsymbolmap_path)}" + end + end + [framework_output_path, dsym_output_path, *bcsymbol_output_paths] end.compact.uniq end end diff --git a/spec/unit/installer/user_project_integrator/target_integrator_spec.rb b/spec/unit/installer/user_project_integrator/target_integrator_spec.rb index beb31f297c..e0e6567e10 100644 --- a/spec/unit/installer/user_project_integrator/target_integrator_spec.rb +++ b/spec/unit/installer/user_project_integrator/target_integrator_spec.rb @@ -442,7 +442,8 @@ module Pod it 'adds embed frameworks build phase input and output paths for vendored and non vendored frameworks' do debug_vendored_framework = Target::FrameworkPaths.new('${PODS_ROOT}/DebugVendoredFramework/ios/DebugVendoredFramework.framework', - '${PODS_ROOT}/DebugVendoredFramework/ios/DebugVendoredFramework.framework.dSYM') + '${PODS_ROOT}/DebugVendoredFramework/ios/DebugVendoredFramework.framework.dSYM', + ['${PODS_ROOT}/DebugVendoredFramework/ios/A6621399-62A0-3DC3-A6E3-B6B51BD287AD.bcsymbolmap']) debug_non_vendored_framework = Target::FrameworkPaths.new('${BUILT_PRODUCTS_DIR}/DebugCompiledFramework/DebugCompiledFramework.framework') @@ -458,6 +459,7 @@ module Pod phase = target.shell_script_build_phases.find { |bp| bp.name == @embed_framework_phase_name } phase.input_paths.sort.should == %w( ${BUILT_PRODUCTS_DIR}/DebugCompiledFramework/DebugCompiledFramework.framework + ${PODS_ROOT}/DebugVendoredFramework/ios/A6621399-62A0-3DC3-A6E3-B6B51BD287AD.bcsymbolmap ${PODS_ROOT}/DebugVendoredFramework/ios/DebugVendoredFramework.framework ${PODS_ROOT}/DebugVendoredFramework/ios/DebugVendoredFramework.framework.dSYM ${PODS_ROOT}/ReleaseVendoredFramework/ios/ReleaseVendoredFramework.framework @@ -465,6 +467,7 @@ module Pod ${PODS_ROOT}/Target\ Support\ Files/Pods/Pods-frameworks.sh ) phase.output_paths.sort.should == %w( + ${BUILT_PRODUCTS_DIR}/A6621399-62A0-3DC3-A6E3-B6B51BD287AD.bcsymbolmap ${DWARF_DSYM_FOLDER_PATH}/DebugVendoredFramework.framework.dSYM ${DWARF_DSYM_FOLDER_PATH}/ReleaseVendoredFramework.framework.dSYM ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DebugCompiledFramework.framework