Installation

The CanIO iOS library is available through CocoaPods, a popular dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like CanIO in your projects.

To install CanIO with CocoaPods, follow these steps:

Step 1: Download CocoaPods

CocoaPods is distributed as a ruby gem, and is installed by running the following commands in Terminal.app:

sudo gem install cocoapods
pod setup

Step 2: Create a Podfile

Project dependencies to be managed by CocoaPods are specified in a file called Podfile. Create this file in the same directory as your Xcode project (.xcodeproj) file:

$ touch Podfile
$ open -e Podfile

TextEdit should open up showing an empty file. Copy and paste the following lines into the TextEdit window:

platform :ios, '7.0'
pod 'CanIO', '~> 0.1.1'

Step 3: Install Dependencies

Now you can install the dependencies used by your project:

pod install

From now on, be sure to always open the generated Xcode workspace (.xcworkspace) instead of the project file when building your project:

$ open <YourProjectName>.xcworkspace

Next Steps

Start developing your CanIO app by reading our Implementing peer-to-peer networking in your iOS App and Using Shared Spaces in your iOS app guides. Good luck!