mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-11-23 20:19:40 +00:00
24 lines
1.0 KiB
Objective-C
24 lines
1.0 KiB
Objective-C
#import <CoreFoundation/CFBundle.h>
|
|
#import <Foundation/NSBundle.h>
|
|
#import <Foundation/NSString.h>
|
|
|
|
const CFStringRef kCFBundleNameKey=(CFStringRef)@"CFBundleName";
|
|
const CFStringRef kCFBundleVersionKey=(CFStringRef)@"CFBundleVersion";
|
|
const CFStringRef kCFBundleIdentifierKey=(CFStringRef)@"CFBundleIdentifier";
|
|
const CFStringRef kCFBundleInfoDictionaryVersionKey=(CFStringRef)@"CFBundleInfoDictionaryVersion";
|
|
const CFStringRef kCFBundleLocalizationsKey=(CFStringRef)@"CFBundleLocalizations";
|
|
const CFStringRef kCFBundleExecutableKey=(CFStringRef)@"CFBundleExecutable";
|
|
const CFStringRef kCFBundleDevelopmentRegionKey=(CFStringRef)@"CFBundleDevelopmentRegion";
|
|
|
|
#define NSBundleToCFBundle(x) ((CFBundleRef)x)
|
|
#define CFBundleToNSBundle(x) ((NSBundle *)x)
|
|
|
|
CFBundleRef CFBundleGetMainBundle(void) {
|
|
return NSBundleToCFBundle([NSBundle mainBundle]);
|
|
}
|
|
|
|
CFTypeRef CFBundleGetValueForInfoDictionaryKey(CFBundleRef self,CFStringRef key) {
|
|
return [CFBundleToNSBundle(self) objectForInfoDictionaryKey:(NSString *)key];
|
|
}
|
|
|