Fetching items online is also done via the app sync client. The generated code in API.swift gives you the classes and structs to create a query. It also has classes and structs to set items for filtering. You can match on items or specifically exclude items. Once the filter is set, the app sync client can run the query.
- [Facilitator] Now that we're storing data online…we also want to fetch it.…First I'm going to delete all my break points,…and then we're going to add a new function called…fetchItems.…So, on line 211 I'll type func fetchItems.…We can call this when users are already logged in,…or just after they log in.…And it's going to take a completion similarly…to our store online.…It's going to take a bool,…and return a void.…And we'll call this either way, success or fail.…So the first thing we need to do is create a filter.…So I'm going to say let q equal ListPicosQuery,…in open closed paren, to create an instance of that.…
Then on the line below that, 213,…I'm going to create a filter input,…a ModelStringFilterInput.…So I'll call this ModelStringFilterInput,…and it will be a ModelStringFilterInput where we…pass in what kind of comparison we want to do.…Not equal, equal, and so on.…We want something to equal the username.…So we'll call AWSMobileClient…dot sharedInstance…dot username.…And we're going to force that to unwrap.…
- Working with the Amplify toolchain
- Creating a React app
- Adding analytics to a React app with Amplify
- User authentication via AWS
- Using Amplify to simplify account creation and management
- Creating a GraphQL API
- Storing files online
Skill Level Intermediate
AWS API Gateway with HTTP, Lambda, DynamoDB, and iOSwith Bear Cahill1h 33m Intermediate
AWS Security Best Practices for Developerswith Carlos Rivas46m 31s Intermediate
1. AWS Amplify Overview
2. Amplified React App
3. Mobile App Features
4. Serverless Back End
5. Storing Files Online
- 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.