Parse Quick Start for iOS Swift 3 and Xcode 8

So now that you set up a free Parse server on Heroku using my previous guide you might be wondering how to start using it in your iOS project. Checking the main Parse documentation shows a bunch of Objective-C, which isn’t helpful if you’re using Swift 3.

Here are the steps I gathered from perusing the web and some testing:

  1. Install Parse libraries (SDK/Framework).
    1. I prefer cocoapods to maintain to a single standard and since so many other frameworks use it.
    2. Create ‘Podfile‘ file in the xcode project folder with the following contents:
    3. Run ‘pod install‘ in terminal in the same directory as the Podfile.
  2. Connect your Swift 3 app to Parse server.
    1. Import Parse framework by adding ‘import Parse‘ at the top of ‘AppDelegate.swift‘ file.
    2. In ‘AppDelegate.swift‘ under function ‘application(… didFinishLaunchingWithOptions …)‘ add the following code:
  3. Test Parse server connection.
    1. Import Parse framework by adding ‘import Parse‘ at the top of ‘ViewController.swift‘ file.
    2. In ‘ViewController.swift‘ file, add the following code under function ‘ViewDidLoad‘:
    3. You should see the new object in your Parse Dashboard.

Notes/Troubleshooting

If XCode can’t find the Parse module with the import command after you open the new .xcworkspace file, try the following:

  • Press Command+Option+Shift+K and then Run your app.
  • Or from the menu -> Product, press Option on your keyboard and you’ll see Clean Build Folder.
This entry was posted in all and tagged , , , . Bookmark the permalink.

4 Responses to Parse Quick Start for iOS Swift 3 and Xcode 8

  1. Anonymous says:

    Thanks

  2. how about that error: Code=119 “This user is not allowed to access non-existent class”
    I google that but didn’t help…

  3. drew says:

    This skips the step the docs show to add the 10 or so frameworks, i wonder how that will play out. I found this after running into trouble with the manual install, and simply using Pods got around the bizarre Linker errors that are always so damn hard to correct. Muchos gracias.

Leave a Reply