Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does the iOS simulator require i386 and x86_64 symbols even though I'm on an x86_64 system only?

I'm trying to get an app running on the simulator that has had some problems doing so before. We don't have libjpeg.a built for i386, but it does have x86_64. This is the only dependency left, but I'm wondering why I actually need i386 symbols, if I'm running on an x86_64 mac.

like image 488
Joey Carson Avatar asked Jan 19 '15 21:01

Joey Carson


People also ask

What architecture does iOS simulator use?

Up until Xcode 12 and iOS 14. x, all simulators were running as x86_64 binaries. From that point, NEW simulators only (>iOS 13.7) have both the so-called x86_64-simulator and arm64-simulator architectures. The arm64-simulator architecture being used only on the new M1 CPU and later.

What is architecture x86_64?

x86_64 is the architecture of Intel's 64-bit CPUs, sometimes also simply referred to as x64 . It is the architecture for all Intel Macs shipped between 2005 and 2021. arm64 is the architecture used by newer Macs built on Apple Silicon, shipped in late 2020 and beyond.

Is iOS simulator like the hardware?

An iOS Simulator basically mimics an iOS app or browser on top of a developer's operating system. This is viewable in an iPad or iPhone like window. They cannot virtualize the actual hardware conditions of an iOS device, which is the main requirement for comprehensive testing and debugging.

How do you enable simulation on iPhone?

To launch a Simulator without running an appChoose Xcode > Open Developer Tool > Simulator. Control-click the Xcode icon in the Dock, and from the shortcut menu, choose Open Developer Tool > Simulator.


2 Answers

The iOS simulator can run your app in 32 and 64-bit modes. This allows you to work out a lot of 64-bit issues and make sure it is ready for both armv7 and arm64. To do this, it compiles your app for i386 and x86_64 and requires the libraries for both architectures.

like image 50
Variable Length Coder Avatar answered Sep 28 '22 02:09

Variable Length Coder


iOS apps need to run on many different architectures:

arm7: Used in the oldest iOS 7-supporting devices arm7s: As used in iPhone 5 and 5C arm64: For the 64-bit ARM processor in iPhone 5S i386: For the 32-bit simulator x86_64: Used in 64-bit simulator 
like image 38
Naishta Avatar answered Sep 28 '22 03:09

Naishta