> This page is part of the [Customer.io documentation](https://docs.customer.io). For the complete index, see [llms.txt](https://docs.customer.io/llms.txt).
> Last updated: September 14, 2026
> To take actions in Customer.io from an agent, use the [Customer.io CLI](https://docs.customer.io/ai/cli/get-started.md) or the [MCP server](https://docs.customer.io/ai/mcp/get-started.md).
> This page has tabbed examples for: iOS, Android. Add `?tab=<name>` to the URL to get only that tab, and repeat it for more than one, for example `?tab=ios&tab=android`.

# Quick start guide

Before you can take advantage of our SDK, you need to install and initialize the SDK.

Let your AI agent set up the SDK

Our mobile skills teach your AI coding agent how to install the SDK, set up push, and troubleshoot problems. Your agent reads these skills when you connect the Customer.io plugin for [Claude Code](https://docs.customer.io/ai/plugins/claude/), [Cursor](https://docs.customer.io/ai/plugins/cursor-grok-bot/), or [ChatGPT and Codex](https://docs.customer.io/ai/plugins/chatgpt-codex/), the [MCP server](https://docs.customer.io/ai/mcp/get-started/), or the [CLI](https://docs.customer.io/ai/cli/get-started/). Or open your mobile source in Customer.io and click **Set up with an agent**.

## Setup process overview

Flutter lets you build native mobile apps using Dart. Our Flutter SDK helps you integrate Customer.io to `identify` people, `track` their activity, and send both push notifications and in-app messages.

1.  [Install and initialize the SDK.](#install-init)
2.  [Identify and Track](#identify-and-track)
3.  [Push Notifications](#push-notifications)
4.  [In-App](#in-app)

## 1\. Install the SDK

1.  In your project folder install the `customer_io` package:

    ```
    flutter pub add customer_io
    ```

    This adds a line to your package’s `pubspec.yaml`

    ```
    dependencies:
       customer_io: ^5.2.0
    ```

2.  Set up your project to support iOS and/or Android:

    <!-- tabs -->

    <!-- tab: iOS -->

    #### iOS

    1.  In your terminal, run `pod install --repo-update --project-directory=ios`. This adds the required iOS dependencies to your project. When the process is complete, you’ll see a message like this: `Pod installation complete! There are X dependencies from the Podfile and Y total pods installed.`

    <!-- /tab -->

    <!-- tab: Android -->

    #### Android

    1.  Go to the Android subfolder and include [google-services-plugin ↗](https://developers.google.com/android/guides/google-services-plugin) by adding the following lines to the project-level `android/build.gradle` file:

        ```
        buildscript {
           repositories {
              // Add this line if it isn't already in your build file:
              google()  // Google's Maven repository
           }

           dependencies {
              // Add this line:
              classpath 'com.google.gms:google-services:<version-here>'  // Google Services plugin
           }
        }

        allprojects {
           repositories {
              // Add this line if it isn't already in your build file:
              google()  // Google's Maven repository
           }
        }
        ```

    2.  Add the following line to `android/app/build.gradle`:

        ```
        apply plugin: 'com.google.gms.google-services'  // Google Services plugin
        ```

    3.  Download `google-services.json` from your Firebase project and copy the file to `android/app/google-services.json`.

    <!-- /tab -->

    <!-- /tabs -->

3.  Initialize the SDK:

    1.  Add your *CDP API key* and *site ID* to your configuration.

        *   **CDP API Key**: You’ll find this key in your [*Flutter* connection](https://docs.customer.io/integrations/sdk/flutter/getting-started/auth/#get-your-cdp-api-key).
        *   **Site ID**: You’ll find this value in your workspace under **[Settings > Workspace Settings > API and webhook credentials](https://fly.customer.io/workspaces/last/settings/api_credentials)**.
    2.  Initialize the SDK in your app. In your `main.dart` file—or wherever you want to initialize the `CustomerIO` plugin—add the code below:

        ```
         import 'package:customer_io/customer_io.dart';
         import 'package:customer_io/customer_io_config.dart';
         import 'package:customer_io/customer_io_enums.dart';

         await CustomerIO.initialize(
          config: CustomerIOConfig(
            cdpApiKey: 'cdpApiKey',
            region: Region.us, // Replace with Region.EU if your Customer.io account is in the EU.
            inAppConfig: InAppConfig(siteId: 'siteId'),
          ),
        );
        ```

    3.  Run your application to ensure everything is set up correctly.

## 2\. Identify and Track

1.  Identify a user in your app using the `CustomerIO.identify` method. You *must* identify a user before you can send push notifications and personalized in-app messages.

    ```
    CustomerIO.instance.identify(userId: email, traits: {
    "name": user.displayName,
    "email": user.email,
    "age": user.age,
    });
    ```

2.  Track a custom event using the `CustomerIO.track` method. Events help you trigger personalized automations and track user activity.

    ```
    CustomerIO.instance.track(name: "add-to-cart", properties: {"product": "shoes", "price": "29.99"});
    ```

3.  Track screen views to trigger in-app messages associated with specific screens.

    ```
    CustomerIO.instance.screen(title: "screen-name", properties: {"property": "value"});
    ```

## 3\. Push Notifications

<!-- tabs -->

<!-- tab: iOS -->

#### iOS

1.  Set up your push notification credentials in Customer.io: [Upload your Firebase Cloud Messaging server key](https://fly.customer.io/workspaces/last/settings/actions/push/ios) (.json format). Our Flutter SDK uses FCM for both iOS and Android push notifications.
2.  Request push notification permissions from the user. You can do this through [Firebase ↗](https://firebase.google.com/docs/cloud-messaging/flutter/receive) or any other package.
3.  To ensure that metrics are tracked, configure Background Modes. In Xcode, enable “Remote notifications” under Capabilities > Background Modes.

<!-- /tab -->

<!-- tab: Android -->

#### Android

1.  Set up your push notification credentials in Customer.io: [Upload your Firebase Cloud Messaging server key](https://fly.customer.io/workspaces/last/settings/actions/push/android) (.json format).
2.  Request push notification permissions from the user. You can do this through [Firebase ↗](https://firebase.google.com/docs/cloud-messaging/flutter/receive) or any other package.
3.  Ensure that you:
    1.  [Add your Google Firebase Cloud Messaging (FCM) key to Customer.io and enable push notifications for Android](https://docs.customer.io/messaging/push-developer-guide/#fcm-setup). Our Flutter SDK receives push notifications from FCM.
    2.  Add notification icon resources:
        *   Place a notification icon file named `ic_notification.png` in your drawable folders.
        *   Make sure your app’s `AndroidManifest.xml` has the proper FCM permissions.

<!-- /tab -->

<!-- /tabs -->

## 4\. In-App

1.  To enable in-app messaging, all you need to do is add your site ID. Remember, you’ll find your site ID under **[Integrations > Customer.io API: Track](https://fly.customer.io/workspaces/last/settings/api_credentials)** in the *Connections* tab.

2.  Ensure that the SDK is initialized with the site ID in your app. You can call the `initialize` method from your components or services:

    ```
     import 'package:customer_io/customer_io.dart';
     import 'package:customer_io/customer_io_config.dart';
     import 'package:customer_io/customer_io_enums.dart';

     await CustomerIO.initialize(
     config: CustomerIOConfig(
         cdpApiKey: 'cdpApiKey',
         region: Region.us, // Replace with Region.EU if your Customer.io account is in the EU.
         inAppConfig: InAppConfig(siteId: 'siteId'),
         pushConfig: PushConfig(
         android: PushConfigAndroid(
             pushClickBehavior:
             PushClickBehaviorAndroid.activityPreventRestart,
         ),
         ),
     ),
     );
    ```
