I recently had a problem after updating Xcode where I couldn't build the project.
Multiple commands produce '/Users/username/Library/Developer/Xcode/DerivedData/appname-code/Build/Products/Release-iphoneos/appname.app':
I followed the instructions in these answers: https://stackoverflow.com/a/52452590/4838107 https://stackoverflow.com/a/35316717/4838107
$ sudo gem install cocoapods-deintegrate
$ sudo gem install cocoapods-clean
$ pod deintegrate
$ pod clean
$ pod install
When I try 'pod install' it gives me this:
The following pods are integrated into targets that do not have the same Swift version:
Alamofire required by [target] (Swift 3.0)
I can't open the project anymore because .xcworkspace is gone so any solution that involves the project open in Xcode won't be any use. I've searched for answers on stackoverflow and this is a problem, for example here.
Podfile:
#Uncomment this line to define a global platform for your project
platform :ios, '9.0'
# Uncomment this line if you're using Swift
use_frameworks!
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'NO'
config.build_settings['EMBEDDED_CONTENT_CONTAINS_SWIFT'] = 'NO'
config.build_settings['SWIFT_VERSION'] = '3.0.1'
end
end
end
def standard_pods
pod 'Alamofire'
...
end
target '[target]' do
standard_pods
end