Skip to content

Commit ff3f0a3

Browse files
committed
Add test for linking to UIKit
1 parent 18d2434 commit ff3f0a3

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//! Check that linking to UIKit on platforms where that is available works.
2+
//@ revisions: ios tvos watchos visionos
3+
//@ [ios]only-ios
4+
//@ [tvos]only-tvos
5+
//@ [watchos]only-watchos
6+
//@ [visionos]only-visionos
7+
//@ build-pass
8+
9+
use std::ffi::{c_char, c_int, c_void};
10+
11+
#[link(name = "UIKit", kind = "framework")]
12+
extern "C" {
13+
pub fn UIApplicationMain(
14+
argc: c_int,
15+
argv: *const c_char,
16+
principalClassName: *const c_void,
17+
delegateClassName: *const c_void,
18+
) -> c_int;
19+
}
20+
21+
pub fn main() {
22+
unsafe {
23+
UIApplicationMain(0, core::ptr::null(), core::ptr::null(), core::ptr::null());
24+
}
25+
}

0 commit comments

Comments
 (0)