TheJokerAEZ
TheJokerAEZ

Reputation: 361

Xcode /Podfile.lock: No such file

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.

Upvotes: 19

Views: 53371

Answers (9)

Kevin Wiggins
Kevin Wiggins

Reputation: 544

I encountered an issue when integrating Firebase Storage into my Flutter project. The error was related to Firebase pods not being properly linked, and after trying several solutions, I found that the following steps resolved the problem:

Delete the Podfile.lock and Podfile:

rm ios/Podfile ios/Podfile.lock

Reinitialize the CocoaPods setup by running pod init to create a new Podfile.

cd ios
pod init

Reinstall Pods: Finally, run pod install to install the necessary pods, including Firebase.

pod install

After following these steps, Firebase Storage integrated correctly, and the errors were resolved. This approach essentially resets the CocoaPods configuration, allowing a clean installation of the dependencies.

Upvotes: 0

Paul Schorey
Paul Schorey

Reputation: 1172

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

Upvotes: 0

Lee Toan
Lee Toan

Reputation: 46

My case, Please:

  1. Xcode → File → Workspace Settings.

  2. Make sure in tag: Build System → New Build System.

  3. Please copy your Podfile.

  4. Delete Podfile, Podfile.lock, Pods Folder in your root app folder, like this.

  5. Next Step, Open <YourProject>.xcodeproj. You should use Terminal by: open <YourProject>.xcodeproj. (Remember not .xcworkspace)

  6. In Pods tag, delete these files, like this:

    • <Pods-YOURPROJECT>.debug.xcconfig
    • <Pods-YOURPROJECT>.release.xcconfig
  7. Pod init and Pod install your Project again.

  8. Open <YOUR PROJECT>.xcworkspace, with Terminal: open YOURPROJECT.xcodeproj

  9. CMD+SHIFT+K to clean build.

  10. CMD+B to build again.

  11. Enjoy

Upvotes: 1

iOS
iOS

Reputation: 3616

In my case, I updated cocoapods and the problem was solved.

gem install cocoapods --user-install

Upvotes: 1

Praful
Praful

Reputation: 17

Easiest Solution which worked for me:

  1. Open terminal inside your project directory
  2. Change directory to 'ios' (cd ios)
  3. Type 'pod install' and wait for dependencies getting downloaded and installed

I hope this will help someone out!

Upvotes: 0

anas.p
anas.p

Reputation: 2286

If you are setting up environment setup in your project, you have to choose corresponding pods target in configuration.

enter image description here

Upvotes: 25

Santosh
Santosh

Reputation: 591

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.

Upvotes: 0

Venu Gopal Tewari
Venu Gopal Tewari

Reputation: 5876

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.

Upvotes: 8

Joe
Joe

Reputation: 4074

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.

Upvotes: 7

Related Questions