CocoaPods trunk is moving to be read-only. Read more on the blog, there are 10 months to go.

PepperKit-iOS 1.0.3-beta.1

PepperKit-iOS 1.0.3-beta.1

TestsTested
LangLanguage
License MIT
ReleasedLast Release Jan 2015

Maintained by Himanshu Retarekar.



PepperKit-iOS 1.0.3-beta.1

PepperKit-iOS

PepperKit-iOS allows developers to develop apps that integrate the PepperKit functionality in their apps.

Overview

The primary purpose of the SDK is to make it easy to use the PepperKit platform. It provides functionality to initiate chat between two clients. Read below for additional information, or check out the complete documentation for a look at all the classes available with the SDK.

The recommended way to access the PepperKit-iOS SDK is through CocoaDocs.

This document contains the following sections:

Requirements

The SDK runs on devices with iOS 7.0 or higher.

Download the SDK

  1. (Manual)

    • Download PepperKit.embeddedframework and Dependencies Resources from github.
    • Move the folders into your project directory. We usually put 3rd-party code into a subdirectory named Vendor, so we move the directory into it.
  2. (Cocoapods)

    • Install Cocoapods, if already not installed
    • Add "pod PepperKit-iOS" to your podfile
    • Run pod install

Xcode Setup (Skip step if using CocoaPods)

  1. Drag & drop PepperKit.embeddedframework from your project directory to your Xcode project.

  2. Similar to above, our projects have a group Vendor, so we drop it there.

  3. Select Create groups for any added folders and set the checkmark for your target. Then click Finish.

  4. Select your project in the Project Navigator (⌘+1).

  5. Select your app target.

  6. Select the tab Build Phases.

  7. Expand Link Binary With Libraries.

  8. Add the following system frameworks, if they are missing:

    • Accelerate
    • AssetsLibrary
    • CoreData
    • CoreGraphics
    • CoreImage
    • CoreLocation
    • Foundation
    • ImageIO
    • MapKit
    • MessageUI
    • MobileCoreServices
    • QuartzCore
    • Security
    • SystemConfiguration
    • UIKit
  9. Add the following libraries, if they are missing;

    • icucore

Modify Code

Objective-C

  1. Open your AppDelegate.m file.

  2. Add the following line at the top of the file below your own #import statements:

    #import <PepperKit/PepperKit.h>
    
  3. Search for the method application:didFinishLaunchingWithOptions:

  4. Add the following lines to setup PepperKit:

    [PepperTalk sharedInstance].clientId = @"YOUR_CLIENT_ID";
    [PepperTalk sharedInstance].clientSecret = @"YOUR_CLIENT_SECRET";
    [[PepperTalk sharedInstance] enableInAppNotificationsInViewController:self.window.rootViewController]; //To enable in-app notifications
    
  5. To enable Remote Notifications

    • Enable remote notifications as described in Apple Documentation
    • Search for method application:didRegisterForRemoteNotificationsWithDeviceToken
    • Add following line of code
      • [PepperTalk sharedInstance].deviceToken = deviceToken;
    • Search for method application:didReceiveRemoteNotification:
    • Add following line of code
      • [[PepperTalk sharedInstance] handleRemoteNotification:userInfo presentingViewController:self.window.rootViewController];