Using CocoaPods stops iOS build

I have added CocoaPods to my iOS platform build, then I added a SDK to the PodFile, all installed with no issues.
now when I try to run ionic run ios I get this error:

ld: library not found for -lPods
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is it a known thing, all the libraries that I have installed are standard stuff nothing fancy.

1 Like


Did you find the solution to your problem?
I have the same problem as you.



I have the same problem, its cause that I build the xcode project not workplace.

I am also facing the same issue is there any option to resolve this

This was a longtime ago, No respond, this is the biggest downside of using ionic.

As far as I remember I couldn’t find the solution anywhere so I found a plugin for the Cordova then I think I installed it that way. That plugin costed me I think about $600.00 US at the time ( It was Geo Fencing ).

Good Luck.

Can you please provide any URL regarding that plugin


Thank you sooo much Houman kargaran.

The issue that causes the build to fail is that once you start using CocoaPods you have to build the project .xcworkspace not the .xcodeproj.

I created a plugin that makes supporting CocoaPods simple by just adding a in your config.xml or plugin.xml. The plugin handles the creation of the Podfile and fixes the build scripts used by the ios platform.

Check it out

1 Like

Cool. I might use it on my next project. BTW ionic native i think solved this issue from the source. I was reading that it can support the plugins easily. I haven’t used it yet though.

I am trying to include the pod ‘Charts’, ‘~> 2.2’ in my project which is actual in Swift, using cordova plugin cordova-plugin-cocoapod-support, still not able to create the iOS project without errors, I added cordova plugin cordova-plugin-add-swift-support also but facing same error. Please help me

Error: Command failed: pod update

I’ll look into it. Can you create a bug in the github project? Thanx.

@shashanksakala The issue is that in order for Charts to build without manual intervention the ios version in the Podfile needs to be 8.0 or higher and use_frameworks needs to be enabled.

I have added support for setting the ios version and enabling frameworks in the config.xml.

Update to version 1.2.5 of the plugin and add the following to the ios platform section of your config.xml.

<preference name="pods_ios_min_version" value="8.0"/>
<preference name="pods_use_frameworks" value="true"/>
1 Like

ThanK you very much, its working for me.

This solved the issue for me! Thanks

I am not using Cocoa Pods for my Ionic2 iOS build. I need to add Firebase Authentication to the project. Do I need to use Cocoa Pods?

see: Google/Firebase Authentication no displayName or photoURL for iOS