I recently bought a new M1 Macbook specifically for IOS development. Upon setting up my workspace with cocoapods and xcode I found that I am not able to test my app in the simulator. I’ve seen some solutions already where people suggest to add arm64 to the list of excluded architectures. But it does not seem to work. I believe that that’s a solution for intel macs and not M1 since M1 is arm64.
Here is the full error code
in /Users/michaellam/Documents/GitHub/Send-Story/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector(FIRAnalyticsConnector_a8eeba373b74508311b8b22b8d3202a6.o), building for iOS Simulator, but linking in object file built for iOS, file ‘/Users/michaellam/Documents/GitHub/Send-Story/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector’ for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
2
Answers
Run
pod update
to update to the latest version of FirebaseAnalytics – currently 7.7.0 – which fully supports M1 Macbook development.More details about when the Firebase support was added in the release notes.
IMPORTANT:
Open your finder
Go to
Applications
->right-click
on Xcode -> selectget info
under the general tab, make sure
Open using Rosetta
option is selected for M1 mac.