Ionic 4 capacitor Cocoapods not working


#1

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


#2

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

#3
npx cap add ios

gives the same error.


#4

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


#5

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.


#6

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?