Category Archives: Core Data

Super awesome Core Data wrapper in Swift (for iOS and OS X)

via tadija/AERecord · GitHub.

AERecord is a minion which consists of two pods:

  • AERecord – Super awesome Core Data wrapper in Swift (for iOS and OSX)
  • AECoreDataUI – Super awesome Core Data driven UI in Swift (for iOS)

Browsing Parse Local Datastore for iOS

via Browsing Parse Local Datastore for iOS | iOS Insight.

This post will walk through how you can view data in the Parse Local Datastore when running in the iOS simulator.

The Parse Local Datastore allows data to be stored locally on an iOS device when a network connection is unavailable, without using Core Data. It can be easily synchronized with the Parse data stored remotely in the backend when a network connection becomes available.

If you are running on the simulator you may want to browse the data stored locally, just like you can do with Core Data and with the Parse Data Browser for backend data. Since the Parse local data is stored in SQLite, you can use any suitable SQL browser. I use DB Browser for SQLite which is available here.

The Art of Building Developer Tools

via The Art of Building Developer Tools: When to Take the Plunge, with Sam Giddins – Realm is a mobile database: a replacement for SQLite & Core Data.

Have you noticed a gap in your workflow? Do you think you can fill that gap? Or have you made something that fills the gap only for you, but deserves wider use in the developer community? Samuel Giddins talks through some key steps to determine if you are ready to build developer tools, as well as some points to consider to be certain that you won’t be pulling your hair out in the process.

Unit Testing in Swift 2.0: The Before and After Story

via Unit Testing in Swift 2.0: The Before and After Story, with Jorge Ortiz – Realm is a mobile database: a replacement for SQLite & Core Data.

With great power comes greater responsibility. Unit testing superpowers in Swift help write better, more expressive code, but can be tough to get the hang of. In this talk Jorge Ortiz introduces unit testing and explains three scenarios of unit testing with Swift, providing you with practical advice for each of them. He also explores the implications of the recently introduced Swift 2.0.

Reverse-Engineering iOS Apps: Hacking on Lyft

via Reverse-Engineering iOS Apps: Hacking on Lyft, with Conrad Kramer – Realm is a mobile database: a replacement for SQLite & Core Data.

f you’ve ever needed to know how another piece of code works, or have been at the mercy of someone else’s bugs, you can always look at the source code… unless you don’t have it. In this talk, Conrad covers many concepts & tools that can used to reverse-engineer existing apps, as well as debug other libraries and even your own code. He even demonstrates the art of reverse engineering on Lyft’s iOS app, injecting code into it and inspecting its network traffic. Using Conrad’s techniques, you can expose the code behind any app on the App Store.

The Weak, the Strong, and the Unowned — Memory Management in Swift

via The Weak, the Strong, and the Unowned – Swift Memory Management, with Hector Matos – Realm is a mobile database: a replacement for SQLite & Core Data.

Memory management scares most developers when it doesn’t work as expected. Apple’s Automatic Reference Counting (ARC) magically handles most memory management we used to do manually, but still often needs guidance to work well. Swift provides us with cool tools like capture lists, unowned, and weak references to do so. In this talk, Hector Matos discusses memory leaks and retain cycles — how these problem arise and how to fix them. We can then leverage Swift’s compiler magic to write clearer, more expressive, non-leaky code. Memory management issues, be gone!

How to Use NSUserDefaults

via How to Use NSUserDefaults | Learn Core Data.

NSUserDefaults is an easy way to save user preferences or settings without creating your own database. You don’t have to write any SQL statements to retrieve or save the data, no core data stacks are required either. So how does it work?

First off, the information stored in NSUserDefaults is user specific. You can’t share preferences with other users. To save a preference, you need to specify 3 things.

  • Domain
  • Name
  • Value

There are multiple domains where preferences can be stored. We will be focusing primarily on the Application domain, but be aware there is a Global domain that sets system wide settings. The Global domain is used by system frameworks. To overwrite a value in the Global domain, simply store the same key and new value in the Application domain. You should also be aware of the Argument domain. The Argument domain is volatile, once the associated NSUserDefaults object is destroyed so are the values in the Argument domain. You don’t have to worry a whole lot about the other domains. If you use the shared NSUserDefaults, you will be using the application domain.

The name and value follow the key-value pair standard.