6

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 2

3

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for this, it turned out though that just updating the pods was not enough. I used 'pod deintegrate, pod install, pod update' to clear up the error
0

IMPORTANT:

The following solution is just a workaround in a case when your project is using any third-party library which actually doesn't support the architecture. As mentioned by @itskoBits performance issue is a real thing in this case.

Open your finder

Go to

Applications -> right-click on Xcode -> select get info

under the general tab, make sure Open using Rosetta option is selected for M1 mac.

enter image description here

1 Comment

I just wanted to point out that this has a significant performance penalty. In our app we tried this as a solution for failing snapshot tests and the penalty hit was ~50%.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.