From the course: Shared Economy for iOS Development
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
Updating order data - iOS Tutorial
From the course: Shared Economy for iOS Development
Updating order data
- [Instructor] Now that the user has accepted the service request, we want to start updating the server with their location, but we don't have anything in our service request to store it, we don't want to change the service latitude and longitude, so let's update our schema. In the terminal, we're going to edit the amplify/backend/api/mowerapp/schema.graphql. We're going to have two more lines at the bottom. So on the accepted line, I'm going to click Shift + A, and type driverLat, which is a Float, and driverLng, which is also a Float. Now, I'm going to do escape to go to command mode and type :wq, and push, so I'll type amplify push, and it's going to verify the changes, and ask me some more questions, and I'll accept the default. While it's updating the server, we can update our code for what we know is coming. So now, in my service request class, I'm going to add two more properties, the var driverLat, and default it to 0.0, and var driverLng, and 0.0, for the latitude and the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.