O'Reilly logo

Core Data in Swift by Marcus S. Zarra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Problem and the Approach

The main problem with network operations is time. A network operation will always take some amount of time, and usually the developer wants the user to wait for that network operation to finish before moving on to another task. Users rarely want to wait for an application.

To compound this problem, that amount of time is variable. The developer has no way of knowing if the user is on a fast network or a slow network. Just knowing whether the user is using cellular or Wi-Fi is insufficient. Cellular can be fantastic and Wi-Fi can be terrible.

The basic answer to this problem is that network operations need to be asynchronous. The developer needs to write the networking code in such a way that the network operation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required