Apple是否批准检查设备上是否安装了其他应用程序?

Man*_*nan 0 url ios instagram

Instagram在我的应用程序中使用应用程序功能来共享图像.为此,我正在检查是否在该设备上安装了Instagram应用程序?代码在下面,..

if ([self isAppInstalled]) {

    Dlog(@"Instagram App Installed");

} else {

    DLog(@"Instagram app not installed");

}


- (BOOL) isAppInstalled {
    NSURL *appURL = [NSURL URLWithString:@"instagram://app"];
    return [[UIApplication sharedApplication] canOpenURL:appURL];
}
Run Code Online (Sandbox Code Playgroud)

此URL instagram://app检查设备是否安装了instagram应用程序?

这在模拟器和设备上也可以正常工作.但我怀疑这是苹果合法接受的吗?因为我还没有找到任何关于此的文档.有人帮我解决这个问题.

帮手很感激.

Ani*_*ese 5

你现在正在做的事情很好,为此目的只有苹果提供url schemes.如果安装了原生fb应用程序,Facebook SDK也会对共享,登录等做同样的事情.那没有错.

这是关于该检查的Instagram文档