[Marmalade SDK] Compiling your extension for supporting iOS 64-bit

When deploying a Marmalade App to AARCH64 (iOS 64-bit support), it is also necessary to re-compile its native extensions.
Else, “ld” will ignore the whole extension and warn us about the fact.
In order to recompile the iOS extension, you are forced to use a Mac. This can be an impediment if you use Marmalade under Windows. The steps you basically need are

1.- Download and install Marmalade SDK for Mac
2.- If you are Windows user, release your license on Windows Marmalade Hub
3.- Activate your license in Mac Marmalade Hub
4.- Copy the whole extension’s folder from Windows to your mac
5.- Right-click on the extension’s .mkb for iphone (extensionName_iphone.mkb), select “Open with”. There will be two options: Mkb (default), and Mkb (7.4.3), choose the second one. Note that the numbers may change in future Marmalade versions
6.- A shell command-prompt will appear, and will attempt to compile the extension. Once completed, make sure that file
is present. There should be also two folders with names finishing in _iphone_scons_aarch64 and _iphone_iphone_xcode. If that’s not the case, go to step 6b πŸ™‚
6b.- [Optional] Open the extension Xcode project (it is located inside build_extName_iphone_iphone_xcode folder), go to Build settings, and select “Latest iOS SDK” (mine is 8.2 in this moment), and include “arm64” inside Valid architectures. This is explained in more depth in this document.
7.- Once process is complete, you can copy your extension folder back to your usual Marmalade installation (either under Windows or Mac), and recompile the whole App (including extension) to AARCH64 in iOS-fat mode. More info in the previous post πŸ™‚

Sorry for the little mess going on here!! Hope it helps someone!!

2 thoughts on “[Marmalade SDK] Compiling your extension for supporting iOS 64-bit

  1. Pingback: [Marmalade SDK] Deploying to iOS 64-bit (AARCH64) | Mobile Dev Stories

  2. Just wanted to ask about 6b. You shouldn’t need to do any of these steps as an iphone extension mkb should automatically build arm, arm64 and x86 binaries (both debug and release) by default. Running the mkb as you have instructed is equivalent to running the mkb directly from terminal with no arguments. If you’re not getting all three architectures then please let me know and I’ll help investigate.

    You can also build each architecture individually from the command line using –x86, –arm or –aarch64 options for the (obvious) corresponding architecture.

    Finally, on the Xcode front. We are aware that if you open the mkb with the default options in Xcode then it’s only configured to build x86 and arm binaries. However, if you do need to build for arm64 in Xcode then if you run the mkb from the command line with the options –buildenv=xcode –aarch64 then the generated project will be configured for arm64 and you won’t need to do the manual editing of the project you refer to (this is a known issue with our 64 bit support).

    Hope that helps!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s