exporting_for_ios.rst 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. .. _doc_exporting_for_ios:
  2. Exporting for iOS
  3. =================
  4. These are the steps to load a Godot project in Xcode. This allows you to
  5. build and deploy to an iOS device, build a release for the App Store, and
  6. do everything else you can normally do with Xcode.
  7. Requirements
  8. ------------
  9. - You must export for iOS from a computer running macOS with Xcode installed.
  10. - Download the Godot export templates. Use the Godot menu: Editor > Manage Export Templates
  11. Export a Godot project to Xcode
  12. -------------------------------
  13. In the Godot editor, open the **Export** window from the **Project** menu. When the
  14. Export window opens, click **Add..** and select **iOS**.
  15. The following export options are required. Leaving any blank will cause the
  16. exporter to throw an error:
  17. * In the **Application** category
  18. * **App Store Team ID** and (Bundle) **Identifier**
  19. * Everything in the **Required Icons** category
  20. * Everything in the **Landscape Launch Screens** category
  21. * Everything in the **Portrait Launch Screens** category
  22. After you click **Export Project**, there are still two important options left:
  23. * **Path** is an empty folder that will contain the exported Xcode project files.
  24. * **File** will be the name of the Xcode project and several project specific files and directories.
  25. .. image:: img/ios_export_file.png
  26. .. note:: This tutorial uses **exported_xcode_project_name**, but you will use your
  27. project's name. When you see **exported_xcode_project_name**
  28. in the following steps, replace it with the name you used instead.
  29. .. note:: Avoid using spaces when you choose your **exported_xcode_project_name** as
  30. this can lead to corruption in your XCode project file.
  31. When the export completes, the output folder should look like this:
  32. .. image:: img/ios_export_output.png
  33. Opening **exported_xcode_project_name.xcodeproj** lets you build and deploy
  34. like any other iOS app.
  35. Active development considerations
  36. ---------------------------------
  37. The above method creates an exported project that you can build for
  38. release, but you have to re-export every time you make a change in Godot.
  39. While developing, you can speed this process up by linking your
  40. Godot project files directly into your app.
  41. In the following example:
  42. * **exported_xcode_project_name** is the name of the exported iOS application (as above).
  43. * **godot_project_to_export** is the name of the Godot project.
  44. .. note:: **godot_project_to_export** must not be the same as **exported_xcode_project_name**
  45. to prevent signing issues in Xcode.
  46. Steps to link a Godot project folder to Xcode
  47. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  48. 1. Start from an exported iOS project (follow the steps above).
  49. 2. In Finder, drag the Godot project folder into the Xcode file browser.
  50. .. image:: img/ios_export_add_dir.png
  51. 3. In the dialog, make sure **Create folder references** is selected. This means
  52. you will be able to continue to edit your Godot project in its current location.
  53. .. image:: img/ios_export_file_ref.png
  54. 4. See the **godot_project_to_export** folder in the Xcode file browser.
  55. 5. Delete **exported_xcode_project_name.pck** from the Xcode project.
  56. .. image:: img/ios_export_delete_pck.png
  57. 6. Open **exported_xcode_project_name-Info.plist** and add a string property named
  58. **godot_path** (this is the real key name) with a value **godot_project_to_export**
  59. (this is the name of your project)
  60. .. image:: img/ios_export_set_path.png
  61. That's it! You can now edit your project in the Godot editor and build it
  62. in Xcode when you want to run it on a device.
  63. Services for iOS
  64. ----------------
  65. Special iOS services can be used in Godot. Check out the
  66. :ref:`doc_services_for_ios` page.