Primer: iOS support #788

Merged
SakulFlee merged 20 commits from ios-support into main 2026-09-21 21:57:39 +00:00
Owner

This PR is adding iOS support similar to Android.
Unfortunately, we cannot properly test iOS support at this moment.
There might / will be issues ... please report them!

This PR is adding iOS support similar to Android. Unfortunately, we cannot properly test iOS support at this moment. There might / will be issues ... please report them!
- New ios.rs: IosAssetSource (bundle resources) and IosStorage (Documents)
- Updated lib.rs: three-way dispatch (desktop/android/ios)
- Updated dir.rs: exclude iOS from DesktopAssetSource/DesktopStorage
- Updated Cargo.toml: objc2 + objc2-foundation for iOS FFI
- Made DirStorage::resolve pub for use by IosAssetSource
iOS sandbox restricts filesystem access, so the desktop log file rotation
is not usable. iOS init uses fern with stdout only, matching the pattern
used for Android's logcat output.
- New make_ios_main! generates extern "C" fn ios_main() for UIKit
- Updated make_main! to include iOS variant
- Updated make_desktop_main! to exclude iOS (iOS uses ios_main, not main)
gilrs does not support iOS, so all gamepad_input and gamepad_input_poll
gates now exclude both Android and iOS.
Adds winit as an iOS target dependency (no special features needed,
unlike Android's android-native-activity).
All #[cfg(not(target_os = android))] guards on logging::init() calls
now exclude both Android and iOS, since iOS uses its own entry point
make_ios_main! which calls init() before the user's entrypoint.
Change iOS status from ❓ to ⚠️, noting it compiles but is untested
with boilerplate provided for community testing.
Adds [ios] section with bundle_id, deployment_target, and app_name
defaults, matching the existing [android] configuration pattern.
- ios/project.rs: Xcode project generation (pbxproj, Info.plist, AppDelegate, storyboards)
- ios/build.rs: cargo build + xcodebuild orchestration
- ios/device.rs: Simulator management via xcrun simctl
- ios/run.rs: Install and launch on simulator
- main.rs: Add Platform::Ios variant
- config.rs: Add IosConfig struct and load_ios_config()

All iOS commands require macOS with Xcode installed and will bail
with a clear error message on other platforms.
ci(ios): add iOS build target to GitHub Actions
Some checks failed
PR / lint (pull_request) Failing after 18s
bf6d9dbbcc
Adds build-ios job that runs on macos-latest, builds a static library
for aarch64-apple-ios, and uploads it as a release artifact. The
release job now depends on build-ios.
Merge branch 'main' into ios-support
Some checks failed
Lint / lint (push) Failing after 18s
Lint / lint (pull_request) Failing after 18s
PR / test (pull_request) Failing after 17s
PR / build (aarch64-unknown-linux-gnu) (pull_request) Has been skipped
PR / build (x86_64-pc-windows-gnu) (pull_request) Has been skipped
PR / build (x86_64-unknown-linux-gnu) (pull_request) Has been skipped
f3232e7e0c
Merge branch 'main' into ios-support
Some checks failed
Lint / lint (pull_request) Failing after 2m22s
Lint / lint (push) Failing after 8m1s
PR / test (pull_request) Failing after 3m29s
PR / build (aarch64-unknown-linux-gnu) (pull_request) Has been skipped
PR / build (x86_64-pc-windows-gnu) (pull_request) Has been skipped
PR / build (x86_64-unknown-linux-gnu) (pull_request) Has been skipped
f9d1a84279
Merge branch 'main' into ios-support
Some checks failed
Lint / lint (pull_request) Failing after 4m3s
PR / test (pull_request) Failing after 14m15s
PR / build (aarch64-unknown-linux-gnu) (pull_request) Has been skipped
PR / build (x86_64-pc-windows-gnu) (pull_request) Has been skipped
PR / build (x86_64-unknown-linux-gnu) (pull_request) Has been skipped
c3889f30de
The inline raw string for the Xcode project.pbxproj contained escaped
quotes in the embedded shell script that caused 'unknown start of token'
errors during compilation. Moved the template to
Tools/orbital-cli/src/template/ios/project.pbxproj and load it via
include_str! instead.
Merge remote-tracking branch 'origin/ios-support' into ios-support
Some checks failed
Lint / lint (pull_request) Failing after 4m12s
PR / test (pull_request) Failing after 14m13s
PR / build (aarch64-unknown-linux-gnu) (pull_request) Has been skipped
PR / build (x86_64-pc-windows-gnu) (pull_request) Has been skipped
PR / build (x86_64-unknown-linux-gnu) (pull_request) Has been skipped
f2dcb43cc5
fix(ios): don't double-wrap event_loop in Ok() for desktop and iOS macros
Some checks failed
Lint / lint (pull_request) Failing after 4m18s
PR / build (aarch64-unknown-linux-gnu) (pull_request) Has been cancelled
PR / build (x86_64-pc-windows-gnu) (pull_request) Has been cancelled
PR / build (x86_64-unknown-linux-gnu) (pull_request) Has been cancelled
PR / test (pull_request) Has been cancelled
696255406c
EventLoop::builder().build() already returns Result<EventLoop, EventLoopError>.
Wrapping it in Ok() created Ok(Result<...>) which didn't match the entrypoint
signature expecting a bare EventLoop on desktop (or Result on Android/iOS).

Desktop: pass Result directly (entrypoint takes Result)
Android: keep Ok(event_loop) — match already unwraps the Result
iOS: pass Result directly (entrypoint takes Result)
fix(ios): correct include_str path, fix unused imports and type ambiguity
Some checks failed
Lint / lint (pull_request) Failing after 4m22s
PR / build (aarch64-unknown-linux-gnu) (pull_request) Has been cancelled
PR / build (x86_64-pc-windows-gnu) (pull_request) Has been cancelled
PR / build (x86_64-unknown-linux-gnu) (pull_request) Has been cancelled
PR / test (pull_request) Has been cancelled
cef1c7887a
fix(ci): use #*:// to strip any protocol from GITHUB_SERVER_URL in lint auto-push
Some checks failed
Lint / lint (pull_request) Failing after 4m22s
PR / test (pull_request) Failing after 53m52s
PR / build (aarch64-unknown-linux-gnu) (pull_request) Has been skipped
PR / build (x86_64-pc-windows-gnu) (pull_request) Has been skipped
PR / build (x86_64-unknown-linux-gnu) (pull_request) Has been skipped
580c934cba
GITHUB_SERVER_URL may be http:// or https:// depending on the
environment. Using ${GITHUB_SERVER_URL#*://} strips any protocol
prefix, preventing double-protocol URLs like https://http://...
Sign in to join this conversation.
No description provided.