REST API for IOS

euoraf49 years ago

What is the simplest way to get the data in iOS application in SWIFT? I can not understand how to use the REST API http://swagger.io/.

Can anyone help me show me a starting point?

Anton Tananaev9 years ago

You can look at the official Traccar Manager app. It's written in Swift and it's using the API to communicate with server side.

euoraf49 years ago

I've looked and I was not able to fully understand.

What I am trying to make is this, that in javascript.

But I not yet found a way to pass this to Swift.

// find All devices  - GET request
var result = HTTP.call(
    "GET",
    'http://your_domain:8082/api/devices/',
    {
        auth: 'email@xyz.com:password' ,
        params: {
        }
    }
);
Anton Tananaev9 years ago

What are you talking about? Traccar Manager is written in Swift language, it's not in JavaScript.