Message:

Subscribe rss
Blog categories
All | Backendless features
Using Backendless CocoaPod with XCode
May 28, 2014 by markpiller
Spread the love

cocoapods stickers 300x160 - Using Backendless CocoaPod with XCodeCocoaPods manages library dependencies for your Xcode projects.

The dependencies for your projects are specified in a single text file called “Podfile”. CocoaPods resolves dependencies between libraries, fetches necessary code and links it together in an Xcode workspace to build your project.

Make sure you have the Cocoapods ruby gem installed your system. If you don’t, follow the directions from the CocoaPods Getting Started guide, or just launch a Terminal window and run:

Creating a new Xcode project with CocoaPods

Before you begin, check the Backendless-ios-SDK folder of CocoaPods Specs repository and choose the version of the library you will use (the latest is recommended unless you have a reason not to use it).

To create a new project with CocoaPods, follow these simple steps:

  1. Create a new project in Xcode as you normally would, then close this project.
  2. Open a Terminal window, and $ cd into your project directory.
  3. Create Podfile. This can be done by running
  4. Open your Podfile using your favorite text editor (or Xcode), and add the following text:

    The first line specifies the platform and version supported, the second line specifies the name of the Backendless folder in the CocoaPods Specs repository and the library version you chose.
  5. Save Podfile, return to the Terminal window and run:

    Once all of the pod data is downloaded, Xcode project workspace file will be created. This should be the file you use to create your app.
  6. Open .xcworkspace file to launch your project, and build it.

Enjoy!

Share this post
Tweet about this on TwitterShare on FacebookGoogle+