Apple Silicon, an iOS developer perspective

Nicolas Fontaine
Ideas by Idean
Published in
5 min readJan 26, 2021

In June 2020, during its WWDC (Worldwide Developers Conference), Apple officially announced its severance from its computer processor provider: Intel. A long awaited change by users of the brand as it represents a true renewal of the Mac.

With more than ten year of Research and Development in ARM processors and a confortable advance in this market, especially thanks to the iPhone, Apple will be a real precursor by integrating this technology in its computers. This decision matches Tim Cook’s ambition as he frequently stated that “Apple has a long-term strategy of owning and controlling the primary technologies behind the products we make.”

Shy attempts had been made by Microsoft not long ago, yet these didn’t have much of a market impact. Apple’s decision to make ARM a standard for the Mac is then a real technological bet that started with the M1 chip released on a new set of Mac mini, Macbook Air and Macbook Pro 13" in November 2020.

Source: Apple

What is ARM?

It’s an external architecture simpler than other processor families like Intel and AMD’s x86 architecture. Imagined in 1983, ARM is popular for its low power consumption that made it the dominant architecture in the field of embedded computing: smartphones, tablets, connected objects…

The progress made with the ARM architecture in terms of performance today allows Apple to compete with the power of high-end x86 processors with better results in terms of energy consumption. A real opportunity that Apple has chosen to seize to restore the image of the Mac, long seen as less powerful than cheaper PCs.

Roseta2: Key of success

Switching the Mac to an ARM architecture is not an easy task. Indeed, MacOS softwares have been compiled for Intel processors for more than 15 years. Even though Apple has offered developers tools to migrate very easily, it is unimaginable that it will be done in a day. In order to ensure a painless transitions for users, they needed a way to run x86 applications on these new processors. This is where Roseta2 comes into play, this tool allows a stable conversion with a sufficiently low performance loss in order not to impact the user experience while the software evolves towards the new architecture.

Roseta2 is impressive and most Intel applications run smoothly. Personally, I haven’t encountered any major compatibility issues for softwares I use everyday.

First impression of an M1 Mac

It’s amazing! On a Mac mini worth about 1,000 € with an Apple Silicon M1 chip and 16gb of ram, we achieved better performance than our Macbook with a value 2 to 3 times higher. We tested this on multiples non-ARM software, meaning we haven’t seen it’s full potential yet on these applications. Even more incredible, the Mac mini gives off so little heat that even during intensive tasks, the fan never turns strong enough to be audible and the machine remains cold to the touch. A good way to witness that, as stated by Apple, the power consumption is way lower than on our usual machines which turns into real airplanes on take-off at the slightest complex task.

An iOS developer feedback

Xcode

Xcode is far from being a light and stable IDE (Integrated Development Environment) much to the dismay of iOS developers who are used to the vagaries of the software, especially on a large project with multiple objective-c and swift libraries. Of course, the switch to this M1 chip wasn’t a revolution on that score, but the speed of indexing, compilation, auto-completion, and all those little day-to-day tasks is much better. A real gain in daily productivity and this is only the first generation of these new chips.

Eg: on our biggest project at Idean, the compilation time goes from ~2 minutes per build on a high-end 2017 macbook down to ~35 seconds on this new and cheaper machine… Promising!

Of course, these performance gain will also be felt on many other softwares as they are made compatible. We can therefore bet that any developer working on MacOS will benefit from this eventually.

Migration

This is where the troubles begin. Apple’s promise of a painless migration for all was almost kept, but a bit utopian all the same. As a matter of fact, we would quickly realize that we have to do some manipulations and wait for updates for tools and frameworks in order to work properly.

Examples :

  • Cocoapods, a well known by iOS developers utility, will not work correctly before having done some manipulation to force one of its dependencies (“ffi”) to run through Roseta. Obviously this problem will end up being fixed over Cocoapods updates in the future.
  • Precompiled libraries embedded in your project may not work with newer iOS simulators now running arm64 instead of x86_64. It will then be necessary for your library’s supplier to recompile it so that it can work on these simulators, which will possibly imply that you have to update a library you didn’t initially wanted to update. Otherwise, you will need to use Xcode in backward compatibility mode using Roseta. Thus losing some of the performance promised by the native ARM.

Not quite there yet…

Some problems that we have encountered have not been solved by “hacking” our way through. This is particularly the case with the incompatibility of the pre iOS 14 simulators which will make your application crash as soon as you use WebKit for exemple. This problem is known to Apple and is slow to be resolved… A real pain for an iOS developer, especially when we consider the fact that it is most often impossible to revert to an earlier version of iOS on a physical device. This kind of problems where you can only wait and cross your fingers, you have to be prepared to deal with for a few month until the whole “switching to ARM” phase is over.

Looking towards the future

A M1 Mac, although a very good investment, is not yet the dream playground for developers as they will encounter many small difficulties which, put together, can put off more than one. However, the start is promising and we are eager to see how the Apple product line will evolve. We shall soon see more advanced versions of these chips arriving on more high-end products (for example the Macbook 16"), which could be a real revolution in terms of performance regarding what the “low-end” (we’re only talking about price here) M1 chip can achieve. By then, a lot of additional software would have been migrated as the experience on these machines will only be enhanced to our delight.

Written by: Nicolas Fontaine, iOS tech leader at Idean France.

--

--

Nicolas Fontaine
Ideas by Idean

iOS technical leader at Idean, living in Montpellier, South of France