From 756b51223e7fc78575c528ff26f2e9b6a7b940da Mon Sep 17 00:00:00 2001 From: Sam Green Date: Fri, 1 Mar 2019 04:55:56 -0800 Subject: [PATCH] Small update to iOS compilation docs (#2212) --- development/compiling/compiling_for_ios.rst | 26 ++++++++++++++------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/development/compiling/compiling_for_ios.rst b/development/compiling/compiling_for_ios.rst index 1a08ec196be..bf3a5584062 100644 --- a/development/compiling/compiling_for_ios.rst +++ b/development/compiling/compiling_for_ios.rst @@ -10,7 +10,7 @@ Requirements - SCons (you can get it from macports, you should be able to run ``scons`` in a terminal when installed) -- Xcode with the iOS SDK and the command line tools. +- Xcode 10.0 (or later) with the iOS (10.0) SDK and the command line tools. .. seealso:: For a general overview of SCons usage for Godot, see :ref:`doc_introduction_to_the_buildsystem`. @@ -37,20 +37,30 @@ Alternatively, you can run :: - $ scons p=iphone arch=x86 target=debug + $ scons p=iphone arch=x86_64 target=debug for a Simulator executable. -Additionally since some time Apple requires 64 bit version of application binary when you are uploading to iStore. -The best way to provide these is to create a bundle in which there are both 32bit and 64 binaries, so every device will be able to run the game. -It can be done in three steps, first compile 32 bit version, then compile 64 bit version and then use ``lipo`` to bundle them into one fat binary, all those steps can be performed with following commands: +For recent devices, Apple requires 64-bit versions of application binaries when you are uploading to the Apple Store. +The best way to provide these is to create a bundle in which there are both 32-bit and 64-bit binaries, so every device will be able to run the game. + +It can be done in three steps: first compile the 32-bit version, then compile the 64-bit version and then use ``lipo`` to bundle them into one "universal" binary. +All those steps can be performed with following commands: :: - $ scons p=iphone tools=no bits=32 target=release arch=arm - $ scons p=iphone tools=no bits=64 target=release arch=arm64 - $ lipo -create bin/godot.iphone.opt.32 bin/godot.iphone.opt.64 -output bin/godot.iphone.opt.universal + $ scons p=iphone tools=no target=release arch=arm + $ scons p=iphone tools=no target=release arch=arm64 + $ lipo bin/libgodot.iphone.opt.arm.a bin/libgodot.iphone.opt.arm64.a -output bin/godot.iphone.opt.universal.a + +If you also want to provide a simulator build (reduces the chance of any linker errors with dependencies), you'll need to build and lipo the ``x86_64`` architecture as well. + +:: + $ scons p=iphone tools=no target=release arch=arm + $ scons p=iphone tools=no target=release arch=arm64 + $ scons p=iphone tools=no target=release arch=x86_64 + $ lipo -create bin/libgodot.iphone.opt.arm.a bin/libgodot.iphone.opt.arm64.a bin/libgodot.iphone.opt.x86_64.a -output bin/godot.iphone.opt.universal.simulator.a Run ---