Building for iOS Simulator, but linking in object file built for iOS in xcode
Asked Answered
I

5

16

System specification: Mac-in-cloud (v 12.3.1) 8 GB. XCODE 13.4

Few months ago we had created a project in xcode on mac-in-cloud. It was working fine and we pushed it on git then rented another mac-in-cloud to test even then project was working fine.

Now a bug come in our app so we rented another mac-in-cloud, pulled code and try to run it but getting this error:

Building for iOS Simulator, but linking in object file built for iOS, file '/Users/user220716/Desktop/Project/[project_name]/platforms/ios/Pods/GoogleMaps/Maps/Frameworks/GoogleMaps.framework/GoogleMaps' for architecture arm64

I tried many solutions of similar questions even some same questions like this and this. But problem didn't solved.

Thank you in advance.

Infield answered 7/6, 2022 at 10:18 Comment(0)
M
20

The second link in your question should be the same problem you have. The solution is basically add arm64 to Excluded Architecture.

enter image description here

Monocoque answered 26/8, 2022 at 22:44 Comment(2)
Not sure why Xcode allows editing this line as a string, you should not do that, double tap to get a pop-up.Palmetto
it's worked for meDrapery
D
9

This is an old question, but I ran into it while migrating from an intel based Mac to an M2 based Mac.

While there are many questions with a similar issue, for example this one, most of those seem to be related to intel based Macs running on Xcode versions supporting Apple Silicon.

This particular question mentions GoogleMaps which is the same library I had an issue with. During my research I found this issue opened on GoogleMaps that explains the issue along with some possible solutions, which for me would have required a manual installation of the library.

enter image description here

I was able to resolve my issue by simply changing my Podfile to use version 8 of GoogleMaps.

pod 'GoogleMaps', '~>8.0'
Diazomethane answered 18/6, 2023 at 15:1 Comment(0)
B
5

After a hour's search below solution work for me enter image description here

if Above one not work try this only its work for me go to finder -> Applications -> xcode (right click on xcode got to get info and check mark the option open using roseeta) again open the XCODE enter image description here

Barrie answered 7/11, 2022 at 16:2 Comment(4)
It not work for meHowzell
phuocantd try second as i describe in 2nd image its work for meBarrie
I add installer.pods_project.build_configurations.each do |config| config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" end in Podfile and it work for meHowzell
It worked for me but what is the explanation? I mean, iOS on iPhone and the simulator on M1 Mac run on the same architecture (arm64), right? Why should I exclude arm64 for the simulator build? Is XCode on M1 Mac running simulators using x64 arch? 🤔Trask
H
0

I made Build Active Architectures from YES to NO in the build settings for the project and then Xcode 15 asked me if I want to run with Rosetta simulators, I said "hell yea!". Then the build failed. But I switched Build Active Architectures back to YES and running it still with Rosetta worked. The issue I have is GoogleWebRTC not building in non Rosetta simulators in Xcode 15.

Hippomenes answered 9/12, 2023 at 23:33 Comment(0)
O
0

After using a lot of solution nothing work for me, if add arm64 iOS archive failed and if remove arm64 then failed to run on iOS Simulator :-(

easy and technical solution 

enter image description here

Octavie answered 24/1 at 6:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.