{ i love code }

CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef bundleURL = CFBundleCopyBundleURL(mainBundle);
CFStringRef bundlePathString = CFURLCopyFileSystemPath(bundleURL, kCFURLPOSIXPathStyle);
CFRelease(bundleURL);

char bundlePath[PATH_MAX];
CFStringGetCString(bundlePathString, bundlePath, PATH_MAX, kCFStringEncodingASCII);
CFRelease(bundlePathString);

printf(bundlePath);
blog comments powered by Disqus

Ramon Torres - iOS developer/product designer

My name is Ramon Torres. I'm a software developer and product designer, currently working at Inkboard building cool stuff.