Building iOS templates
Device, simulator, Swift, libraries and template packaging.
This guide builds native export templates, not an editor or a finished game. To export a project, use Exporting for iOS.
Preparation
Open a terminal in Source, alongside SConstruct. You need Python 3.9+, SCons 4.4+ and full Xcode with the iOS SDK installed. Command Line Tools alone do not replace the iOS SDK. See Apple's tool-selection instructions and Xcode component installation.
Inspect the selected tools without changing settings:
xcode-select -p
xcrun --sdk iphoneos --show-sdk-path
xcrun --sdk iphonesimulator --show-sdk-path
xcrun --find swiftc
python3 --version
scons --versionThe current build scripts use Swift 6, C++ interop and an iOS 15.0 deployment target. These are Reckfell 1.0.0 source settings, not a guarantee for every Xcode, SDK and device combination. If an SDK command fails, install the corresponding Xcode component and select full Xcode for Command Line Tools first.
Device and simulator
| Destination | Architecture | Option | SDK |
|---|---|---|---|
| iPhone/iPad | arm64 | simulator=no | iphoneos |
| Apple silicon simulator | arm64 | simulator=yes | iphonesimulator |
| Intel simulator | x86_64 | simulator=yes | iphonesimulator |
Matching arm64 architectures do not make a device library a simulator library. Configuring x86_64 without simulator=yes fails. The current configurator disables Metal and Vulkan for the simulator with warnings; use Compatibility/OpenGL ES there and validate Metal/Vulkan visuals on a device.
Build libraries
Build device debug and release first:
scons platform=ios target=template_debug arch=arm64 simulator=no -j4
scons platform=ios target=template_release arch=arm64 simulator=no -j4Add simulator variants if needed. Choose the pair for your Mac architecture; run both pairs if you need both architectures:
scons platform=ios target=template_debug arch=arm64 simulator=yes -j4
scons platform=ios target=template_release arch=arm64 simulator=yes -j4
scons platform=ios target=template_debug arch=x86_64 simulator=yes -j4
scons platform=ios target=template_release arch=x86_64 simulator=yes -j4-j4 selects four parallel jobs; lower it if memory runs out. The output is static libraries under bin/libreckfell…a. Names include the target, architecture, .simulator for simulator builds and any configuration suffixes. These are neither .ipa files nor executable editors.
These examples build the native part without C#: that module is disabled by default. A custom C# template requires module_mono_enabled=yes, but this flag alone is insufficient: compatible managed assemblies and the mobile publication/AOT toolchain are separate requirements. Do not substitute the Windows SDK into an iOS template. A successful native build does not confirm a working iOS C# game.
Package the template
Add generate_bundle=yes to the last command of the selected configuration, after building all required variants. For example, for a device-only set:
scons platform=ios target=template_release arch=arm64 simulator=no generate_bundle=yes -j4The packager uses misc/dist/apple_embedded_xcode, puts available libraries in libreckfell.ios.debug.xcframework and libreckfell.ios.release.xcframework, then creates bin/reckfell_ios*.zip. It removes the intermediate bin/ios_xcode directory after archiving. Do not store personal files there. It does not compile missing variants: a ZIP does not prove all slices are complete. Check for a nonempty library for each required target and destination inside the archive.
Vulkan requires a static MoltenVK.xcframework containing device and simulator libraries; set vulkan_sdk_path to supply its location. The packager copies MoltenVK when found, so a ZIP alone does not prove that dependency was included. AccessKit also needs its iOS .xcframework; the configurator disables screen-reader support with a warning when it is missing. Resolve those warnings if your project needs the feature.
Build failures
| Symptom | Check |
|---|---|
Missing cstdint or a system framework | Full Xcode, the selected developer directory and SDK. Do not start by deleting system directories. |
| Swift compiler/interop error | Selected swiftc, Swift 6 support, SDK and the first compiler diagnostic. Having clang does not replace Swift. |
| Library built for a different destination | The simulator/SDK pair, architecture and selected .xcframework slice. |
| Signing or game launch fails | These belong to the next stage: the Xcode project, signing and export settings. Building .a libraries does not validate them. |
This guide was checked against the build scripts. No macOS compilation, iOS launch, signing, C# export or graphics acceptance was performed in this review.