开发者

How To Check Installed Application On iPhone Device

I am developing an application in which I need to find the apps - such as Skype, Facebook - which are already installed o开发者_StackOverflow社区n the iPhone device.

I need to check it Objective-C. Please give me a code snippet if possible; otherwise a link to the solution.

If it not possible then tell me another way to check installed application on iPhone device.

Thanks in advance.


If the app you're checking for has a URI scheme registered, you can probe for that and assume the app is installed. Have a look at -(BOOL)canOpenURL:(NSURL *)url, try something along the lines of

if ( [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"fb://"]] )
{
     NSLog(@"will open facebook urls");
}

However, this does not give the guarantee that the genuine facebook app will respond to fb://


    if ([[NSFileManager defaultManager] fileExistsAtPath:@"/Applications/Cydia.app"])
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