Quickstart
In this section you will learn how to install Parse Swift iOS SDK into your Xcode project.
In this tutorial we will use a basic app created in Swift with Xcode 12 and iOS 14.
At any time, you can access the complete Project built with this tutorial at our GitHub repository.
To complete this tutorial, you need:
- An app created at Back4App.
- Xcode.
- Basic iOS app.
- Note:If you don’t have a basic app created you can open Xcode and hit File-> New-> Project -> iOS. Then select App. After you create your basic app you are ready to follow this guide.
- Open your project’s AppDelegate.swift file to set up the app’s credentials.
- Parse Swift iOS SDK uses these settings to connect to the Back4App servers.
- At the top of the file you should see a function called ‘didFinishLaunchingWithOptions’.
- Paste the following code snippet inside this function, and make sure it is above the line that says ‘return true’.
At the top of your AppDelegate.swift file make sure to include Parse as a module by including the follwing code snippet right below ‘import UIKit’.
Your AppDelegate.swift file should now look like this:
Be careful, If Xcode tells you there is No Such Module ‘Parse’ there’s an easy solution. In Xcode open ‘Target > Build Settings > Search Paths > Framework Search Paths’ and then add two values: ‘$(PROJECT_DIR)’ and ‘$(inherited)’. Xcode will now be able to find your Parse module.
- Go to your App Dashboard at Back4App website.
- Navigate to app’s settings: Click on Features > Core Settingsblock> Server.
- Return to your AppDelegate.swift file and paste your applicationId and clientKey.
See more at our New Parse App guide.
Open your ViewController.swift file.
At the top of the file make sure to include Parse as a module by including the follwing code snippet right below ‘import UIKit’.
Inside the function called ‘viewDidLoad’ add a snippet of code below the code that configures parse.
Then add a function below viewDidLoad() method.
- Build your app in a device or simulator (Command+R).
- Wait until the main screen appears.
- Find your app and click on Dashboard
- Click on Core.
- Go to Browser.
If everything works properly, you should find a class named GameScore and the saved objects in it.
At this point, you have learned how to get started with iOS apps. You are now ready to explore Parse Server core features and Back4App add-ons.
Learn more by walking around our iOS Tutorials or check Parse open source documentation for iOS SDK.