I'm working on an Ionic React Project
running on top of Capacitor
. I added Android platform and everything went smoothly. Now that I'm trying to make my app work in iOS (first time working with iOS), after adding ios platform and open my project in XCode, I ran into some issues.
See the errors:
Podfile content:
Any help would be really appreciated. Thank you!
For anyone interested, I deleted ios folder and added iOS platform again. After that, instead of running 'pod install
' (I got errors via this command), I used these commands:
in regular terminal, outside the Project directory:
sudo arch -x86_64 gem install ffi
then inside iOS folder
arch -x86_64 pod install
After these commands, all capacitor pods/plugins got installed successfully. I opened the app using this command: ionic cap open ios
and got an error: No module Capacitor found
, but anyway I ignored this error and ran/build the app inside XCode. The emulator got opened successfully and the app ran smoothly.
I faced the same problem today. After doing some research I finally made my project work on iOS! I am using Angular version 9. I could not run the XCode project since ionic would not create the required podfile. I simply created the iOS app with npx first and then used ionic to run a live reload of my app. The commands are the following:
npm install @capacitor/ios
npx cap add ios
ng build
(creates the www directory)npx cap open ios
ionic capacitor run ios --livereload --external
(Sources: npx and ionic)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With