12

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.

Ratnesh Gupta
  • 121
  • 1
  • 1
  • 5

3 Answers3

11

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

River2202
  • 1,225
  • 13
  • 22
  • Not sure why Xcode allows editing this line as a string, you should not do that, double tap to get a pop-up. – MikeL Nov 23 '22 at 04:39
3

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

Zain Ahmed
  • 179
  • 2
  • 3
  • It not work for me – phuocantd Nov 14 '22 at 14:38
  • phuocantd try second as i describe in 2nd image its work for me – Zain Ahmed Nov 15 '22 at 15:51
  • 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 me – phuocantd Nov 16 '22 at 16:14
  • 3
    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? – Jose Flavio Quispe Irrazábal Dec 02 '22 at 03:58
0

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'
nPn
  • 16,254
  • 9
  • 35
  • 58