The plugin ships SPM alongside CocoaPods. Flutter 3.44+ enables SPM by
default (flutter#184495); older releases need
flutter config --enable-swift-package-manager (SPM needs Flutter ≥ 3.29; the
per-project config: block in pubspec.yaml needs ≥ 3.35). The Runner gets
Mindbox automatically through the plugin — only two Mindbox-specific steps are
manual.
⚠️ Don't load Mindbox through both managers. On 3.44+ SPM is on by default, so leavingpod 'Mindbox'in yourPodfilelinks Mindbox twice → launch crashFatal error: ... Expected CDEvent but found CDEvent. To stay on CocoaPods, opt out:enable-swift-package-manager: false(pubspec) orflutter config --no-enable-swift-package-manager.
Runner project → Package Dependencies → + →
https://github.com/mindbox-cloud/ios-sdk, rule Up to Next Major from your
SDK version (e.g. 2.15.1 — a range, not "Exact"). Add the products:
| Product | Add to target |
|---|---|
MindboxNotificationsService |
Notification Service Extension |
MindboxNotificationsContent |
Notification Content Extension |
Mindbox |
None — Runner already gets it via the plugin |
Delete pod 'Mindbox' (Runner) and pod 'MindboxNotifications' (each
extension) from the Podfile, then flutter run. If every plugin you use
supports SPM, drop CocoaPods entirely — delete the Podfile and
pod deintegrate (see example/flutter_example).
- ObjC
MindboxFlutterAppDelegateObjcis CocoaPods-only and deprecated; SPM apps use the SwiftMindboxFlutterAppDelegate. - Project-level
ios-sdkand the plugin's copy are the same package (same URL) → one resolved version. Keep your range inclusive of the plugin's pin; don't pin a different "Exact".