Over the past couple of days, unsurprisingly, a lot of people have asked me about our plans for supporting iOS 7 and – more specifically – the arm64 architecture used in the new iPhone 5S.
Of course the news is good.
General support for iOS 7 on armv7 and armv7s (the current CPU platforms in iPhone 5 and older) has been in Oxygene since forever. We don’t ship .fx files for iOS 7 yet (that would have been a violation of Apple’s NDA, as long as iOS 7 was in beta), but Oxygene comes with a tool that lets you generate those files yourself with a single drag and drop for any beta SDK (including iOS 7 and OS X 10.9, a future iOS 7.1, etc). The July release also included additional fixes to make the import for iOS 7 more seamless.
So in general, Oxygene has been ready for iOS 7.0 for a while now, and i know that a lot of you have of course been using the two together, as have i myself for some of our internal apps (and in fact our Beta.app is already in the App Store, ready for iOS 7.0).
Of course, this support only extends to 32-bit iOS – which, to be clear, is fine and good enough to build and submit iOS 7 apps, including those that will run on the new iPhone 5S, today. (You’d want to extensively test your apps on the device before submitting 64-bit versions, anyways.)
So what about 64-bit?
Obviously, we only learned about the new A7 chip being 64bit alongside with the rest of the world outside of One Infinite Loop only yesterday. So work is needed for Oxygene to support the arm64 architecture that drives the CPU in the iPhone 5S.
We’re on that, and we don’t expect it to be a big deal, because Oxygene (a) builds on the open source LLVM backend, which does the bulk of the work for supporting different hardware architectures (and operating systems) and (b) is designed from the ground up for multiple architectures, and for creating universal binaries (that is, executables that contain code for more than one CPU). In fact, you’ve already been building those, if you build for armv7 and armv7s – 64bit just adds a third, albeit more different, architecture.
So mostly, we’re talking minor tool chain adjustments and improvements, as well as extensive testing.
The .fx import (mentioned above) has been updated to support arm64 yesterday and is done, pending testing. The .fx files now have three architectures for iOS: armv7/armv7s/arm64 and a dual-architecture for the Simulator: i386/x64. That’s right — there’s a 64-bit Simulator, as well.
With these new .fx files, arm64 will automatically show up as platform to build for in the IDE, and the compiler and the rest of the IDE toolchain will automatically pick up 64-bit support for your iOS projects. (There are new Conditional Defines you can use to test for bitness, such as __arm64__ on device and _x86_64__ on Simulator.)
The IDE and build chain does some magic with regard to building for the Simulator. In particulate, you never explicitly choose a Simulator SDK or i386 as architecture; instead, you configure your project for the iOS SDK and the ARM architectures you want, and if you build for Simulator, the build chain (and IDE smarts such as Code Completion) automatically switches over to the Simulator SDK, and to i386. The logic here needs to be refined to include _x86_64 if your app is built for arm64, so that you can build 64-bit Simulator apps. The devil is in the details (and it’s kind of funny that the compiler is ready to build 64-bit Simulator apps already, if only the toolchain would ask it to ;)
No use building 64-bit Simulator apps if you can’t run them – so we need to expose an option in the IDE to let you choose different Simulator versions (not just iPad vs. iPhone, but also bitness, and while we’re at it, Retina vs. Non-Retina iPad, and iPhone screen size).
The actual arm64 compiler backend needs to be tested. It’s been in the LLVM code base for a while, but we have not used it ourselves yet. So we need to test it against our Oxygene front-end and make sure all works well. Of course Oxygene already does x64 support on the Mac side, so we’re fairly confident. (64-bit support in the Simulator is pretty much identical to the existing Mac support; it uses the same x86_64 back-end, but it is, officially, a different platform/operating system combo).
Rumor also has it Apple has extensions to LLVM that aren’t published on the open source LLVM yet. It remains to be seen, possibly not until we have actual hardware, whether those extensions are crucial to have for compiling working iOS arm64 apps, or whether they are just icing on the cake that is the existing LLVM arm64 support that’s already public.
None of these are hard problems, just stuff that takes a day or two to do well (for example, i thoroughly refactored and abstracted the Train script that drives the .fx import in FXGen, as part of adding arm64 support to make the architecture handling much nicer and more flexible for the future).
We don’t want to make any promises (especially since final/real testing will depend on me getting hold of an iPhone 5S in a timely fashion to have test hardware, and with Apple not doing pre-orders this year, i guess that means i’ll be queuing up at the Apple Store here in Berlin again, next Friday ;), but we’d like to ship official arm64 support in the September update at the end of this month.
We’ll also try to get as much support as possible (untested on real hardware of course) into the next beta drop. At the very least, this will include the full .fx files for 64-bit, and it’s pretty likely to include 64-bit Simulator support, as well.
That said, remember that arm64 is not crucial for building iOS 7 apps. You can (re-)build your apps against iOS 7 now (i have been since mid-June), and submit those as armv7/arm7s. They will run fine on iPhones 5S, too. Once we do have arm64 support fully finalized, you can rebuild them with the extra architecture enabled.
As mentioned before, even if we had arm64 support ready this very second, it’d be pretty foolish to submit your 64-bits to the store before you can test them on real 64-bit hardware. More so, given that your apps will get little benefit from being 64-bit until you had the chance to properly extend and design them to take advantage of the platform. So we think our timeline should work well for you.
Remember: All Oxygene users with active subscriptions have full access to our beta releases, which give you early access to cutting edge stuff such as this. Visit the Beta Access page on our wiki for details, and make sure to install our Beta.app (linked from the same page) to stay in the loop with new builds.
Now, i’m sure you have iOS 7 apps to build and submit to the App Store, so i’ll leave you to it…