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

Under the Hood

Now that we’ve looked at how to integrate iCloud into our Core Data–based application, it’s helpful to understand exactly how it works under the hood.

Debug Output

Core Data has several logging levels that we can turn on to watch all of the SQL calls that are generated during an application’s life cycle. There are currently three levels to this debugging log, with level 1 being the least chatty and level 3 being the most chatty. We can set this debug output by adding the runtime parameter com.apple.CoreData.SQLDebug to our application and pass along with it the level we want to be set.

In addition to the Core Data debug setting, we can turn on an additional setting to watch all of the chatter between Core Data and iCloud. That ...

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