For Apps

For Apps

Installing Trackingplan in Your Apps

For apps, you’ll just need to install Trackingplan’s iOS and/or Android SDKs directly.

📖

iOS SDK

Installing Trackingplan’s iOS SDK using Swift Package Manager

With Trackingplan for iOS, you can ensure your tracking is going as planned without changing your current analytics stack or code.

Trackingplan will monitor traffic between your app and data destinations and automatically warn you about any changes or issues in your analytics implementations, like hit drops, missing properties, rogue events, and more.

☝🏻
The recommended way to install Trackingplan for iOS is to use Swift Package Manager, as it will simplify the process of installing and upgrading Trackingplan. To do this, follow the steps below.
  1. In Xcode, add the Trackingplan dependency by navigating to File -> Swift Packages -> Add Package Dependency...
  2. If you’re asked to choose a project, select the project you want to add Trackingplan to. If not, proceed to step 3.
  3. When choosing a package repository, copy and paste https://github.com/trackingplan/trackingplan-ios into the search box and click Next.
  4. Now, choose Version and leave the default selection for the latest version or customize if needed. To install previous versions of Trackingplan, you can manually complete this field with the appropriate version information.
  5. Check the box next to Trackingplan and click Finish.
  6. Verify that the Trackingplan library has been added to the Swift Package Dependencies section.
  7. Then, in your application delegate’s - application(_:didFinishLaunchingWithOptions:) method, set up the SDK like so:
  8. Finally, import the SDK using the following command:

All set! You have successfully installed the Trackingplan iOS SDK. Please remember to validate Trackingplan is collecting data correctly by following these easy steps to ensure Trackingplan is automatically monitoring and documenting all the customer data you are using for your analytics, marketing, and sales.

If you have any other questions or problems during the process, don’t hesitate to contact support.

Installing iOS SDK with Cocoapods

☝🏻
Trackingplan also supports iOS installation using Cocoapods. To install Trackingplan with Cocoapods, complete the following steps.
  1. First, add the Trackingplan dependency to your Podfile, like so:
pod 'Trackingplan', :git => 'https://github.com/trackingplan/trackingplan-ios.git'
  1. In your application delegate’s - application(_:didFinishLaunchingWithOptions:) method, set up the SDK like so:
//
//  AppDelegate.swift
//  ...

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.
        
        // Initialize Trackingplan SDK
        TrackingPlan.initialize(tpId: "#YourTrackingplanId")
        
        return true
}
  1. Import the SDK with this command: