This guide will walk you through the steps to add Skygear to your iOS project via CocoaPods from scratch.
Alternatively, you might want to get started with Skygear using:
We recommend you to install the Skygear iOS SDK via CocoaPods. Run the following command in your terminal to install it.
$ sudo gem install cocoapods
cd your-project-directory pod init
Podfileand add the following line to include SKYKit (Skygear iOS SDK) in your project.
pod 'SKYKit', :git => 'https://github.com/SkygearIO/skygear-SDK-iOS.git'
pod installin your terminal.
AppDelegate.swift, import the Skygear iOS SDK.
application:didFinishLaunchingWithOptionsmethod to configure your app.
Now, let's create a record in the Skygear database to see if the SDK has been installed successfully.
Add the following lines in the
application:didFinishLaunchingWithOptions method and run your app in a simulator. The record will be created when you run your app.
Practically the codes should not be structured this way. It is for demo only.
If the record is created successfully, you should see the record "Hello World" in your database table "test".
You can access your database using the data browser we provide. It can be found from the info page in your developer portal.
This is how your data browser will look like.
You can access Skygear database in 3 ways.
Hurray! Everything should be in the right place from here.
Next, you may want to learn more about: