Data Transformation & Migration

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

Data Transformation and Migration

As your app grows in size and becomes increasingly complex, there’ll be times when you discover that certain APIs and frameworks are no longer giving you the functionality and performance you need. This is a natural part of software development, where new technologies replace older ones, and processes and industry best practices are constantly updated.

Performing Analysis of a Persistence Solution

In this example, imagine you’re tasked with evaluating an app’s storage functionality and deciding whether it should begin to use Swift Data. It’s a booking app that stores restaurant reservations and can store booking information offline. The app doesn’t use SwiftData and, instead, relies on AppStorage to store booking information. Here’s what the code looks like:

Implementing a Data Migration

Now you know that adding Swift Data is a good idea. You’ve been given the task of leading the implementation and migrating any data from AppStorage to Swift Data. Here are some of the tasks you’ll need to do.

See forum comments
Download course materials from Github
Previous: Introduction: Data Transformation & Migration Next: Demo