From 942e85ce41ccf64bfe1515d9941105de0555e96c Mon Sep 17 00:00:00 2001 From: Ignacio Casal Quinteiro Date: Mon, 10 May 2021 15:09:38 +0200 Subject: [PATCH] foundation: add bundleIdentifier and resourcePath properties Adds the bundleIdentifier and resourcePath properties to the NSBundle bindings --- cocoa-foundation/src/foundation.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cocoa-foundation/src/foundation.rs b/cocoa-foundation/src/foundation.rs index 5ea1bf6..93e3cd3 100644 --- a/cocoa-foundation/src/foundation.rs +++ b/cocoa-foundation/src/foundation.rs @@ -1100,6 +1100,10 @@ pub trait NSBundle: Sized { name: id /* NSString */, owner: id, topLevelObjects: *mut id /* NSArray */) -> BOOL; + + unsafe fn bundleIdentifier(self) -> id /* NSString */; + + unsafe fn resourcePath(self) -> id /* NSString */; } impl NSBundle for id { @@ -1115,6 +1119,14 @@ impl NSBundle for id { owner:owner topLevelObjects:topLevelObjects] } + + unsafe fn bundleIdentifier(self) -> id /* NSString */ { + msg_send![self, bundleIdentifier] + } + + unsafe fn resourcePath(self) -> id /* NSString */ { + msg_send![self, resourcePath] + } } pub trait NSData: Sized {