SwiftUI previews not working when using Firebase/Analytics pod
To exclude the arm64 architecture only when running on a simulator, add the "Any iOS Simulator SDK" qualifier in the build settings. Then you won't have to remove this setting when testing on a physical device.
To add the qualifier, click on the little plus button, as shown.
The following workaround (credit to user on Apple Developer forums) worked for me:
Add "arm64" to the excluded architectures for the debug scheme for any targets that have Firebase Analytics.
This will cause you problems if you need to debug to an actual iOS device, obviously. But you can remove it when you need to test on a device.
How to Add arm64 as an Excluded Architecture
The accepted answer also worked for me. But I didn't know how to do this as I have never done it before so I wanted to show you the steps I took to accomplish this.
- Select your project in the Project Navigator
- Select your project in the Project Settings
- At the top, select "Build Settings"
- Then select "All" to show all build settings
- At the top, you will see a section called "Architecture". In this section is "Excluded Architectures". You want to expand this. And then next to Debug, double-click, and type in "arm64".