How to check if your app is running in 64bit

There are two ways to determine this: at runtime (i.e. in your running code), and at compile time (i.e. before the code is compiled). Let’s take a look at both options.

Runtime Check

Determines the size of a pointer.

Compile Time Check

Asks the compiler which architecture it compiles for.

About Jay Versluis

Jay is a medical miracle known as Super Survivor. He runs two YouTube channels, five websites and several podcast feeds. To see what else he's up to, and to support him on his mission to make the world a better place, check out his Patreon Campaign.

2 thoughts on “How to check if your app is running in 64bit

    1. Hi Giannis, from what I understand the runtime check determines the size of the pointer in a running app, no matter how it was compiled (in 32 or 64 bit). It doesn’t not check the operating system. The compiler on the other hand, or more accurately, Xcode would do that for us.

      Keep in mind this was relevant in 2013 when we could still deliver apps depending on what bit-ness the hardware supported. I guess as of 2018/2019 it’s a moot point because Xcode won’t let us compile apps in 32 bit anymore, on any currently supported OS or hardware.

Leave a Reply to Giannis Papadopoulos Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.