20

Before I integrated Google Places in my app, I had no problem running it on simulators, but now I can run my app only on physical devices. I tried excluding arm64, like it was suggested in many answers, but no luck. Full error below:

building for iOS Simulator, but linking in object file built for iOS, file '/Users/davitmuradyan/Documents/DigiSoft/trip-share-ios/TripShare/Pods/GoogleMaps/Base/Frameworks/GoogleMapsBase.framework/GoogleMapsBase' for architecture arm64

koen
  • 5,383
  • 7
  • 50
  • 89
NoName555
  • 235
  • 1
  • 3
  • 8
  • If you try to run the simulator on an M1 machine, you need to expect tools to assume that simulator = x86 and get confused unfortunately. – gnasher729 Nov 14 '21 at 13:42

4 Answers4

43

This will do for now

  1. Find Xcode in your Applications folder.
  2. Select the app, and then press Command-I (or right-click/use the File menu and select Get Info.). This will open an Info window with details about the app.
  3. In the Info window, look for a checkbox labeled, “Open using Rosetta”. Check the box. here:
  4. Close the Info window.
  5. If you’re already running the app, quit and relaunch.
4

Solution 1: go to build settings > excluded architectures , add arm64 to debug and release

Solution 2: go to Xcode preferences > locations and then delete the derived data file and clean the project and run

Solution 3:delete that framework

Solution 4:use the package installation instead of pod

Shailesh
  • 3,072
  • 3
  • 24
  • 33
2

x86_64 architecture is needed for running the project in the simulator.

arm64 architecture is needed for running the project on a Real device.

You can use the below command to to check whether the Google Place SDK contains x86_64:

lipo -info /Users/XXXXXXXXX/XXXXXXXXXXXX/GooglePlace.framework/GooglePlace

Drag and Drop the SDK File and check.

In case you were added the Google place SDK as static. Please use it through the Pod file.

HariKarthick
  • 1,369
  • 1
  • 19
  • 47
-2

Be careful with excluding architecture - there can be case when it will break the app (best example RNBackgroundFetch - will not work with excluding arm64).

Launching using Rosetta is working perfectly (Applications -> RClick XCode -> Get info -> Check 'Using Rosetta'

  • The first part of the answer should be a comment on the original question (it's not an answer itself), and the second part is a duplicate of the accepted answer but in a less clear (and less visual) way. – ephemer Feb 08 '23 at 22:04