Cloudant FoodTracker
Learn how to build Offline First iOS apps with Swift and Cloudant Sync.
The Cloudant FoodTracker demo app transforms Apple’s FoodTracker app into an Offline First app. The app lets users view and edit a list of meals each with a meal name, rating, and photo. The Cloudant FoodTracker app uses Cloudant Sync to store app data locally, and then syncs this data with IBM Cloudant when an internet connection is available.
Apple’s FoodTracker introduction walks readers through the process of building the user interface and the logic of a basic app. The introduction culminates in storing the app data as files on the iOS device. The Cloudant FoodTracker tutorial series picks up where Apple’s FoodTracker stops and replaces the data storage mechanism with Cloudant Sync, known as CDTDatastore. The tutorial then demonstrates how to sync app data with IBM Cloudant. Finally, the tutorial demonstrates adding some useful user interface features for the Offline First app.
Projects
-
Cloudant FoodTracker Part 3: User Interface
GitHub | developerWorksImprove UI elements to reflect the data sync process.
-
Cloudant FoodTracker Part 2: Sync to the Cloud
GitHub | developerWorksEnable sync for local data on an iOS device to cloud copies.
-
Cloudant FoodTracker Part 1: The Datastore
GitHub | developerWorksReplace Apple's local file storage with Cloudant's iOS library.