Manually

A guide to add Shake to your app without a dependency manager or a build automation tool.

note

By not using a dependency manager like CocoaPods, you won't be able to use the simple pod update Shake command to always pull the latest version of Shake SDK into your app. Instead, you will have to repeat the the first step described below.

Download Shake SDK from GitHub

Visit Shake iOS SDK GitHub repo, click the green Clone button and then Download ZIP. Shake directory will be downloaded to your computer — drag-and-drop the Shake.framework folder into your project. Then select Embed & Sign for Shake.xcframework in Xcode General tab; Frameworks, Libraries, and Embedded content (Xcode 11, Xcode 12).

Initialize Shake SDK

Initialize Shake in the didFinishLaunchingWithOptions callback of your AppDelegate. Replace your-api-client-id and your-api-client-secret with the actual values you have in your workspace settings.

AppDelegate.swift
import UIKit
import Shake
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
Shake.start(clientId: "your-api-client-id", clientSecret: "your-api-client-secret")
return true
}
}
note

To avoid a swizzling conflict, call Shake.start() before initializing all other frameworks (e.g. Firebase Performance Monitoring SDK). Otherwise, some network requests may not be captured and sent with reports.

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.