exporting_for_ios.rst 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. .. _doc_exporting_for_ios:
  2. Exporting for iOS
  3. =================
  4. Exporting for iOS is done manually at the moment. These are the steps to
  5. load your game in an XCode project, where you can deploy to a device,
  6. publish, etc.
  7. Requirements
  8. ------------
  9. - Download XCode for iOS
  10. - Download the export templates: https://godotengine.org/download
  11. - Since there is no automatic deployer yet, unzip export_templates.tpz
  12. manually and extract GodotiOSXCode.zip from it.
  13. The zip contains an XCode project, godot_ios.xcodeproj, an empty
  14. data.pck file and the engine executable. Open the project, and modify
  15. the game name, icon, organization, provisioning signing certificate
  16. identities (??), etc.
  17. Add your project data
  18. ---------------------
  19. Using the Godot editor, :ref:`doc_exporting_for_pc`, to obtain the data.pck
  20. file. Replace the empty data.pck in the XCode project with the new one,
  21. and run/archive.
  22. If you want to test your scenes on the iOS device as you edit them, you
  23. can add your game directory to the project (instead of data.pck), and
  24. add a property "godot_path" to Info.plist, with the name of your
  25. directory as its value.
  26. .. image:: /img/godot_path.png
  27. Alternatively you can add all the files from your game directly, with
  28. "engine.cfg" at the root.
  29. Loading files from a host
  30. -------------------------
  31. Sometimes your game becomes too big and deploying to the device takes
  32. too long every time you run. In that case you can deploy only the engine
  33. executable, and serve the game files from your computer.
  34. Setting up the file host
  35. ~~~~~~~~~~~~~~~~~~~~~~~~
  36. On your PC, open the editor, and click the righ-most icon on the
  37. top-center group of icons, and select "Enable File Server". The icon
  38. turns red. Your PC will open a port and accept connections to serve
  39. files from your project's directory (so enable your local firewall
  40. accordingly).
  41. .. image:: /img/rfs_server.png
  42. Setting up the game
  43. ~~~~~~~~~~~~~~~~~~~
  44. On XCode, click on your app name (top left, next to the "Stop" button),
  45. and select "Edit Scheme". Go to the "Arguments" tab, and add 2
  46. arguments, "-rfs" and the IP of your PC.
  47. .. image:: /img/edit_scheme.png
  48. When you run, your device will connect to the host and open the files
  49. remotely. Note that the directory with the game data ("platformer") is
  50. no longer added to the project, only the engine executable.
  51. Services for iOS
  52. ----------------
  53. Special iOS services can be used in Godot. Check out the
  54. :ref:`doc_services_for_ios` page.