3

I have created an ionic Project. I build the app and its working perfectly using Ionic CIL. Now using cocoapods, I created a pod file and loadded the required pods and did pod install.

Now when I try to run ionic run/build 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)

Error code 65 for command: xcodebuild with args: -xcconfig

Command failed with exit code 2

Please help me ...

2 Answers 2

4

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 https://github.com/blakgeek/cordova-plugin-cocoapod-support. to support fo swift also, 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"/>
Sign up to request clarification or add additional context in comments.

3 Comments

if any once have better option pleasse suggest
If you are using Ionic2 with Firebase Auth and building for iOS via Xcode, do you have to use Cocoa Pods? stackoverflow.com/questions/42736623/…
I am not used Ionic 2 with cocoapods
0

You have to remove your iOS platform and then add the 5.0.0 version like this:

ionic cordova platform remove ios
ionic cordova platform add [email protected]

Hope that helps.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.