Ionic 4 capacitor Cocoapods not working

When I try ionic cap sync, I get the error:

Cocoapods could not find compatible versions for pod “Capacitor” in profile: Capacitor (from ‘…/…/node_modules/@capacitor/ios’.

I did pod repo remove master then pod setup which worked fine. The final pod install failed with the message

No `Podfile’ found in the project directory

This worked with OS X High Sierra. Now I’m on Mojave and already had to downgrade node to 10.13.0. Anybody have an idea what this new problem has to do with and especially how I can install a podfile in my project directory (from which I did remove and setup)? Thanks!

Ionic:

ionic (Ionic CLI) : 4.4.0
Ionic Framework : @ionic/angular 4.0.0-beta.13
@angular-devkit/build-angular : 0.7.5
@angular-devkit/schematics : 0.7.5
@angular/cli : 6.1.5
@ionic/angular-toolkit : 1.2.0

Capacitor:

capacitor (Capacitor CLI) : 1.0.0-beta.7
@capacitor/core : 1.0.0-beta.7

System:

NodeJS : v10.13.0 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS

Do you have an iOS platform? maybe try to clear it and create it freshly (if you don’t have manual change in it)?

rm -r iOS
npx cap add ios
npx cap sync
npx cap add ios

gives the same error.

Freak. Somewhere I remember that I faced that issue once but can’t remember how I fixed it. In my case I know that I was looking to update POD etc. and that I spent time trying that but that at the end that wasn’t the error, it was something trivial somehow I think. Don’t know if it’s the same for you…sorry for not remembering better

Thanks for trying, reedrichards! There must be a problem with Cocoapods. When update or upgrade didn’t work, I did pod repo uninstall master then pod setup. Next would have been pod install which again gave the no podfile error. I wonder if I shouldn’t change to Win 10 with Capacitor. Mojave is quite new, Capacitor and Ionic 4 are on Beta, iOS is often a problem … Maybe I just stay with Corodva until the integration of Capacitor into Ionic 4 is working properly.

Ummm don’t think Mojave should have a bad effect on Capacitor. Maybe try the Slack channel (https://getcapacitor.herokuapp.com/) or the forum of capacitor (https://forum.getcapacitor.com) to get more help first?

hi @swissfritz, i had face the same issue, and after a lot of time finding an answerd, i figure out that its a problem with the last version of capacitor ios 1.0.0-beta.11 that is unsupported by cocoapods or i dont know, but i force in my package.json the @capacitor/ios to 1.0.0-beta.8 and reinstall everything again, and that works, and another things i realized, is everytime you run your npx cap add ios, the package.json is updated in the capacitors dependencietes with the “^”, so, maybe, if you run this command twice, it will update again to 1.0.0-beta.11 and the problem will back again, now i have to find the way to keep the package json with the version of capacitor/ios 1.0.0-beta.8, but for now, i can make this kind of workaround to still doing my development,
i hope this help you!

Hi rabs199122, Just yesterday, I started a test app containing only the capacitor camera and everything worked just fine with capacitor 1.0.0-beta.13 on my macbook pro with mojave. It may be worth a try to start a new project with just the camera and then just draping all the rest around it.

I faced with the same issue.

OS: OSX Mojave

Yesterday it worked with a demo app but now with a new app it show that error.