CocoaPods

We support integrating Shake into your Xcode project using CocoaPods.

note

Not using CocoaPods yet? Follow their brief installation guide, then run pod init in the root of your project and you're done — let's move on.

Add Shake SDK to your Podfile

Podfile
use_frameworks!
pod 'Shake'

Then, run the pod install command in your terminal. After the installation also run pod update Shake to be perfectly sure you're using the latest Shake .

Add Client ID and Secret to Info.plist

Open your workspace and in the Project Navigator, right click on Info.plist, and Open as › Source code. Paste this but replace your-api-client-id and your-api-client-secret with the actual values you have in your workspace settings:

Info.plist
<?xml version="1.0" encoding="utf-8" ?>
<plist version="1.0">
<dict>
<key>Shake</key>
<dict>
<key>APIClientID</key>
<string>your-api-client-id</string>
<key>APIClientSecret</key>
<string>your-api-client-secret</string>
</dict>
</dict>
</plist>

Initialize Shake SDK

AppDelegate.swift
import UIKit
import Shake
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
Shake.start()
return true
}
}

Now select Product › Run in the menu bar. This first run will automatically add your app to your Shake Dashboard based on your app bundle ID.