London Market 44 · Plan an iOS export and TestFlight

Market Day London · Lesson 44 of 50 · Publishing · About 39 min

The market team wants an iPhone trial. Its handover sheet needs the same identifier in Godot, Xcode and App Store Connect.

Watercolour of Nia carrying a basket past the produce, bread and flower stalls at a London street market.
What you’ll make Match the bundle identifier, version and build number before preparing a device beta with an adult.

Download the projects from the course page. In Godot’s Project Manager, choose Import, select project.godot, and use Run Project (F5). Start from checkpoints/43 when the lesson builds on prior work, or copy the checkpoints/44 folder to try this lesson on its own. Read the file names in the steps before editing.

Verify tools. Check Apple and Godot documentation. → Compare IDs. Use one app identity. → Number. Record the candidate build. → Test. Use a signed beta when available.
Verify tools → Compare IDs → Number → Test
Godot checkpoint window for Plan an iOS export and TestFlight
From the running Godot checkpoint.

Build it step by step

Language and tools in this lesson Dictionary, get(), String formatting, bundle identity, marketing version, TestFlight.

  1. Locate the iOS toolchain

    Follow Godot's iOS export guide and Apple's current submission requirements with an adult. Check the Mac, Xcode version, iOS SDK and matching Godot export templates they need.

    Why it works Godot exports an Xcode project. Apple's toolchain prepares, signs and validates the actual iOS build.

  2. Open the comparison lab

    Import checkpoint 44 and open main.gd. Press F5 and compare the matching sample, the wrong bundle identifier and the older build. You can run the lab on a desktop without Xcode.

    Why it works Mock records let you rehearse an iOS workflow without accessing any store account.

  3. Make a bundle identifier match

    Read compare(). Find the condition that tests listing id against target id. Change the mock identifier in the second button to match, then try it again.

    if target.get("id") != LISTING.id:

    Why it works A one-character difference can identify a completely different app.

  4. Match version to listing

    Put both the user-facing version and numerical build on the handover sheet. For a new candidate with the same version in the lab, choose a new build number. Use the supplied iOS preset only as a starting point.

    Why it works The same app version can have multiple beta build candidates.

  5. Review the real export settings

    With an adult, open Project > Export in your copied reference project on a Mac. Check the iOS preset, the project-specific Bundle Identifier and the correct publisher Team ID. Export and open the generated Xcode project following the official guide.

    Why it works The adult controls certificates, signing and account access. Keep their identifiers and keys out of coursework you share.

  6. Test with a real candidate

    For a signed TestFlight build, have the adult choose the right beta group. Record actual results for first launch, pickup, order handover, feedback with the phone muted and reopening the game, then note the build number.

    Why it works A beta report tells the team what was verified on the exact build it will submit.

Watch the values change

  1. Compare matching records Identity and version match. Build 13 is newer.
    What you see. The lab moves to remaining checks.
  2. Compare the wrong ID The bundle points to another app.
    What you see. The mismatch is shown.
  3. Reuse build 12 The mock listing already has build 12.
    What you see. The lab asks for a newer build.

Predict before you run If the marketing version matches but the bundle IDs differ, should you hand off the build?

Reveal the answer

Confirm the intended app first, then correct the identifier before proceeding.

Complete checkpoint

The matching candidate advances, the wrong bundle is named, and build 12 is flagged.

main.gd

extends Control

const Lab = preload("res://release_lab.gd")
const TITLE = "Plan an iOS export and TestFlight"
var ui: VBoxContainer

func _ready() -> void:
	ui = VBoxContainer.new()
	ui.set_script(Lab)
	add_child(ui)
	ui.start(TITLE)
	build()

const LISTING := {"id": "org.example.briarlane", "version": "1.1", "last_build": 12}

func build() -> void:
	ui.say("Compare fictional iOS build records.")
	ui.option("Compare the matching candidate", compare.bind({"id": "org.example.briarlane", "version": "1.1", "build": 13}))
	ui.option("Compare a different bundle ID", compare.bind({"id": "org.example.othermarket", "version": "1.1", "build": 13}))
	ui.option("Compare an older build", compare.bind({"id": "org.example.briarlane", "version": "1.1", "build": 12}))

