Mac M1, Ionic, VueJS, SQLite, IOS Simulator
Source: https://www.angularfix.com/2022/01/ionic-application-xcode-build-errors.html
Prerequisites:
- XCode installed and up-to-date
- Ionic Project setup
Using these commands, I was able to use the simulator:
softwareupdate --install-rosetta
sudo gem install cocoapods
sudo arch -x86_64 gem install ffi
rm -rf ios/
ionic cap add ios
pushd ios/App
arch -x86_64 pod install
popd
npx cap open ios
References:
- SQLite: https://github.com/capacitor-community/sqlite & https://github.com/capacitor-community/sqlite/blob/master/docs/Ionic-Vue-Usage.md#vue-sqlite-hook-declaration-for-platforms-including-web
- Capacitor: https://capacitorjs.com/docs/ios#adding-the-ios-platform & https://capacitorjs.com/docs/getting-started/with-ionic
- composables/state.js: https://github.com/jepiqueau/vue-sqlite-app/blob/main/src/composables/state.js