I need to open uber app with default schedule a ride screen from my ios app. Right now i am using this code. but its just navigating user to uber app .
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")
}
Here i have attached image of requirement.
How can i do this in iOS swift 3?