I'm building an app on an M1 Mac. I added a pod, Swift Package, or framework, attempted to use an object from it, and when I built my project, received this error. I've tried a number of things including changing build settings and deleting the derived data folder. The problem persists no matter what I try
2 Answers
This error seems to occur when a pod or framework isn't ready for the M1 processor yet. Resolving the error varies depending on if it's a pod or framework/Swift Package. Once you remove the offending package/framework/pod, it may be worth trying again if you really need it, sometimes the bug is intermittent.
Either Method (do this first!)
Sometimes this error is resolved without removing a pod or framework.
- Clear your Derived Data folder
- Clean the build folder with
shift+cmd+k
Cocoapods
It seems to be necessary to deintegrate pods, remove the Podfile.lock
, take the offending pod out of your Podfile
, and reinstall pods.
From Terminal:
pod deintegrate
rm Podfile.lock
nano Podfile
nano
can be replaced with your text editor of choice. You just need to remove the offending Pod
pod install
Framework/Swift Package
- Click on your project file in Xcode (the blue icon)
- With the target selected that contains the framework, click on General
- Scroll down to
Frameworks, Libraries, and Embedded Content
- Click on the offending Framework
- Click on the minus icon at the bottom of the list
- Click
Delete
in the confirmation dialogue
Finish Up
No matter the method you choose, it's a good idea to:
- Clear your Derived Data folder
- Clean the build folder with
shift+cmd+k
- Reach out to the framework/pod author and ask them to update it for M1 support
- File a bug report with Apple

- 1,747
- 2
- 17
- 40
I am using Firebase with Swift packages (and I have the m1), and this resolved the issue for me:
File -> Swift Packages -> Reset Package Caches
I did this after a hard restart and cleaning the build folder. All good now.

- 3,352
- 4
- 26
- 48
-
This normally fixes the problem and derived data only needs to be cleared sometimes, so I'm making this the accepted answer – froggomad Aug 02 '21 at 15:21