Objective-C

Xcode project and workspace

You will be using the iOS Client SDK library inside an Xcode project you'll create next.

Create an Xcode project

  • Open Xcode and, from the menu, select File > New > Project....

  • Select a Single View App for the Application type and click Next.

  • For the Product Name type in AppToAppChat, select the relevant Team and Organisation Identifier.

  • User Objective-C for Language and Storyboard for User Interface. Click Next.

  • Select the Desktop as the place where your project folder will reside. You can select a different location but please make sure to remember it as you'll need to navigate to it soon from the Terminal.

  • You now have a brand new Xcode Project.

Before continuing, please close the new project you created.

You will add the iOS Client SDK library to your project via CocoaPods.

Install CocoaPods

  • Open the Terminal app and navigate to the project folder by typing:
cd ~/Desktop/AppToAppChat
  • Install CocoaPods in your system, if you don't have it already:
sudo gem install cocoapods

Note: CocoaPods is built with Ruby, available by default on macOS.

  • Create a Podfile for your project:
pod init

Add the iOS Client SDK

  • Add the Vonage iOS Client SDK to the Podfile. To do this, let's open it in Xcode:
open -a Xcode Podfile
  • Update the Podfile as shown below:
  • Install the library:
pod install

The latest version of the library will be added to your project:

Open the workspace

As described in the output above, please use AppToAppChat.xcworkspace rather than the initial project from now on. To open it, type the following in the terminal:

open AppToAppChat.xcworkspace