| Crates.io | blinc_platform_ios |
| lib.rs | blinc_platform_ios |
| version | 0.1.12 |
| created_at | 2026-01-14 19:07:28.762625+00 |
| updated_at | 2026-01-19 01:07:54.790562+00 |
| description | Blinc iOS platform - UIKit integration, Metal rendering, and touch input |
| homepage | |
| repository | https://github.com/project-blinc/Blinc |
| max_upload_size | |
| id | 2043476 |
| size | 118,450 |
Part of the Blinc UI Framework
This crate is a component of Blinc, a GPU-accelerated UI framework for Rust. For full documentation and guides, visit the Blinc documentation.
iOS platform implementation for Blinc UI.
blinc_platform_ios provides UIKit integration, Metal rendering, and touch input handling for iOS and iPadOS applications.
use blinc_platform_ios::ios_main;
#[no_mangle]
pub extern "C" fn main() {
ios_main(|ctx| {
// Build your UI
div()
.w_full()
.h_full()
.child(text("Hello iOS!"))
});
}
[lib]
crate-type = ["staticlib"]
[dependencies]
blinc_platform_ios = "0.1"
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
fn handle_touch(event: TouchEvent) {
match event.phase {
TouchPhase::Began => {
// Touch started
}
TouchPhase::Moved => {
// Touch moved
}
TouchPhase::Ended => {
// Touch ended
}
TouchPhase::Cancelled => {
// Touch cancelled
}
}
}
// Get safe area insets
let insets = ctx.safe_area_insets();
// Build UI respecting safe area
div()
.pt(insets.top)
.pb(insets.bottom)
.pl(insets.left)
.pr(insets.right)
.child(/* content */)
ios_main(|ctx| {
// App became active
ctx.on_did_become_active(|| {
// Resume animations, etc.
});
// App will resign active
ctx.on_will_resign_active(|| {
// Pause animations, save state
});
// App entered background
ctx.on_did_enter_background(|| {
// Save data
});
build_ui()
});
# Build for iOS Simulator
cargo build --target aarch64-apple-ios-sim
# Build for iOS Device
cargo build --target aarch64-apple-ios --release
# Build universal binary
cargo lipo --release
rustup target add aarch64-apple-ios
rustup target add aarch64-apple-ios-sim
MIT OR Apache-2.0