Code signing "capacitor.framework" failed on Macbook M1

I am unable to archive my app on Mac M1 machine.
There are a couple of apps that I published on apple store. On the new M1 machine I am able to build these ionic apps and deploy them on my phone using Xcode. However when I am trying to archive the apps both the apps are giving this error. “Code signing “capacitor.framework” failed”.

If anyone else encountered this issue kindly request for help.

I had to disable “Include bitcode for iOS content”.

1 Like