Skip to content

iOS SDK

The Monita iOS SDK observes the vendor traffic leaving your app — currently Meta (Facebook), Google Firebase, Adobe Analytics and Google Ads — and streams it to the same property dashboards, detectors and alerts as your web traffic.

Create a property with source type Mobile app (or reuse an existing property if you want web and app traffic together), configure your vendors, and copy the SDK token from Manage → Installation guide. See the Monita-side setup for vendor configuration.

  1. In Xcode, choose File → Add Package Dependencies and enter:

    https://github.com/rnadigital/monita-ios-sdk.git

    Select the master branch and finish — the SDK appears under Swift Package Dependencies.

  2. Add your token to Info.plist:

    <key>MonitaSDKToken</key>
    <string>Your-Token-Here</string>
  3. Initialize the SDK in your app delegate:

    import MonitaSDK
    func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
    ) -> Bool {
    MonitaSDK.configure(
    enableLogger: true, // verbose logging during rollout; disable for release
    batchSize: 10, // events per upload batch
    customerId: "123456", // joins app events to your customer IDs
    consentString: "Granted", // your consent state — feeds compliance reporting
    sessionId: "123456", // joins app events into sessions
    appVersion: "1.0"
    )
    return true
    }
  1. Run the app with enableLogger: true and watch the console for Monita upload logs returning 204.
  2. Fire a monitored vendor event (e.g. a Firebase log event) and check the property’s Visualisation view in the app — events appear within a minute or two.