To run the example project, clone the repo, and run pod install
from the Example directory first.
CUU is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'CUU'
CUU requires a CUU.plist
to be present at build time.
CUU requires a CUU.plist
to be present at build time.
You can rename and use the CUU.plist.example
file as a starting point.
As the current commit hash needs to be written to this file, we recommend creating it with your CI/CD system.
To be able to use all feature of CUU, you need to set up your project for it.
In your AppDelegate, import CUU, let the AppDelegate conform to the IKAppDelegate protocol and start CUU. You must also introduce a new var window in the AppDelegate.
class AppDelegate: UIResponder, UIApplicationDelegate, IKAppDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Start the CUU framework for tracking features and interactions within the app.
CUU.start()
// Do your own stuff.
return true
}
}
For every view controller which you want to be tracked, you need to inherit from one of the CUUViewController classes. There is a subclass available for all types of View Controller, e.g. CUUPageViewController or CUUTabBarController. For every event you want to track, call CUU's FeatureKit.seed(name: String) method.
class ViewController: CUUViewController {
@IBAction func didTapTryFeatureKitButton(_ sender: UIButton) {
// Notify the FeatureKit component of CUU that a step of a feature was triggered.
CUU.seed(name: "TryFeatureKitButtonTapAction")
}
}
CUU is available under the MIT license. See the LICENSE file for more info.