I have created a new ionic react project based on the templates on the ionic website and also added capacitor ios. When I open my project and try to run it in Xcode I get the following errors as attached in the image. Wondering if anyone can help with this.
Thanks
CodePudding user response:
This is because your Podfile hasn't been updated.
You need to run:
npx cap update ios
then:
npx cap build ios
This will force refresh the Podfile for you.
If this doesn't work, you should try deleting your iOS folder within your IDE and reinstalling with:
npx cap add ios
or ionic cap add ios
then:
npx cap build ios
or ionic cap build ios
.
Mac with Apple Silicon (M1)
The above is still correct, but there is a bug within CocoaPods which will prevent you from installing it correctly and therefore run these steps first:
sudo arch -x86_64 gem install ffi
then:
arch -x86_64 pod install
This will simulate Intel architecture and allow you to install the pods.