Set up the bridge

Two channels are shared by both platforms:

ChannelNamePurpose
Method channelcom.spyne.spyne_sdk_flutter/spyneCommands (start)
Event channelcom.spyne.spyne_sdk_flutter/spyne_eventsShoot 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.


Did this page help you?