Andrew Fletcher published: 4 May 2022 1 minute read
In Xcode attempting to build or run an app, I receiving a framework error.
| Software / package | Version |
|---|---|
| Xcode | 13.2.1 |
| @capacitor/cli | 3.4.3 |
| @capacitor/haptics | 1.1.4 |
| ionic | 6 |
| @angular/core | 13.3.4 |
Previously, I had added via npm the following
npm i @capacitor/haptics
Whilst I had added the haptics package, then built and synchronised the code using
npm run build
npx cap sync
npx cap copy ios
npx cap open ios
How to fix this issue
This error is a result of my Podfile not being updated. To fix this you need to run:
npx cap update ios
npx cap build iosThis will force a refresh the Podfile. However, if this doesn't work, try deleting your iOS folder within your IDE and reinstalling with:
npx cap add ios
npx cap build iosor:
ionic cap add ios
ionic cap build ios
Using a newer Mac (M1 chip)?
While the above steps are on the mark. If you have a Mac with M1 chip, first you will need to run:
arch -x86_64 gem install ffi
arch -x86_64 pod installThis will simulate Intel architecture and allow you to install the pods.