Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Workspace warning : Target Pods cannot link framework Foundation.framework

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.

like image 946
Jayprakash Dubey Avatar asked Apr 19 '26 22:04

Jayprakash Dubey


1 Answers

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

like image 85
Daniel Storm Avatar answered Apr 23 '26 01:04

Daniel Storm