objc2-foundation 0.2.2

Bindings to the Foundation framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![cfg(feature = "NSBundle")]
use alloc::format;

use crate::Foundation::NSBundle;

#[test]
#[cfg(feature = "NSString")]
#[cfg(feature = "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);
}