Set up the bridge
Two channels are shared by both platforms:
| Channel | Name | Purpose |
|---|---|---|
| Method channel | com.spyne.spyne_sdk_flutter/spyne | Commands (start) |
| Event channel | com.spyne.spyne_sdk_flutter/spyne_events | Shoot lifecycle events |
iOS
Register the plugin when Flutter creates its implicit engine:
// ios/Runner/AppDelegate.swift
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
SpynePlugin.register(with: engineBridge.applicationRegistrar.messenger())
}The plugin owns both channels, initializes the SDK with SpyneAutomobileSDK.initialize(apiKey:), and drives the Builder.
Android
Set up the channels in MainActivity and drive the same Builder.
⚠️ Spyne activities extend AppCompatActivity, so your <application> must use an AppCompat theme (Theme.AppCompat.DayNight.NoActionBar), or ShootPreparationActivity will crash. Keep Flutter's LaunchTheme on MainActivity.
Updated about 1 hour ago
Did this page help you?
