1

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
7
  • Specify pod version in Podfile that works for the version your app is using Commented Oct 3, 2018 at 12:25
  • @AshleyMills I edited my question Commented Oct 3, 2018 at 12:38
  • Have you tried pointing to an older version of the Alamofire pod? One that was built for Swift 3? Commented Oct 3, 2018 at 12:39
  • I have 13 pods. Will I look up all of them manually or is there a way to do this automatically? Commented Oct 3, 2018 at 12:40
  • You'll need to do it manually, but it's not a big job. Just check the Releases tab on GitHub. Of course, you'll lose any new features of the pods. Alternatively, update your app to Swift 4. You'll have to do it sooner or later. Commented Oct 3, 2018 at 12:47

1 Answer 1

0

In my case i missed to migrate other built targets like unit tests and ui tests :)

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.