I am working on a Flutter app that uses the FlutterFire firebase_messaging package.
I need to add delivery reports to my app, but the FlutterFire library does not support this.
So I must implement this native swift code.
But for this code to compile I must add the firebase-ios-sdk package to my 'Runner' project.
When building I now get the error...
Error (Xcode): redefinition of module 'Firebase'
Because both my Runner project and the FlutterFire dependency are both including the firebase-ios-sdk.
How can I import FirebaseMessaging in native swift code, while using the firebase-ios-sdk dependency that FlutterFire already imports?
If I try to add a library dependency from the existing flutter dependency (I go to General > Library Dependency > select "Pods > firebase_messaging"), the swift code is not able to resolve the 'import FirebaseMessaging' statement.


FlutterFireand add your code in that package and refer cloned package in pubspec.yaml file. Now FlutterFire contain your code as well as FlutterFire original code