0

I am trying to migrate to the latest version of CocoaPods from 0.39. Here is my original podfile:

platform :ios, '10.0'
use_frameworks!

target 'MyApp' do
    pod 'SwiftyJSON'
    pod 'Alamofire', '~> 4.0'
    pod 'AlamofireImage', '~> 3.1'
end

target 'MyAppWatchKitApp' do

end

target 'MyAppWatchKitApp Extension' do

end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '3.0'
    end
  end
end

After reading the CocoaPods 1.0 Migration Guide and this StackOverflow post I tried updating my podfile:

platform :ios, '10.0'

target 'MyApp' do
    use_frameworks!

    pod 'SwiftyJSON'
    pod 'Alamofire', '~> 4.0'
    pod 'AlamofireImage', '~> 3.1'

    target 'MyAppWatchKitApp' do

    end

    target 'MyAppWatchKitApp Extension' do

    end

end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '3.0'
    end
  end
end

Saving the podfile, running pod update in Terminal, then opening and building the project, I see the following error (client name censored, replace with "MyApp" to match pod files above):

Screenshot of error

Other things I've tried:

  • Doing a pod install in addition to pod update
  • Deleting derived data

I have some good experience with Swift and Xcode but pods are still relatively new to me. Maybe I'm missing something very basic. Any help is greatly appreciated!

Community
  • 1
  • 1
Austin Wood
  • 368
  • 1
  • 4
  • 14

1 Answers1

-1

Add this line to your post install step in the Podfile. config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'

  • Thank you for your response. I put your code immediately after the line `config.build_settings['SWIFT_VERSION'] = '3.0'` in the podfile, then ran `pod install` and `pod update`, cleaned and build my project, but still see the same error. – Austin Wood Nov 22 '16 at 19:51