Midnight Deck Dash · Lesson 44 of 50 · Publishing · About 45 min
The Apple travel case needs three matching address labels for Godot, Xcode and the store.

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 String comparison, or, empty strings, bundle identifier, build number, TestFlight.
-
Prepare a Mac
Use macOS with a compatible Xcode installation, Godot and matching export templates. As checked on 22 November 2026, Apple's iPhone and iPad submission requirements were Xcode 26 or later and the iOS 26 or later SDK. The adult publisher checks Apple's current rule and their program access.
Why it works Godot's iOS export needs macOS and Xcode, and the minimum supported build tools can change.
-
Match the account records
The publisher creates the app record in App Store Connect. In Godot choose Project > Export > Add > iOS and enter that bundle ID and the publisher's Team ID. Open the exported project in Xcode and verify the target's Signing & Capabilities and bundle identifier.
Why it works The bundle ID names the game across services. The distinct Team ID names its signing team.
-
Practise matching records
Open checkpoint 44 and press F5. Try the matching and mismatch buttons, then read the line with or in check_record().
if godot_id != xcode_id or godot_id != store_id:Why it works One failed comparison is enough to stop.
-
Archive and upload
On the Mac, select an appropriate generic iOS device destination in Xcode. Choose Product > Archive then use Distribute App in Organizer for App Store Connect. The publisher verifies signing and uploads the build. Wait for it to process.
Why it works An archive puts the production build and signing details together for validation.
-
Test a processed build
In App Store Connect, select the app's TestFlight tab and its processed build. The publisher adds eligible internal testers or an external group. External testing can require beta App Review. Try touch controls, cart collisions and resume on an actual iPhone or iPad.
Why it works A beta trial confirms the same uploaded build people are asked to test.
-
Give fixes a fresh build number
If a tester finds a bug, change the code, increase the build number and archive again for the same app. Record both numbers, for example version 1.0.0 build 7.
Why it works Multiple test builds can share a release version. The build number identifies the exact archive.
Watch the values change
-
Match all IDs Three sample labels are identical.
What you see. The lab reports build 7. -
Change Xcode ID One label differs.
What you see. The lab reports the mismatch. -
Remove team The Team ID is blank.
What you see. The lab requests a signing team.
Predict before you run Two IDs match and the third has a different last word. Can the checker pass?
Reveal the answer
No. The or checks mean either mismatch stops the process.
Complete checkpoint
The matching example displays build 7. The other buttons show a mismatch or missing signing team.
main.gd
extends Control
const Lab = preload("res://release_lab.gd")
const TITLE := "Send an iPhone beta to TestFlight"
var ui: VBoxContainer
func _ready() -> void:
ui = VBoxContainer.new()
ui.set_script(Lab)
add_child(ui)
ui.start(TITLE)
build()
func build() -> void:
ui.say("Compare fictional records in this lab before exporting on a real Mac.")
ui.option("Check matching example", show_record.bind("org.samplecrew.harbour", "org.samplecrew.harbour", "org.samplecrew.harbour", "EXAMPLETEAM", 7))
ui.option("Check a mismatch", show_record.bind("org.samplecrew.harbour", "org.samplecrew.atrium", "org.samplecrew.harbour", "EXAMPLETEAM", 7))
ui.option("Check missing team", show_record.bind("org.samplecrew.harbour", "org.samplecrew.harbour", "org.samplecrew.harbour", "", 7))
func show_record(godot_id: String, xcode_id: String, store_id: String, team: String, build_number: int) -> void:
ui.say(check_record(godot_id, xcode_id, store_id, team, build_number))
func check_record(godot_id: String, xcode_id: String, store_id: String, team: String, build_number: int) -> String:
if godot_id.is_empty() or team.is_empty():
return "Enter a bundle ID and publisher signing team."
if godot_id != xcode_id or godot_id != store_id:
return "Bundle identifier mismatch. Compare all three records."
if build_number < 1:
return "Use a positive build number."
return "Example records match for build %d. Check signing and upload the real archive for TestFlight." % build_number
release_lab.gd
extends VBoxContainer
var body: Label
func start(title_text: String) -> void:
set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
offset_left = 34.0
offset_top = 24.0
offset_right = -34.0
offset_bottom = -24.0
add_theme_constant_override("separation", 12)
var title := Label.new()
title.text = title_text
title.add_theme_font_size_override("font_size", 31)
title.add_theme_color_override("font_color", Color("#f5cd85"))
add_child(title)
body = Label.new()
body.custom_minimum_size.y = 138.0
body.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
body.add_theme_font_size_override("font_size", 19)
add_child(body)
var bg := ColorRect.new()
bg.color = Color("#132942")
bg.mouse_filter = Control.MOUSE_FILTER_IGNORE
bg.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
get_parent().add_child(bg)
get_parent().move_child(bg, 0)
func say(message: String) -> void:
body.text = message
func option(label: String, command: Callable) -> void:
var button := Button.new()
button.text = label
button.custom_minimum_size.y = 45.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 := "Send an iPhone beta to TestFlight"Creates a constant named TITLE. The expression uses the text inside the quotes. Godot infers the type from the first value. -
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. -
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("Compare fictional records in this lab before exporting on a real Mac.")Calls ui.say with the values in its parentheses. -
ui.option("Check matching example", show_record.bind("org.samplecrew.harbour", "org.samplecrew.harbour", "org.samplecrew.harbour", "EXAMPLETEAM", 7))Calls ui.option with the values in its parentheses. -
ui.option("Check a mismatch", show_record.bind("org.samplecrew.harbour", "org.samplecrew.atrium", "org.samplecrew.harbour", "EXAMPLETEAM", 7))Calls ui.option with the values in its parentheses. -
ui.option("Check missing team", show_record.bind("org.samplecrew.harbour", "org.samplecrew.harbour", "org.samplecrew.harbour", "", 7))Calls ui.option with the values in its parentheses. -
func show_record(godot_id: String, xcode_id: String, store_id: String, team: String, build_number: int) -> void:Defines show record, 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(check_record(godot_id, xcode_id, store_id, team, build_number))Calls ui.say with the values in its parentheses. -
func check_record(godot_id: String, xcode_id: String, store_id: String, team: String, build_number: int) -> String:Defines check record, 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. -
if godot_id.is_empty() or team.is_empty():Checks godot_id.is_empty() or team.is_empty(). The indented instructions below run only if this test passes. -
return "Enter a bundle ID and publisher signing team."Finishes the function and hands its result back to the caller. The expression uses the text inside the quotes. -
if godot_id != xcode_id or godot_id != store_id:Checks godot_id != xcode_id or godot_id != store_id. The indented instructions below run only if this test passes. -
return "Bundle identifier mismatch. Compare all three records."Finishes the function and hands its result back to the caller. The expression uses the text inside the quotes. -
if build_number < 1:Checks build_number < 1. The indented instructions below run only if this test passes. -
return "Use a positive build number."Finishes the function and hands its result back to the caller. The expression uses the text inside the quotes. -
return "Example records match for build %d. Check signing and upload the real archive for TestFlight." % build_numberFinishes the function and hands its result back to the caller. The expression uses the text inside the quotes.
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 body: LabelDeclares body 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 = 34.0Stores the new value in offset_left. The expression reads 34.0. -
offset_top = 24.0Stores the new value in offset_top. The expression reads 24.0. -
offset_right = -34.0Stores the new value in offset_right. The expression reads -34.0. -
offset_bottom = -24.0Stores the new value in offset_bottom. The expression reads -24.0. -
add_theme_constant_override("separation", 12)Calls add_theme_constant_override 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", 31)Calls title.add_theme_font_size_override with the values in its parentheses. -
title.add_theme_color_override("font_color", Color("#f5cd85"))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. -
body = Label.new()Stores the new value in body. The expression creates a new Label object. -
body.custom_minimum_size.y = 138.0Stores the new value in body.custom_minimum_size.y. The expression reads 138.0. -
body.autowrap_mode = TextServer.AUTOWRAP_WORD_SMARTStores the new value in body.autowrap_mode. The expression reads TextServer.AUTOWRAP_WORD_SMART. -
body.add_theme_font_size_override("font_size", 19)Calls body.add_theme_font_size_override with the values in its parentheses. -
add_child(body)Adds the new node to the scene tree so that Godot can run and draw it. -
var bg := ColorRect.new()Creates a variable named bg. The expression creates a new ColorRect object. Godot infers the type from the first value. -
bg.color = Color("#132942")Stores the new value in bg.color. The expression builds a colour from these values. -
bg.mouse_filter = Control.MOUSE_FILTER_IGNOREUpdates bg.mouse_filter, which controls how this control participates in pointer and touch input. The expression reads Control.MOUSE_FILTER_IGNORE. -
bg.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)Positions this Control relative to the bounds of its parent. -
get_parent().add_child(bg)Calls get_parent with the values in its parentheses. -
get_parent().move_child(bg, 0)Calls get_parent with the values in its parentheses. -
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. -
body.text = messageUpdates body.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 = 45.0Stores the new value in button.custom_minimum_size.y. The expression reads 45.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 the archive shows up under the wrong record or not at all, confirm the bundle identity, team and processing status before uploading a replacement.
Try a change
Ages 10–12. Label the three places with the same made-up ID. Ages 13–16. Track two beta builds with distinct bug reports.