So I have an app from which I need to open a route in Sygic Truck & Caravan GPS Navigation. I'm from India so its tough to test this as Sygic Truck & Caravan GPS Navigation App isnt aviavle in indian app store. I am able to do it for Sygic GPS Navigation via com.sygic.aura://coordinate|15.06591|47.73341|drive, but what do I use for sygic truck. Curently my app has a action sheet which diaplays both options sygic truck & sygic navigation. Onclick of sygic navigation the route opens in Sygic GPS Navigation app. But it doesnt for Sygic Truck & Caravan GPS Navigation (confirmed via my client who uses the EU app store).
Any help would be really appreciated.
For Sygic Truck & Caravan GPS Navigation I use "com.sygic.truck://" is this incorrect? as this doesnt open. I expected it to open for my client but it doesnt.
The code I used is below:
if UIApplication.shared.canOpenURL(URL(string: "com.sygic.truck://")!) {
let lat = lat.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? ""
let long = long.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? ""
// Construct the Sygic URL with percent-encoded coordinates
let sygicURLString = "sygictruckandcaravangpsnavigation://coordinate|\(long)|\(lat)|drive"
if let encodedSygicURLString = sygicURLString.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed),
let url = URL(string: encodedSygicURLString) {
if UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
Is this wrong?