You can use the library Alembic to carry out your requisitions, she and the most stable and built up Swift 2.0, others as Afnetworking are not so encouraged to still be made in Objetive-C.
To add to your project manually, you can watch one of these videos: Alamofire - Youtube.
Or simply follow the tutorial in the github documentation.
A tip to manage these libraries/components that you need to install in your project and the Cocoapods, it and a dependency manager such as php.
On the same site you can find an installation tutorial for it, and how to include libraries.
After you’ve added the Alamofire to your project just make a request like this:
let url = "http://sandbox.buscape.com/service/findProductList/564771466d477a4458664d3d/?keyword=samsung"
Alamofire.request(.GET, url)
.responseJSON {
response in
print(response.request) // original URL request
print(response.response) // URL response
print(response.data) // server data
print(response.result) // result of response serialization
if let JSON = response.result.value {
print("JSON: \(JSON)")
}
What is your doubt? What have you tried to do? It is in sending requests or understanding in the article ?
– Gabriel Rodrigues
@Gabrielrodrigues my doubt is how to use the data... Like a function where I pass the url and can call to pull the data... Got it ?
– Augusto Furlan
You already know how to make a request in Swift ?
– Gabriel Rodrigues
@Gabrielrodrigues then , we will say that no... How would do?
– Augusto Furlan
You know how to use Cocoapods ? You’ve heard of it ?
– Gabriel Rodrigues
@Gabrielrodrigues do not know... I’ve heard ... but would prefer without framework... But if you n suber without it can be with him...
– Augusto Furlan