geolite_flutter

A Flutter plugin for integrating Geosentry SDK on Android and iOS.

Features

  • Android AAR integration
  • iOS framework integration

Getting Started

Add geolite_flutter to your pubspec.yaml dependencies and follow platform-specific setup instructions.

iOS Integration

AppDelegate Setup

To enable background location and proper lifecycle handling, add the following to your AppDelegate.swift:

import GeosentrySDK

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    Geosentry.setupBackgroundHandlers(application)
    // ...existing code...
}

func applicationDidBecomeActive(_ application: UIApplication) {
    Geosentry.applicationDidBecomeActive()
    // ...existing code...
}

func applicationWillTerminate(_ application: UIApplication) {
    Geosentry.applicationWillTerminate()
    // ...existing code...
}

Usage in Dart

import 'package:geolite_flutter/geolite_flutter.dart';

// Initialize SDK
final response = await GeoliteFlutter.initialiseSDK(apiKey, cipherKey, userId);

// Stop tracking
await GeoliteFlutter.stopTracking();

License

MIT

Libraries

geolite_flutter