std::window::ios
std::window::ios is the iOS-specific facade for applications that want to
select the iOS provider explicitly while still using the portable
std::window types.
It covers:
ios-aarch64device output,ios-simulator-aarch64,ios-simulator-x86_64.
Exported API#
module std::window::ios;
import std::window;
export fn is_supported () -> bool;
export fn open (options: std::window::Options) -> std::window::WindowResult;
Semantics#
is_supported()returnstrueonly when the runtime selectedstd::window::Backend::IOS.open(...)delegates tostd::window::open(...)after checking that the iOS provider is active.- On non-iOS targets,
open(...)returnsErr(UnsupportedPlatform).
Current provider
- The module is linkable, opts reachable
std::windowexecutables into theUIKitframework, and can produce a bootstrap handle on the current iOS device and simulator targets. - The portable
std::window::run(...)entrypoint entersUIApplicationMain, registers a runtime application delegate, and creates aUIWindowwith a root view controller during application launch. The launch-owned path applies the requested title, frame size, visibility, and background color fromstd::window::Options; desktop chrome, positioning, size constraints, and always-on-top settings have no UIKit equivalent. - The portable
std::window::run_loop(...)API currently reportsApplicationLifecycleRequiredon iOS because UIKit owns event delivery underUIApplicationMain. - Direct portable
std::window::next_event(...)returnsErr(ApplicationLifecycleRequired)for a valid bootstrap handle because UIKit event delivery is owned byUIApplicationMain. - Direct portable
std::windowcontrol calls on the bootstrap handle also reportApplicationLifecycleRequired; UIKit-visible window mutation belongs inside lifecycle callbacks afterUIApplicationMainhas created the provider-ownedUIWindow. - CLI executable builds whose reachable module graph includes
std::windowautomatically materialize an adjacent<output>.appbundle containingInfo.plist,PkgInfo, and the executable. The bundle is generated without a separate CLI flag; importing/reachingstd::windowis the opt-in signal.
Source repository · Edit this page · View Markdown