NoName555
NoName555

Reputation: 275

building for iOS Simulator, but linking in object file built for iOS

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

Upvotes: 22

Views: 41482

Answers (5)

blackdn
blackdn

Reputation: 99

For M1 chips, "Open using Rosetta" might work.

But after updating to Sonoma 14.0 (15.0 for XCode), "Open using Rosetta" cannot be found in "Get Info" window.

Alternatively, try:
Xcode -> Product (in the menu bar) -> Destination -> Destination Architectures -> check 'Show Rosetta Destination'

After that, devices in the build list should be able to have '(Rosetta)' in the end , e.g. iPhone 15 (Rosetta)

And the project should be able to run on these Rosetta simulators.

Upvotes: 9

Dmitry Sokolousky
Dmitry Sokolousky

Reputation: 23

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'

Upvotes: -2

Abhi_Gajjar
Abhi_Gajjar

Reputation: 49

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

Upvotes: 5

Albert Mnatsakanyan
Albert Mnatsakanyan

Reputation: 595

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.

Upvotes: 44

HariKarthick
HariKarthick

Reputation: 1497

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.

Upvotes: 2

Related Questions