example/ if you are using the Userpilot Flutter repository). Save your existing iOS project configuration before migrating so you can restore it if needed.
FlutterGeneratedPluginSwiftPackage dependency. It includes userpilot_flutter, which installs the native Userpilot iOS SDK through its own Package.swift. You do not need to add the Userpilot package separately to the main app target.
Custom CocoaPods dependencies, including dependencies belonging to an app extension, may still need to be migrated manually. On another flutter run, you may see a notice like this:
Removing CocoaPods integration
Before removing CocoaPods, confirm that every plugin and custom Pod dependency has an SPM equivalent, and transfer any custom build settings or scripts from yourPodfile.
From your app directory:
Generated.xcconfig includes. Remove any remaining CocoaPods includes from custom configuration files as well. Delete the generated ios/Pods/ and ios/.symlinks/ directories if they remain.
In Xcode:
- If you manually configure push notifications and still reference
SwiftUserpilotFlutterPlugin, rename it toUserpilotFlutterPlugin. The compiler provides a rename diagnostic. See Push Notifications for the current callbacks. - Remove any remaining reference to
Pods.xcodeprojfrom the workspace. - Remove any remaining
Podsgroup from theRunnerproject. - Confirm that
FlutterGeneratedPluginSwiftPackageis linked toRunnerand that its scheme includes the Run Prepare Flutter Framework Script build pre-action. - If your app has a notification service extension, migrate its dependencies as described below.
Apps with a notification service extension
The Userpilot Flutter example has no notification service extension target. The Userpilot iOS 1.4.0 package exposes theUserpilot library and does not provide a separate notification service extension product. Skip this section for the standard example.
If your own app has an extension for another dependency:
- Select Runner > Project > Runner > Package Dependencies.
- Add that dependency’s Swift package and assign its extension-compatible product to your notification service extension target, following the dependency’s integration guide.
-
Keep the extension’s build number aligned with the containing app. If Xcode reports a warning such as:
Set the extension’s
Info.plistvalue to: -
Under Runner > Project > Runner > Info > Configurations, set the extension’s Based on Configuration File to the corresponding Flutter xcconfig for each build configuration. If the extension already has its own xcconfig, retain it and include the Flutter-generated settings there so
FLUTTER_BUILD_NUMBERis defined.
Going back to CocoaPods
From the app directory:Podfile, CocoaPods xcconfig includes, and any custom target configuration. Restore only the migration-related changes from version control, preserving other work. Then reinstall dependencies: