Step 1.) Delete your iOS, Android & Node modules folder
rm -rf android && rm -rf ios && rm -rf node_modules
Step 2.) Adjust your package.json to include the following:
"@capacitor/android": "^2.4.5",
"@capacitor/core": "2.4.5",
"@capacitor/ios": "^2.4.5",
Step 3.) Install dependencies and add the platform(s) again
npm install
ionic cap add ios
ionic cap add android
Step 3.) Ensure your typescript version is downgraded too
npm i typescript@~3
Step 4.) You must have a build in the www folder, which upgrading to Capacitor may cause havoc for. So, important steps:
npm run build
npx cap sync
npx cap copy ios
Once you go into XCode (ionic cap open ios
) go into the App, TARGETS App > Signing & Capabilities & select your team.
Go ahead and prep your iOS for running:
ionic cap run ios --livereload --external --device --consolelogs --verbose
Done. 🚀
Then click the Play button in iOS. I might update this file when I get to the Android bit.