mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +00:00
26 lines
630 B
Rust
26 lines
630 B
Rust
//! Check that linking to UIKit on platforms where that is available works.
|
|
//@ revisions: ios tvos watchos visionos
|
|
//@ [ios]only-ios
|
|
//@ [tvos]only-tvos
|
|
//@ [watchos]only-watchos
|
|
//@ [visionos]only-visionos
|
|
//@ build-pass
|
|
|
|
use std::ffi::{c_char, c_int, c_void};
|
|
|
|
#[link(name = "UIKit", kind = "framework")]
|
|
extern "C" {
|
|
pub fn UIApplicationMain(
|
|
argc: c_int,
|
|
argv: *const c_char,
|
|
principalClassName: *const c_void,
|
|
delegateClassName: *const c_void,
|
|
) -> c_int;
|
|
}
|
|
|
|
pub fn main() {
|
|
unsafe {
|
|
UIApplicationMain(0, core::ptr::null(), core::ptr::null(), core::ptr::null());
|
|
}
|
|
}
|