I have tried example that was given already and it is all in objective C .I need this in swift also.I can’t get a clear idea that how to add the grasshopper api and how to use in Xcode for swift .
GraphHopper is written in Java and the translation to Objective C is done via an open source tool. So if you want swift code you’ll either need a Java->Swift or an Objective C->Swift converter