Big Changes for Apple Developers (and users)

Apple's world wide developer conference WWDC was held in June, as it is every year. Held virtually, which is quite unusual, but for the better i think. Since it's essentially impossible for anyone to actually get into WWDC these days, demand far outstrips the capacity of San Francisco or San Jose conference halls (augmented by the auditorium at the new giant spaceship headquarters in Cupertino).

And mac developers wait anxiously every WWDC to see what surprises the mothership will drop onto their 'held in bondage and indentured servitude code serfs', i mean their application software developers.  I joke, but not really, because apple is notorious about never hesitating to provide their developers with new hurdles to climb if they want to keep their software running on the platform. And many times the hurdles themselves are in support of making the platform more proprietary and closed off from the rest of the world.

And apple did not disappoint this year (WWDC recap here). Lot's of things you would expect, like new ios version for iPhone and iPad, new mac os version, attempts to sell you apple watch, apple tv, apple services, etc. 

And then there was the big surprise, the 'let's transition macs to a new computer chip' bombshell. The big surprise was not really a surprise, not to anyone who has been paying attention.  It's been obvious for years that they would dump Intel at some point and move to apple proprietary ARM RISC chips instead. The ones they already use in iPhones and iPads.
Because they (apple) need to control everything at this point, a condition psychologists clinically call Obsessive Compulsive Personality Disorder (OCPD).  And because they can then also avoid paying Intel for the privilege of buying and using their cpu chips (which are expensive little chunks of silicon), thereby making more profit on the devices they sell to customers that use cpu chips.

So when the iPad was released, the big joke in all seriousness was that it was just a larger iPhone. Because it literally was.  So now, your desktop mac or powerbook mac can also be an even bigger iPhone.  Again i joke, but not really. Because that is the case. Your new ARM chip mac running new Big Sur osx 11 (note that numeral change folks, this is a rare and true transition os release) will now run iPhone and iPad software native on it. 

Of course my other running joke is that all three of these devices (iPhone, iPad, mac (maybe we should just call all macs iMacs now to get with the program)) are just dongles for the apple credit card, which is really the core product of the company at this point (re-occurring services now are more than 20% of apple's revenue and growing).

Full disclosure: Having been an apple software developer for over 30 years, i now suffer from apple developer PTSD. I am an apple developer PTSD victim.  From having been subjected to mental and psychological trauma caused by being an apple software developer. Again, kind of a joke, but not really. But i provide full disclosure of this so you can weigh my opinions on all things apple accordingly.

There are actually a lot of cool things to say about potential macs based on ARM RISC chips.  Intel has been notorious recently about being late to the table with new faster cpu chip releases.  Leaving their respective Intel cpu based hardware platforms waiting in the lurch, late to market, dealing with angry customers shouting "what happened to Moore's law."

By controlling the manufacture of the cpu chip, that whole issue is resolved for apple. And one can take advantage of all of the theoretical improvements offered by RISC architecture (over Intel CISC architecture).  So chips that run cooler, use less power, can be custom configured with multiple computational cores tailored for different use purposes, etc.

GPU cores can be directly integrated with CPU cores, using the same on chip memory (moving data between cpu and gpu memory being a big 'slow down the speed' issue on conventual systems).  A GPU core being of course an apple proprietary Metal GPU core.

The latest ios hardware devices also have a Bionic engine in them, which is a computational processor specifically designed and optimized to run neural net algorithms. Conceived for the purpose of biometric identity detection to secure the use of apple portable devices (as opposed to being conceived for just general purpose computational acceleration). By biometrically tying a hardware device to a specific user, using face recognition from the built in selfie camera to identify that user and unlock the device


Here's an overview of the new mac os11 Big Sur features. Note that all of the cool machine learning and AR artificial reality api features are now available on the mac as well. Again, the fact that the mac was the last to a neural net computational accelerator party should maybe give you pause as to what is really driving it's development.  


This guide is designed to help you port your existing mac software to new ARM64 (apple silicon) processor based macs. It points you at a bunch of other online articles that detail different aspects of this process.

Now in theory this port is supposed to be as simple as recompiling your application code targeting the output for ARM64 instead of Intel x86_64.  And if you only use apple frameworks and apis, end of story in your application code, then that might actually be the case.

But if you use other coding apis and associated dynamic libraries, then each one of them will have to be recompiled targeting ARM64 in order for this whole port process to work.  You as an individual developer may or may not be involved in the actual compilation and associated packaging of these dynamic libraries. 

And of course the code associated with them needs to actually compile properly without any errors when targeting this new ARM64 target.  If not, those errors need to be hunted own and fixed.  Which again can be a problem if the code is controlled by someone other than you.

For additional information about architectural differences between the 2 platforms that could lead to compiler errors when compiling for the new cpu architecture, see Addressing Architectural Differences in Your macOS Code.

Those of you old enough to remember the original PPC chip to Intel chip transition on macs will remember something called Rosetta that apple provided to run your old PPC software on the new Intel macs.  It was a PPC emulator that ran on top of Intel.

Apple is providing something similiar called Rosetta 2 for the Intel to Arm transition. In theory, this will allow you to continue to run your old software compiled for Intel cpus on the new ARM chip macs, by running an Intel emulator on top of ARM.

Notable exceptions that will not be supported by Rosetta 2 including: 
1: Kernel extensions
2: Virtual Machine apps that virtualize x86_64 computer platforms

So, you apparently will not be running windows on an ARM mac in a virtual machine emulator.  Which is certainly a kick in the pants to cross platform developers.  As well as to anyone else that needs to work with both platforms, and enjoyed the advantages of doing it on a single machine.

The other thing you may remember from the old PPC to Intel transition are dual binary applications.  Dual binary means that the application is compiled twice, once for intel, then a second time for arm. These 2 builds are then packaged together into a dual binary.  And dual binary applications, also called universal binary applications, are back for this new Intel to ARM transition.

Here's some documentation to help with building universal binary applications.

Given past history, one can probably expect to see Rosetta 2 kept alive for around 2 years. After which it will no longer be available.  So the writing is on the wall for how long you will be able to use old applications that are not recompiled for ARM64.


OpenGL is also depreciated. They say it will initially be available on apple silicon, but again don't be surprised when it is no longer supported, and a vast array of existing OpenGL based applications no longer function on macs.  

Everyone needs to have a strategy for either moving low level graphics and graphics shader code to Metal on the mac, or be using a 3d party cross platform library that hides the implementation details and is dedicated to staying current for apple surprises down in the basement of their api (the part you are shielded from by these kinds of cross platform libraries).


We'll be taking a look at the proprietary AI and AR libraries apple is promoting associated with all of this in future posts.  It gives you a fascinating glimpse into where they think the platforms (iPhones, iPads, iMacs) are going.  And again their intention to try and force developers to use proprietary coding apis for all of this stuff rather than the open to everyone coding apis everyone else is using.

Big Sur os 11 for mac and some rental only ARM hardware for testing purposes are both available to mac developers now.  And some time this fall they will start flashing those ever annoying 'update your mac os' messages to their mac customer base at large, and it will be released into the world or mac users.

Comments

Popular posts from this blog

CycleGAN: a GAN architecture for learning unpaired image to image transformations

Pix2Pix: a GAN architecture for image to image transformation

Smart Fabrics