这是我使用的代码:
let instagramURL = NSURL(string: "instagram://app")
if UIApplication.shared.canOpenURL(instagramURL! as URL) {
//Code
} else {
//Showing message "Please install the Instagram application"
}
Run Code Online (Sandbox Code Playgroud)
我输入if循环失败了.
我收到此错误:
canOpenURL:网址失败:"instagram:// app" - 错误:"此应用不允许查询方案instagram"
我也在我的设备中登录Instagram.