Now that your app is ready and the AppSync client is configured, it is time to store data online. You need to create an input instance with the data to store online. The API code generated defines what to set. Then, you can create a mutation for the GraphQL API that's passed into the AppSync client to perform online.
- [Instructor] We've made it, this is it.…This is the video where we're actually…going to start storing data on the server,…and there's just a few things we need to do.…So we're going to go to our ThoughtsTVC.swift file,…and on line 12, we're going to say…import AWSAppSync.…And now, we have access to…that functionality and that framework.…And if we scroll down to line 59,…we're going to add a couple of blank lines into that.…And on line 61, we're going to add a new property,…var appSyncClient with its type of…AWSAPPSyncClient, that's an optional.…
And in the viewDidLoad, we're going to store in that property,…the AppSyncClient we created in the AppDelegate.…So we're going to say appSyncClient…equal UIApplication.shared.delegate…as AppDelegate, and on that,…we're going to put in parentheses the whole thing…and call .appSyncClient.…So now, we have the appSyncClient,…which is used to perform all the data storing,…uploading, and downloading to the server.…
So now, we're ready to save settings on the server.…So let's do a search for saveSettings,…
- Preparing to use AppSync in code
- Updating settings and the schema
- Adding a second data source
- Storing posts online
- Updating subscriptions in schema
- Testing live updates
- Handling updated posts
- Offline capabilities
Skill Level Intermediate
1. AWS User Authentication
2. AppSync Setup
Amplify codegen3m 42s
3. App Code and Configuration
4. Adding a Second Datasource
5. Real-Time Updates
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.