iOS SDK Setup

Installation

LivePinch ios SDK is hosted on cocoapod. To integrate add following line to Pod

pod 'LivePinch', '2.4'

And install the pod using ‘pod install’ command inside your project directory using terminal.

Initialization

Get License Keys from the dashboard and place it in the Info.plist file as described below

<key>LivePinchLicenseKey</key>
      <string>$LICENSE_KEY</string>

Or Directly edit info.plist file in xcode, the output will be like below

License Key

$LICENSE_KEY here is a placeholder, replace this with the actual License Key obtained from the dashboard. See Here to see how to obtain the keys.

Also, Navigate to Build Settings of App Target and Choose ‘Always Embed Swift Standard Libraries’ to ‘True’. Check below screenshot for reference.

Build Settings

To initialize the SDK, use following code in your appdelegate class.

If you’re using swift

import LivePinch

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
    var window: UIWindow?

  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    LivePinch.getInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
    return true
  }

}

If you’re using Objective-C

@import LivePinch;

@implementation AppDelegate
- (BOOL) application: (UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions {
  [[LivePinch getInstance] application:application didFinishLaunchingWithOptions:launchOptions];
  return YES;
}