If you follow the FCM tutorial Send an image in the notification payload and encountered this error message:
My app was working fine but one day it stopped compiling. Apparently Flutter 1.20 changed the way it uses CocoaPod so the service extension no longer has the proper library configured. After some tinkering, I came up with this pod config, it has to be added to
'FirebaseMessaging/FirebaseMessaging.h' file not foundYou are on the right place, I'm going to show you how to fix it.
My app was working fine but one day it stopped compiling. Apparently Flutter 1.20 changed the way it uses CocoaPod so the service extension no longer has the proper library configured. After some tinkering, I came up with this pod config, it has to be added to
ios/Podfile
below the main Runner target.
target 'FcmImage' do use_frameworks! use_modular_headers! require File.expand_path('../.symlinks/plugins/firebase_core/ios/firebase_sdk_version.rb', __FILE__) firebase_sdk_version = firebase_sdk_version! pod 'Firebase/Messaging', "~> #{firebase_sdk_version}" end
FcmImage
is my extension name, replace it with yours- We can use a hardcoded version for
Firebase/Messaging
pod but doing so may require further modification in the future. In the example above, I extracted the SDK version fromfirebase_core
package.
Podfile
:
Comments
Post a Comment