Skip to content

Commit 1cf90fc

Browse files
committed
Add test for linking to UIKit
1 parent 3ceda16 commit 1cf90fc

File tree

1 file changed

+24
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)