Cabin Crew Express · Lesson 44 of 50 · Publishing · About 38 min
Ari creates a handover sheet for the iPhone trial. Its bundle ID must describe the same project in Godot, Xcode and App Store Connect.

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.


Build it step by step
Language and tools in this lesson Dictionary, .bundle, ==, elif, String.format(), preflight.
-
Check the requirements
Use macOS and Xcode for the reference project's iOS export. Install matching Godot templates. With an adult, open Apple's current SDK and submission requirements and confirm the required Xcode version.
Why it works The iOS export produces an Xcode project. A released iOS build must be signed and accepted by Apple's toolchain.
-
Use the iOS lab
Import checkpoint 44, open main.gd and press F5. Compare the matching records, mismatch and old build examples. The lab is available on desktop even if you do not have a Mac.
Why it works The inputs are pretend records. The exercise practises consistency before any signing or submission.
-
Follow two identities
Find compare(). Compare the store bundle ID with the project's field. Change the mock Xcode identity to match and run again.
if store.bundle != project.bundle:Why it works A bundle ID is an app identifier. A one-character mismatch can point to a different app.
-
Record version and build
Put the marketing version and the numerical build on the handover sheet. Match the marketing version to the planned listing. Increase the build number for another candidate for this lab.
Why it works The same marketing version can have multiple candidate builds.
-
Make the Xcode handover
On a Mac with an adult, open the Godot reference project and Project > Export. Add an iOS preset. Set that project's matching Bundle Identifier and the publisher's Team ID. Follow the official export guide and open the resulting Xcode project.
Why it works The adult controls the development team and certificates, while the child can document export settings.
-
Rehearse a beta
Ask the adult to choose a fitting test device and TestFlight track when a signed build exists. Test launch, the first cabin service, pause/resume and the controls with device audio muted. Record the result and the actual build number.
Why it works A locally running game is one step before a distribution build. A useful beta report describes tested behaviour.
Watch the values change
-
Compare matching records Both identities match, the marketing version matches and the build is newer.
What you see. Lab returns ready for next checks. -
Compare two bundle identities The iOS target uses org.example.other.
What you see. Lab names the differing identifiers. -
Reuse build 9 It is the same as the previous candidate in this lab.
What you see. Lab asks for a newer build.
Predict before you run If the version reads 1.0 in both places but the bundle IDs differ, should you proceed?
Reveal the answer
No. Confirm which app you are building and correct the bundle identifier first.
Complete checkpoint
The matching sample advances to next checks, the bundle mismatch is named, and an old build 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 := {"bundle": "org.example.cabin", "version": "1.0", "previous": 9}
func build() -> void:
ui.say("Match sample iOS records. No project is signed or sent by this lab.")
ui.option("Compare matching build", compare.bind({"bundle":"org.example.cabin", "version":"1.0", "build":10}))
ui.option("Compare different bundle ID", compare.bind({"bundle":"org.example.other", "version":"1.0", "build":10}))
ui.option("Compare reused build", compare.bind({"bundle":"org.example.cabin", "version":"1.0", "build":9}))
func compare(project: Dictionary) -> void:
var store := LISTING
if store.bundle != project.bundle:
ui.say("Bundle mismatch: %s versus %s." % [store.bundle, project.bundle])
elif store.version != project.version:
ui.say("Match the planned marketing version.")
elif project.build <= store.previous:
ui.say("Use a newer candidate build for this version.")
else:
ui.say("Identity and build agree. Xcode, signing, validation and TestFlight checks still apply.")
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("#14283d")
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("#ffd293"))
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
-
extends ControlStarts with Godot's Control type. This script gets the abilities of that type and adds the game's own rules. -
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. -
const TITLE = "Plan an iOS export and TestFlight"Creates a constant named TITLE. The expression uses the text inside the quotes. -
var ui: VBoxContainerDeclares ui for later use. A colon followed by a type says which kind of value belongs here. -
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. -
ui = VBoxContainer.new()Stores the new value in ui. The expression creates a new VBoxContainer object. -
ui.set_script(Lab)Calls ui.set_script with the values in its parentheses. -
add_child(ui)Adds the new node to the scene tree so that Godot can run and draw it. -
ui.start(TITLE)Calls ui.start with the values in its parentheses. -
build()Calls build with the values in its parentheses. -
const LISTING := {"bundle": "org.example.cabin", "version": "1.0", "previous": 9}Creates a constant named LISTING. The expression makes a dictionary that looks up values by key. Godot infers the type from the first value. -
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. -
ui.say("Match sample iOS records. No project is signed or sent by this lab.")Calls ui.say with the values in its parentheses. -
ui.option("Compare matching build", compare.bind({"bundle":"org.example.cabin", "version":"1.0", "build":10}))Calls ui.option with the values in its parentheses. -
ui.option("Compare different bundle ID", compare.bind({"bundle":"org.example.other", "version":"1.0", "build":10}))Calls ui.option with the values in its parentheses. -
ui.option("Compare reused build", compare.bind({"bundle":"org.example.cabin", "version":"1.0", "build":9}))Calls ui.option with the values in its parentheses. -
func compare(project: 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. -
var store := LISTINGCreates a variable named store. The expression reads LISTING. Godot infers the type from the first value. -
if store.bundle != project.bundle:Checks store.bundle != project.bundle. The indented instructions below run only if this test passes. -
ui.say("Bundle mismatch: %s versus %s." % [store.bundle, project.bundle])Calls ui.say with the values in its parentheses. -
elif store.version != project.version:If the earlier branches did not run, checks store.version != project.version next. -
ui.say("Match the planned marketing version.")Calls ui.say with the values in its parentheses. -
elif project.build <= store.previous:If the earlier branches did not run, checks project.build <= store.previous next. -
ui.say("Use a newer candidate build for this version.")Calls ui.say with the values in its parentheses. -
else:Runs the indented fallback instructions if none of the earlier tests passed. -
ui.say("Identity and build agree. Xcode, signing, validation and TestFlight checks still apply.")Calls ui.say with the values in its parentheses.
Read release_lab.gd line by line
-
extends VBoxContainerStarts with Godot's VBoxContainer type. This script gets the abilities of that type and adds the game's own rules. -
var output: LabelDeclares output for later use. A colon followed by a type says which kind of value belongs here. -
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. -
set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)Positions this Control relative to the bounds of its parent. -
offset_left = 32.0Stores the new value in offset_left. The expression reads 32.0. -
offset_top = 28.0Stores the new value in offset_top. The expression reads 28.0. -
offset_right = -32.0Stores the new value in offset_right. The expression reads -32.0. -
offset_bottom = -28.0Stores the new value in offset_bottom. The expression reads -28.0. -
add_theme_constant_override("separation", 12)Calls add_theme_constant_override with the values in its parentheses. -
var background := ColorRect.new()Creates a variable named background. The expression creates a new ColorRect object. Godot infers the type from the first value. -
background.color = Color("#14283d")Stores the new value in background.color. The expression builds a colour from these values. -
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. -
get_parent().add_child(background)Calls get_parent with the values in its parentheses. -
background.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)Positions this Control relative to the bounds of its parent. -
get_parent().move_child(background, 0)Calls get_parent with the values in its parentheses. -
var title := Label.new()Creates a variable named title. The expression creates a new Label object. Godot infers the type from the first value. -
title.text = title_textUpdates title.text, which controls the words a player sees. The expression reads title_text. -
title.add_theme_font_size_override("font_size", 32)Calls title.add_theme_font_size_override with the values in its parentheses. -
title.add_theme_color_override("font_color", Color("#ffd293"))Calls title.add_theme_color_override with the values in its parentheses. -
add_child(title)Adds the new node to the scene tree so that Godot can run and draw it. -
output = Label.new()Stores the new value in output. The expression creates a new Label object. -
output.custom_minimum_size.y = 151.0Stores the new value in output.custom_minimum_size.y. The expression reads 151.0. -
output.autowrap_mode = TextServer.AUTOWRAP_WORD_SMARTStores the new value in output.autowrap_mode. The expression reads TextServer.AUTOWRAP_WORD_SMART. -
output.add_theme_font_size_override("font_size", 19)Calls output.add_theme_font_size_override with the values in its parentheses. -
add_child(output)Adds the new node to the scene tree so that Godot can run and draw it. -
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. -
output.text = messageUpdates output.text, which controls the words a player sees. The expression reads message. -
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. -
var button := Button.new()Creates a variable named button. The expression creates a new Button object. Godot infers the type from the first value. -
button.text = labelUpdates button.text, which controls the words a player sees. The expression reads label. -
button.custom_minimum_size.y = 46.0Stores the new value in button.custom_minimum_size.y. The expression reads 46.0. -
button.add_theme_font_size_override("font_size", 19)Calls button.add_theme_font_size_override with the values in its parentheses. -
button.pressed.connect(command)Links a signal to the function that should run when the event happens. -
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 no development team appears in Xcode, stop to ask the adult controlling that team. Keep passwords and certificates outside your lesson files.
Try a change
Ages 10–12. Find the mismatching character. Ages 13–16. Make a mock matrix of the Godot, Xcode and App Store Connect fields.