func compare(target: Dictionary) -> void:
	if target.get("id") != LISTING.id:
		ui.say("Bundle ID mismatch: %s and %s." % [target.get("id", "?"), LISTING.id])
	elif target.get("version") != LISTING.version:
		ui.say("Match the planned marketing version.")
	elif int(target.get("build", 0)) <= LISTING.last_build:
		ui.say("Use a newer candidate build.")
	else:
		ui.say("Labels match. Verify Xcode, signing, validation and TestFlight separately.")

release_lab.gd

extends VBoxContainer

var output: Label

func start(title_text: String) -> void:
	set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
	offset_left = 32.0
	offset_top = 28.0
	offset_right = -32.0
	offset_bottom = -28.0
	add_theme_constant_override("separation", 12)
	var background := ColorRect.new()
	background.color = Color("#20342e")
	background.mouse_filter = Control.MOUSE_FILTER_IGNORE
	get_parent().add_child(background)
	background.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
	get_parent().move_child(background, 0)
	var title := Label.new()
	title.text = title_text
	title.add_theme_font_size_override("font_size", 32)
	title.add_theme_color_override("font_color", Color("#f3c991"))
	add_child(title)
	output = Label.new()
	output.custom_minimum_size.y = 151.0
	output.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
	output.add_theme_font_size_override("font_size", 19)
	add_child(output)

func say(message: String) -> void:
	output.text = message

func option(label: String, command: Callable) -> void:
	var button := Button.new()
	button.text = label
	button.custom_minimum_size.y = 46.0
	button.add_theme_font_size_override("font_size", 19)
	button.pressed.connect(command)
	add_child(button)

GDScript line by line

Follow the line numbers, including the indent at the start of each line. Find the code the game will run first, then look for the function that reacts when you tap or change something.

Read main.gd line by line
  1. extends ControlStarts with Godot's Control type. This script gets the abilities of that type and adds the game's own rules.
  2. const Lab = preload("res://release_lab.gd")Creates a constant named Lab. The expression prepares a resource at a fixed project path when the script is loaded.
  3. const TITLE = "Plan an iOS export and TestFlight"Creates a constant named TITLE. The expression uses the text inside the quotes.
  4. var ui: VBoxContainerDeclares ui for later use. A colon followed by a type says which kind of value belongs here.
  5. func _ready() -> void:Godot calls this once after the scene and its children are ready. Use it to set up the room and connect controls.
  6. ui = VBoxContainer.new()Stores the new value in ui. The expression creates a new VBoxContainer object.
  7. ui.set_script(Lab)Calls ui.set_script with the values in its parentheses.
  8. add_child(ui)Adds the new node to the scene tree so that Godot can run and draw it.
  9. ui.start(TITLE)Calls ui.start with the values in its parentheses.
  10. build()Calls build with the values in its parentheses.
  11. const LISTING := {"id": "org.example.briarlane", "version": "1.1", "last_build": 12}Creates a constant named LISTING. The expression makes a dictionary that looks up values by key. Godot infers the type from the first value.
  12. func build() -> void:Defines build, a reusable set of instructions. Parameters between the parentheses receive inputs. A return type after the arrow tells you which kind of result to expect.
  13. ui.say("Compare fictional iOS build records.")Calls ui.say with the values in its parentheses.
  14. ui.option("Compare the matching candidate", compare.bind({"id": "org.example.briarlane", "version": "1.1", "build": 13}))Calls ui.option with the values in its parentheses.
  15. ui.option("Compare a different bundle ID", compare.bind({"id": "org.example.othermarket", "version": "1.1", "build": 13}))Calls ui.option with the values in its parentheses.
  16. ui.option("Compare an older build", compare.bind({"id": "org.example.briarlane", "version": "1.1", "build": 12}))Calls ui.option with the values in its parentheses.
  17. func compare(target: Dictionary) -> void:Defines compare, a reusable set of instructions. Parameters between the parentheses receive inputs. A return type after the arrow tells you which kind of result to expect.
  18. if target.get("id") != LISTING.id:Checks target.get("id") != LISTING.id. The indented instructions below run only if this test passes.
  19. ui.say("Bundle ID mismatch: %s and %s." % [target.get("id", "?"), LISTING.id])Calls ui.say with the values in its parentheses.
  20. elif target.get("version") != LISTING.version:If the earlier branches did not run, checks target.get("version") != LISTING.version next.
  21. ui.say("Match the planned marketing version.")Calls ui.say with the values in its parentheses.
  22. elif int(target.get("build", 0)) <= LISTING.last_build:If the earlier branches did not run, checks int(target.get("build", 0)) <= LISTING.last_build next.
  23. ui.say("Use a newer candidate build.")Calls ui.say with the values in its parentheses.
  24. else:Runs the indented fallback instructions if none of the earlier tests passed.
  25. ui.say("Labels match. Verify Xcode, signing, validation and TestFlight separately.")Calls ui.say with the values in its parentheses.
