DAZN Engineering
Published in

DAZN Engineering

Transition to M1 based machines from a developer’s perspective

Two years ago Apple introduced their own chip for Macs which is known as M1. Also, there are more powerful chips M1 Pro and M1 Max which could fit even highest professional requirements like rendering video or complicated graphics based operations. This is cool, fast and quiet and we can say that we have iPhone CPU (based on AX chips) in our computers.

From a non-developer’s perspective there is no huge difference to other computers in efficiency in a day-to-day work besides work ergonomy e.g. sound (some machines like MacBook Air are even fans-free).

Mobile developer’s perspective:

From developer’s perspective using M1-based machines could significantly speed up the development process.

What does it mean?

Let’s look at some stats I collected during my tests.

Build DAZN iOS app in Xcode

Intel based Mac: 20 min. 15 sec.

M1 based Mac: 2 min. 30 sec.

Rendering 5 mins long video in iMovie

Intel based Mac: 15 min.

M1 based Mac: 30 sec.

It is also worth mentioning that during that time computer did not make any single sound.

Unfortunately, not all tools and other development stacks are yet supported on M1 based machines and on this page you can check if a tool is supported natively on M1 or not: https://isapplesiliconready.com/

What if your tool is not supported yet?

There is a tool called ‘Rosetta 2’ which emulate Intel environment on M1 mac and some apps could be started using this emulator. You may wonder about performance but running on Rosetta 2 is faster than running natively on Intel mac.

How to prepare Xcode project to work on M1 Macs?

As iOS team we followed the below process. The simplest solution is to use tools provided by Apple e.g. Swift Package Manager and XC Frameworks to manage dependencies. But no all third party dependencies are provided as XC Framework or SPM. In that case you need to use open source tools to make XC Frameworks from old fat binaries.

Here is one example of such a tool:
https://github.com/darrarski/xcframework-maker

which takes fat framework and make XC Frameworks (Universal binary) from.

Web developer’s perspective:

As you can see, preparing Apple related project to development on M1 was quite simple but what about the rest of our magicians like web developers?

It is also possible and development ready as well. Here you can find a useful article about it:

Summary:

I think it is time to switch to M1 machines and push forward the open source community to make the tools compatible and reliable.

Basing on my tests I can say that for now I didn’t find anything which does not work on M1 machine or causes any big issues.

Here you can find some further useful tips to work on M1 Macs:
https://www.xda-developers.com/first-10-things-to-do-m1-mac/

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store