In my iOS App I use ArcGIS-Runtime-SDK-iOS 100.0.0 with Cocoapods. i user below link to create RouteTask
self.routeTask = AGSRouteTask(url: NSURL(string: "http://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World")! as URL)
when the above line of code execute it display one popup
but I don't want this popup instead i just want to pass the username and password by programatically using some url which provide me the token.
https://sampleserver6.arcgisonline.com/arcgis/rest/services/NetworkAnalysis/SanDiego/NAServer/Route this url give me route without any credential.but problem is that it just for sanDiego and i want to use the whole world cities for routes so i use the previous link.
the above popup also display when i want to use license map
so help me on this thanks in advance.
Hello,
In v100.0, authentication is managed for you by default, and that's why you see the prompt. For more info, check out the Authentication Manager reference
If you have username & password, you can still set credentials programmatically on the Route Task
self.routeTask = AGSRouteTask(url: NSURL(string: "http://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World")! as URL)
self.routeTask.credential = AGSCredential(username:"",password:"")
Hope this helps. Let us know if you see other issues. Thanks.
Suganya