From the course: Shared Economy for iOS Development

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

CocoaPods and AppSync client

CocoaPods and AppSync client - iOS Tutorial

From the course: Shared Economy for iOS Development

Start my 1-month free trial

CocoaPods and AppSync client

- [Instructor] Okay, so the next thing we're going to do is we're going to add the AppSync CocoaPod and then we're going to create the AppSync client that we'll use throughout our code. So, let's go to the terminal. Make sure we're in the right directory. And we're going to edit our Podfile. So again, I'm editing in VI so I'm going to go into insert mode under the last Podfile and add pod single-quote AWSApSync. Close my quotes. Escape for command mode. Colon wq for write and quit. And then I'll run pod install Once the pod is installed it is automatically added to our workspace so we can go back to Xcode and include that in our code. So we're going to create our Appsync client in the AppDelegate. So under line 9 we're going to import AWSAppSync as our framework. And then we're going to create a property on line 16 called var appSyncClient. And the type of that is AWSAppSyncClient and it's going to be an optional. So we on have to initialize this once in our code, so we're going to do…

Contents