【发布时间】:2017-09-07 09:55:12
【问题描述】:
设置查询方案后做ininfo.plist文件:
<key>LSApplicationQueriesScheme</key>
<array>
<string>telprompt</string>
<string>fb-messenger</string>
<string>tel</string>
</array>
我想这样打开手机提示:
'let url = URL(string: "telprompt://\(self.offertaObj.callNumber)")
if UIApplication.shared.canOpenURL(url!) {
UIApplication.shared.open(url!)
}else{
self.view.makeToast("Contattaci al numero: "+self.offertaObj.callNumber, duration: 3, position: .bottom)
}
我将始终收到应用程序不允许打开该查询方案的消息,同时我没有找到任何关于如何通过 toast 消息请求用户允许它的参考。
【问题讨论】:
标签: ios user-permissions info.plist