6#if defined(__APPLE__) && defined(__MACH__)
7#include <Foundation/Foundation.h>
8#include <TargetConditionals.h>
10#if TARGET_IPHONE_SIMULATOR == 1 || TARGET_OS_IPHONE == 1
12 NSBundle* bundle = [NSBundle mainBundle];
13 NSString* resourceDirectoryPath = [bundle bundlePath];
14 NSString* path = [resourceDirectoryPath stringByAppendingString:
@"/"];
15 return [path UTF8String];
17#elif TARGET_OS_MAC == 1
19 NSBundle* bundle = [NSBundle mainBundle];
20 NSString* resourceDirectoryPath = [bundle bundlePath];
21 NSString* path = [resourceDirectoryPath stringByAppendingString:
@"/"];
22 return [path UTF8String];
std::string GetBundleResourcePath()
GetBundleResourcePath returns the path to the bundle resource directory. Specific to MacOS.