Flutter SDK Setup
Starting from FlareLane SDK version 1.1.0, FlareLane can be used with other push solutions.
To use FlareLane with other push solutions, you must follow some additional steps. Refer to iOS: Disable Swizzling for details.
$ flutter pub add flarelane_flutter
To ensure a smooth process for obtaining permission for push notifications from users, please make sure that both conditions below are satisfied.
- Using FlareLane SDK 1.2.0 or higher
- Set compileSdkVersion to at least 33
android/app/build.gradle
// ...
android {
compileSdkVersion 33
// ...
}
// ...
- 1.Enter
cd ios
in Terminal to go to the ios directory - 2.At the top of the
Podfile
, enterplatform :ios, '11.0'
or higher than version 11 - 3.Run
pod install
in the terminal - 4.Run the Xcode project by opening the <YOUR_PROJECT_NAME>.xcworkspace
- 5.Enter 11.0 or higher as
Deployment Target
of the PROJECT - 6.Enter 11.0 or higher as
Deployment Info
of the TARGET - 7.Go to
Signing & Capabilities
and click+ Capability
and addPush Notifications

Add the following code to
main.dart
. You can check your project ID at FlareLane console's Project.main.dart
import 'package:flarelane_flutter/flarelane_flutter.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
// Add the code below after WidgetsFlutterBinding.ensureInitialized()
FlareLane.shared.initialize("INPUT_YOUR_PROJECT_ID");
runApp(...);
}
After completing all the steps, build and run your app. Devices that subscribe to push notifications will be automatically added to FlareLane console's All Devices.
Before actual deployment, be sure to verify that the push notifications are being received properly on the device and that the statistics are accurately recorded when the push notifications are clicked.
- [iOS] The default app icon will be used as is
- [Android] No additional steps are required
Last modified 19d ago