SDK Installation

Prev Next

This guide helps you understand the requirements for SDK setup, installations, and how to initialize it.

Required For Setup

  • A Mac with Xcode is installed
  • An iOS device. The Xcode simulator does not support push notifications, so you must test on a real device.
  • An Apple Push Services Certificate for iOS
  • An Android device or emulator with minimum API 21
  • A Firebase Cloud Messaging Server Key and google-services.json imported in your app
  • Android Studio.

Required Installation

1. To add Insider Flutter SDK to your project, edit your project's pubspec.yaml file.

dependencies:
  flutter_insider: 2.1.0

2. Run flutter packages get to install the SDK.
flutter packages get

3. In your Dart code, you can use the following:

import 'package:flutter_insider/flutter_insider.dart';
Your title goes here
It might be required to import other products of Insider Mobile SDK based on your needs (e.g., Insider Product, Insider User, Insider Event, etc.)

Initialize SDK

1. Call Init in main.dart inside initState.

your title goes here
Keep in mind that "your_partner_name" is the given name of the app panel on the Insider side. You can gather this information from the Insider One team or log in to the Insider panel and navigate it yourself. It is placed on the top right of the panel, next to the username.

@override
void initState() {
  super.initState();
  initInsider();
}


Future initInsider() async {
  if (!mounted) return;
    
  // Call in async method.
  await FlutterInsider.Instance.init("your_partner_name","appgroup", callback);


  // This is an utility method, if you want to handle the push permission in iOS own your own you can omit the following method.
  FlutterInsider.Instance.registerWithQuietPermission(false);    
}


void callback(){


}
Your title goes here
For Android integration, you can send the appgroup value as an empty string.

2. Complete the Android and iOS native steps.