Skip to main content

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 ios

This 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 ios

or:

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 install

This will simulate Intel architecture and allow you to install the pods.

Related articles

Andrew Fletcher31 Oct 2023
Android icon not changing
If the Android app icon is not changing from the default icon (in my situation this was the Capacitor icon), here are some steps to troubleshoot and resolve the issue: Check the Icon FilesEnsure that you have provided the correct icon files in the appropriate directory. In a Capacitor project,...