Skip to content

Commit ea68a18

Browse files
authored
Auto merge of #458 - nacho:bundle-properties, r=jdm
foundation: add bundleIdentifier and resourcePath properties Adds the bundleIdentifier and resourcePath properties to the NSBundle bindings
2 parents 025dcb3 + 942e85c commit ea68a18

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

cocoa-foundation/src/foundation.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,6 +1100,10 @@ pub trait NSBundle: Sized {
11001100
name: id /* NSString */,
11011101
owner: id,
11021102
topLevelObjects: *mut id /* NSArray */) -> BOOL;
1103+
1104+
unsafe fn bundleIdentifier(self) -> id /* NSString */;
1105+
1106+
unsafe fn resourcePath(self) -> id /* NSString */;
11031107
}
11041108

11051109
impl NSBundle for id {
@@ -1115,6 +1119,14 @@ impl NSBundle for id {
11151119
owner:owner
11161120
topLevelObjects:topLevelObjects]
11171121
}
1122+
1123+
unsafe fn bundleIdentifier(self) -> id /* NSString */ {
1124+
msg_send![self, bundleIdentifier]
1125+
}
1126+
1127+
unsafe fn resourcePath(self) -> id /* NSString */ {
1128+
msg_send![self, resourcePath]
1129+
}
11181130
}
11191131

11201132
pub trait NSData: Sized {

0 commit comments

Comments
 (0)