Michel Michel - 1 year ago 100
iOS Question

Parse SDK / CocoaPods

I have an objective C iOS app using the Parse SDK.
In the process of moving this app from Parse.com to a self hosted Parse-Server, I need to update the Parse SDK to the latest version. For this update I decided to go with CocoaPods.

This is the first time I touch CocoaPods (after reading and hearing so much good about it).

I found my way, following what I could read here and also based on a few CocoaPods tutorial I quickly viewed.

Having my project "ready", when buiding it I get this error:

#import <ParseUI/ParseUI.h> -----> File not found.

Obviously things have changed place. And I tried a couple of unsuccessful solutions.

So here is my question:
How do I need to change the settings of my project, now that I am using CocoaPods?

Answer Source

In order to use Cocoapods with parse and Parse UI you need to do the following steps:

  1. Create a new file and name it Podfile. This file should be located on your IOS project root folder.
  2. The Podfile should contain at least the following structure if you want to use parse IOS SDK and ParseUI

platform :ios, '8.0'

pod 'Parse'
pod 'ParseUI'

# Put more pods in here.. 

Notice to the platform, you may change it to the minimum version that your app can run on and the use_frameworks! will install all your pod as frameworks and this is mandatory if you like to consume Swift libraries.

  1. Open terminal and navigate to your IOS root directory and enter pod install. This command will install all the pods and dependencies into your project.

  2. After installing you will no longer use the IOS project file from now on you will use a new file which called workspace. The workspace will contain both your project files and the pods project/frameworks files.

  3. Build your project, fix some error (if there are) and run it to make sure that it works as expected .

    1. More CocoaPods commands that you need to know are:

pod update - update all your pods to the latest release or to the release that was mentioned in the Podfile pod update update specific pod to the latest release or to the release that was mentioned in the Podfile pod outdated - display out to date pods that are being used inside your project.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download