I am trying to run an ionic app on xcode. But xcode throws an apple match-o linker error. I get this error, when I get this after I have runned the following command:
cordova plugin add phonegap-plugin-push --variable SENDER_ID=5****** --save
I need this plugin, for push notifications. After a research on google, I founded that I need to have Cocoapods installed in the projects. But after installing Cocoapods & pod install. I get the following error, when I start the "project.xcworkspace".
diff: /Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
I tried to rebuild/clean project or install pod again. But it did not fixed for me.
Can someone help me?
EDIT -> new Error
Apple Mach-O Linker (ld) Error Group
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am getting this error, when i have fixed the error with pods.
If you are setting up environment setup in your project, you have to choose corresponding pods target in configuration.
Update your CocoaPods installation first ("sudo gem install cocoapods")
then remove everything related to POD from project directory except .podfile.
Run "pod install" on terminal and open your project using workspace file.
1- Remove PODS folder from project folder and then perform pod install and open project using .xcworkspace file.
If above one don't work, go to Xcode Build phase and check for path in scripts added by PODS(usually with pods word in there title), sometimes for hybrid project the path was not correct for podfile.lock and manifest.lock file lookup in the script.
Easiest Solution which worked for me:
Open terminal inside your project directory
Change directory to 'ios' (cd ios)
Type 'pod install' and wait for dependencies getting downloaded and installed
I hope this will help someone out!
In my case, I updated cocoapods and the problem was solved.
gem install cocoapods --user-install
My case, Please:
Xcode → File → Workspace Settings.
Make sure in tag: Build System → New Build System.
Please copy your Podfile.
Delete Podfile, Podfile.lock, Pods Folder in your root app folder, like this.
Next Step, Open <YourProject>.xcodeproj. You should use Terminal by:
open <YourProject>.xcodeproj. (Remember not .xcworkspace)
In Pods tag, delete these files, like this:
<Pods-YOURPROJECT>.debug.xcconfig
<Pods-YOURPROJECT>.release.xcconfig
Pod init and Pod install your Project again.
Open <YOUR PROJECT>.xcworkspace, with Terminal: open YOURPROJECT.xcodeproj
CMD+SHIFT+K to clean build.
CMD+B to build again.
Enjoy
Last year I had used the similar plugin, when I was working on an App Update, I came to know that this plugin got deprecated. Not sure about the above one.
So I've working using FCM. I had the similar problem while working with FCM. After having spent nearly a day on researching on this I've found a cordova plugin which takes care of pods in cordova.
Plugin name:
cordova plugin add cordova-plugin-cocoapod-support --save
Please Note: After installing this plugin, there's no need of podinit, or opening the pod and installing it. This plugin will take care of it. It will create a AppDelegate inside the plugin folder where it will handle everything - you can retrieve Push Token as well in DEV mode if you wish.
After I installed this plugin and build iOS, there were no issues.
** Note **
Please ensure while working with FCM, no other google plugins are installed, they'll conflict. Earlier I had GoogleAnalytics plugin, as it's now covers within FCM - you can remove Old GoogleAnalytics plugin in order to work with FCM without issues.
For my Cordova project doing pod init in the ios folder fixed the issue.
From your Cordova project root directory you would:
cd /platforms/ios
pod init
cd ../../
cordova build ios
I have been battling with this for 2 days. I converted from static Frameworks to PODS. I had 2 google pods; pod 'GoogleMaps'
pod 'GooglePlaces'.
Very first build it worked fine.
I then added another pod and so ran 'pod update'.
Then when I tried to build it, failed. I tried numerous things, read every post I could find, and finally I uninstalled pod completely, deleted it from the workspace etc. and started again. Same problem.
Obviously running pod update was changing something.
After investigation the variable it was changing was :
Build Active Architecture in the POD Project File.
From my reading, For PODS to work, this variable has to be the same in :
- your project Project File
- your project Target file
- your POD Project File
I had all 3 set to NO.
But when I ran 'pod update' the value in POD Project file was changed.
So after running 'pod update' I changed the value in 'POD Project file' back to NO (for both debug and release), build again and VOILA it works.
What a nightmare that was. Hope this helps someone else.
[!] The target `project name` is declared twice.
when i m trying to update the pod files in the terminal,i am getting the error in the above..kindly help..
i have tried to uninstall and reinstalling the pod files but still giving the same error.kindly give a step by step process as i am new in this concepts.
how can i update my pod files . there is another error that is shown in the app when i run the app.
ld: library not found for -lPods-aditestdemo
clang: error: linker command failed with exit code 1 (use -v to see invocation)
for this i am updating the pod files kindly help me out. what i can do to rum my app.
this is because when you hit update command from terminal, this updates your existing pod file . There is
To remove bug just do :-
(1).delete podfile, podfile.lock, Pods, and your .xcworkspace.
(2).and reinit pod file and install it your project path.
Refer the link this will clear your doubt:-
https://guides.cocoapods.org/using/pod-install-vs-update.html
I installed the Stripe pod into my project, and it was working, but now it decided to stop working. I keep getting this error. What does it mean, and how do I fix it?
Library not found for -IAFNetworking Linker
Linker command failed with exit code 1 (use -v to see invocation)
You must use the new <YourProject>.xcworkspace instead of <YourProject>.xcodeproj.
The xcworkspace contains your project and your pods.
You also can follow this steps:
Uninstall the App from Device or Simulator.
Make sure close all Xcode Projects. (.xcworkspace and .xcproject) (sometimes .xcproject still open)
Run pod install and pod update
Open the .xcworkspace
Clean and Build your Project
After that you should be able to run normally.
I have an error in .xcodeproj:
ld: framework not found Pods (null): Linker command failed with exit
code 1 (use -v to see invocation)
I found the mistake the pod install folder was good, but I have to build the .xcworkspace, but I don't know why they're the error on .xcodeproj, and if it can be a problem on application deployment someone know why they're the error ? How to hide this error ?
Follow this steps:
Make sure close all Xcode Projects. (.xcworkspace and .xcproject) (sometimes .xcproject still open)
Run pod install and pod update
Open the ProjectName.xcworkspace
Clean and Build your Project
After that you should be able to run normally.
As cocoapods states when you setup cocoapods in your projects the first time, you need to use xcworkspace from now on. You can't work on xcodeproj directly. This is because it needs to have both Pods and your app project open at the same time.
Just close your xcodeproj and never open it again. Always open the xcworkspace and always work from there as long as you are using cocoapods in your project.