简体   繁体   中英

How to receive list of binaries from server in iOS

In my iOS app, I am trying to get a list of serialized objects from an HTTP server.

Which Apple API should I choose to get the binary from server? I have read about NSURLSession, NSURLConnection, and others, but not sure which one to choose.

Both will do. NSURLSession is much more powerful tool than NSURLConnection. If your task is simple - use NSURLConnection. If you need all that fine features of NSURLSession - go for it.

There's a great tutorial on using NSURLSession NSURLSession tutorial . It also states diff between both tools

Also, take a look at AFNetworking framework - makes everything much easier

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM