pod lib createExpect changes made in step 5 to take effect in the example project
The example app continues to use the initially built version of the pod.
CocoaPods : 1.5.3
Ruby : ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
RubyGems : 2.5.2.3
Host : Mac OS X 10.14 (18A391)
Xcode : 10.0 (10A255)
Git : git version 2.17.1 (Apple Git-112)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ a30768897a075978084398f2dee09206c2cced5c
Executable Path: /usr/local/bin/pod
cocoapods-deintegrate : 1.0.2
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.3.1
cocoapods-try : 1.1.0
slather : 2.4.5
use_frameworks!
target 'Foobar_Example' do
pod 'Foobar', :path => '../'
target 'Foobar_Tests' do
inherit! :search_paths
pod 'FBSnapshotTestCase' , '~> 2.1.4'
end
end
This can be reproduced with any cocoapods library, but here is a simple example that demonstrates the issue - Foobar.zip
This problem only happens when using Xcode's "New Build System" which is the default as of Xcode 10. Reverting to the Legacy Build System is a workaround.
Removing the Input Files and Output Files from the [CP] Embed Pods Frameworks build phase works around the issue when using the New Build System.

The [CP] Embed Pods Frameworks build phase is not executed by Xcode's New Build System after making a change to a (development) pod:

Another workaround I found, which doesn't require using the old build system or deleting those input/output source files after each pod install is to add an additional Script Build Phase just before the "[CP] Embed Pod Frameworks" one which just touches the shell script:
# Hopeful workaround for: https://github.com/CocoaPods/CocoaPods/issues/8151
touch "$SRCROOT/Pods/Target Support Files/Pods-TARGETNAME/Pods-TARGETNAME-frameworks.sh"
This a known issue with the new build system. Apple is aware of it and it has been tracked here https://github.com/CocoaPods/CocoaPods/issues/8073 with a PR that allows you to disable input/output paths here https://github.com/CocoaPods/CocoaPods/pull/8105 which is not yet released but you can use Bundler to point to a SHA for CocoaPods.
Going to close as the other issue since there are now 2 workarounds (use legacy build system or use the flag from #8105).
A small workaround bash script that will remove from modified by cocoapods project.pbxproj file wrong output file line (example based on Instabug framework):
PROJECT_NAME=MyAppProject
sed -i '' 's#"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Instabug.framework",##' ${PROJECT_NAME}.xcodeproj/project.pbxproj
execute this script after pod install build step
I documented the issue here:
https://www.ralfebert.de/ios/blog/cocoapods-clean-input-output-files/
I wondered, has it been considered to disable the input/output folders in the build phase by default until the Xcode bug is fixed?
Most helpful comment
I documented the issue here:
https://www.ralfebert.de/ios/blog/cocoapods-clean-input-output-files/
I wondered, has it been considered to disable the input/output folders in the build phase by default until the Xcode bug is fixed?