icrate 0.1.2

Bindings to Apple's frameworks
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![cfg(feature = "Foundation_NSBundle")]
use alloc::format;

use crate::Foundation::NSBundle;

#[test]
#[cfg(feature = "Foundation_NSString")]
#[cfg(feature = "Foundation_NSDictionary")]
#[cfg_attr(not(target_os = "macos"), ignore = "varies between platforms")]
fn try_running_functions() {
    // This is mostly empty since cargo doesn't bundle the application
    // before executing.
    let bundle = NSBundle::mainBundle();
    std::println!("{bundle:?}");
    assert_eq!(format!("{:?}", bundle.infoDictionary().unwrap()), "{}");
    assert_eq!(bundle.name(), None);
}