Workspace warning : Target Pods cannot link framework Foundation.framework

426 Views Asked by At

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.

1

There are 1 best solutions below

0
Daniel Storm On BEST ANSWER

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