Hello All,
I am using following code to fetch the path of the application. It works for all cases but fails for front row.
CFStringRef cfStrAppShortName = NULL;
FSRef appRef;
CFURLRef cfAppUrlRef = NULL;
CFBundleRef cfAppBundleRef = NULL;
CFDictionaryRef cfAppDictRef = NULL;
CFStringRef cfStrAppBundleName = NULL;
OSErr osErr;
cfStrAppShortName = CFSTR(Front Row);
if(cfStrAppShortName != NULL)
{
osErr = LSFindApplicationForInfo(kLSUnknownCreator,NULL,cfStrAppShortName,&appRef,NULL);
if(osErr == noErr)
{
cfAppUrlRef = CFURLCreateFromFSRef ( kCFAllocatorDefault, &appRef);
cfAppBundleRef = CFBundleCreate (kCFAllocatorDefault,cfAppUrlRef);
cfAppDictRef = CFBundleGetInfoDictionary (cfAppBundleRef);
cfStrAppBundleName = (CFStringRef)CFDictionaryGetValue (cfAppDictRef,kCFBundleNameKey);
}
I was expecting application path from Applications folder, but it comes from /system/coreservices/..
This happens for all items present in /system/library/coreservices/.. .
Is there any was that it should not look in /system/library/coreservices.. or any better solution? Can anyone help me?
Thanks in Advance.
Thanks, Rahul