3

When building the workspace throws a warning:

Target Pods - {AppName} product Pods_{AppName} cannot link framework Foundation.framework

Screenshot

This started after updating to Xcode 9.4. I updated CocoaPods to the latest version, v1.5.3, but it didn’t resolve the warning.

Daniel Storm
  • 18,301
  • 9
  • 84
  • 152
Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177

1 Answers1

4

This is due to using the new build system in Xcode. The issue has not been resolved in the latest version of CocoaPods yet, v1.5.3 as of writing this.

For now, you can resolve the warning by adding this post_install action to your pod file:

post_install do |installer|
    podsTargets = installer.pods_project.targets.find_all { |target| target.name.start_with?('Pods') }
    podsTargets.each do |target|
        target.frameworks_build_phase.clear
    end
end

After updating your pod file run pod install again.

Source: CocoaPods: Cannot link framework Xcode warning

Daniel Storm
  • 18,301
  • 9
  • 84
  • 152