exporting_for_ios.rst 2.4 KB

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