Read release_lab.gd line by line
  1. extends VBoxContainerStarts with Godot's VBoxContainer type. This script gets the abilities of that type and adds the game's own rules.
  2. var output: LabelDeclares output for later use. A colon followed by a type says which kind of value belongs here.
  3. func start(title_text: String) -> void:Defines start, a reusable set of instructions. Parameters between the parentheses receive inputs. A return type after the arrow tells you which kind of result to expect.
  4. set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)Positions this Control relative to the bounds of its parent.
  5. offset_left = 32.0Stores the new value in offset_left. The expression reads 32.0.
  6. offset_top = 28.0Stores the new value in offset_top. The expression reads 28.0.
  7. offset_right = -32.0Stores the new value in offset_right. The expression reads -32.0.
  8. offset_bottom = -28.0Stores the new value in offset_bottom. The expression reads -28.0.
  9. add_theme_constant_override("separation", 12)Calls add_theme_constant_override with the values in its parentheses.
  10. var background := ColorRect.new()Creates a variable named background. The expression creates a new ColorRect object. Godot infers the type from the first value.
  11. background.color = Color("#20342e")Stores the new value in background.color. The expression builds a colour from these values.
  12. background.mouse_filter = Control.MOUSE_FILTER_IGNOREUpdates background.mouse_filter, which controls how this control participates in pointer and touch input. The expression reads Control.MOUSE_FILTER_IGNORE.
  13. get_parent().add_child(background)Calls get_parent with the values in its parentheses.
  14. background.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)Positions this Control relative to the bounds of its parent.
  15. get_parent().move_child(background, 0)Calls get_parent with the values in its parentheses.
  16. var title := Label.new()Creates a variable named title. The expression creates a new Label object. Godot infers the type from the first value.
  17. title.text = title_textUpdates title.text, which controls the words a player sees. The expression reads title_text.
  18. title.add_theme_font_size_override("font_size", 32)Calls title.add_theme_font_size_override with the values in its parentheses.
  19. title.add_theme_color_override("font_color", Color("#f3c991"))Calls title.add_theme_color_override with the values in its parentheses.
  20. add_child(title)Adds the new node to the scene tree so that Godot can run and draw it.
  21. output = Label.new()Stores the new value in output. The expression creates a new Label object.
  22. output.custom_minimum_size.y = 151.0Stores the new value in output.custom_minimum_size.y. The expression reads 151.0.
  23. output.autowrap_mode = TextServer.AUTOWRAP_WORD_SMARTStores the new value in output.autowrap_mode. The expression reads TextServer.AUTOWRAP_WORD_SMART.
  24. output.add_theme_font_size_override("font_size", 19)Calls output.add_theme_font_size_override with the values in its parentheses.
  25. add_child(output)Adds the new node to the scene tree so that Godot can run and draw it.
  26. func say(message: String) -> void:Defines say, a reusable set of instructions. Parameters between the parentheses receive inputs. A return type after the arrow tells you which kind of result to expect.
  27. output.text = messageUpdates output.text, which controls the words a player sees. The expression reads message.
  28. func option(label: String, command: Callable) -> void:Defines option, a reusable set of instructions. Parameters between the parentheses receive inputs. A return type after the arrow tells you which kind of result to expect.
  29. var button := Button.new()Creates a variable named button. The expression creates a new Button object. Godot infers the type from the first value.
  30. button.text = labelUpdates button.text, which controls the words a player sees. The expression reads label.
  31. button.custom_minimum_size.y = 46.0Stores the new value in button.custom_minimum_size.y. The expression reads 46.0.
  32. button.add_theme_font_size_override("font_size", 19)Calls button.add_theme_font_size_override with the values in its parentheses.
  33. button.pressed.connect(command)Links a signal to the function that should run when the event happens.
  34. add_child(button)Adds the new node to the scene tree so that Godot can run and draw it.

Find and fix a bug

If Xcode has no eligible team, ask the adult who owns the publisher account. Do not put credentials in the project folder.

Try a change

Ages 10–12. Spot the mismatched ID. Ages 13–16. Draw a three-column matching table for Godot, Xcode and App Store Connect.

Official instructions