1
我需要打開我的ios應用程序的默認時間表騎車屏幕的超級應用程序。現在我正在使用這段代碼。但它只是導航用戶超級應用程序。如何使用其他ios應用程序的默認日程安排屏幕打開超級應用程序?
if (UIApplication.shared.canOpenURL(NSURL(string:"uber://")! as URL))
{
// if your app is available it open the app
Utilities.openScheme(scheme: "uber://?action=setPickup")
}
else
{
// it redirect to safari, safari directly open the web page on uber application, it does not redirect to app store
//UIApplication.shared.openURL(NSURL(string:"http://m.uber.com/?opneapp")! as URL)
Utilities.openScheme(scheme: "https://itunes.apple.com/us/app/uber/id368677368")
}
在這裏,我附上了需求的圖像。
我該如何在iOS Swift 3中做到這一點?