我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应用程序?
这在模拟器和设备上也可以正常工作.但我怀疑这是苹果合法接受的吗?因为我还没有找到任何关于此的文档.有人帮我解决这个问题.
帮手很感激.
| 归档时间: |
|
| 查看次数: |
1037 次 |
| 最近记录: |