compiling_for_ios.rst 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. .. _doc_compiling_for_ios:
  2. Compiling for iOS
  3. =================
  4. .. highlight:: shell
  5. Requirements
  6. ------------
  7. - SCons (you can get it from macports, you should be able to run
  8. ``scons`` in a terminal when installed)
  9. - Xcode with the iOS SDK and the command line tools.
  10. Compiling
  11. ---------
  12. Open a Terminal, go to the root dir of the engine source code and type:
  13. ::
  14. $ scons p=iphone target=debug
  15. for a debug build, or:
  16. ::
  17. $ scons p=iphone target=release
  18. for a release build (check ``platform/iphone/detect.py`` for the compiler
  19. flags used for each configuration).
  20. Alternatively, you can run
  21. ::
  22. $ scons p=iphone arch=x86 target=debug
  23. for a Simulator executable.
  24. Additionally since some time Apple requires 64 bit version of application binary when you are uploading to iStore.
  25. 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.
  26. 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:
  27. ::
  28. $ scons p=iphone tools=no bits=32 target=release arch=arm
  29. $ scons p=iphone tools=no bits=64 target=release arch=arm64
  30. $ lipo -create bin/godot.iphone.opt.32 bin/godot.iphone.opt.64 -output bin/godot.iphone.opt.universal
  31. Run
  32. ---
  33. To run on a device or simulator, follow these instructions:
  34. :ref:`doc_exporting_for_ios`.
  35. Replace or add your executable to the Xcode project, and change the
  36. "executable name" property on Info.plist accordingly if you use an
  37. alternative build.