Swift?
Please don't hate me... but, what are the chances of getting this in Swift?
This library looks great and seems to be exactly what I am after, only problem is that I don't know Objective-C and just getting into Swift. Can I use this library "with Swift", if that makes sense?
Thanks
@peduarte good point. I will put some comments later this week how to use it in Swift projects.
@marciniwanicki thanks a lot man!
any update in swift implementation?
@marciniwanicki is there any chance this is going to happen soon?
Sorry guys, I could not find time to maintain the project. As far as I know you can use the library as it is in Swift 3 projects (with use_frameworks! in your Podfile). Yeah, the public API won't be very nice and "swifty" but at least you can get some data.
You need to first import framework
import OCGoogleDirectionsAPI
and then
let client = OCDirectionsAPIClient(key: "<api key>")
let request = OCDirectionsRequest(originString: "Reading", andDestinationString: "London")
_ = client?.directions(request, response: { (response, error) in
// your implementation
})
I will think about rewriting it completely in Swift but cannot promise anything now. I've checked quickly and there are already some pure swift implementations (https://cocoapods.org/?q=lang%3Aswift%20GOOGLE%20DIRECTIONS%20), maybe it you can try one of them.