Description
Is there an existing issue for this?
- I have searched the existing issues.
Which plugins are affected?
Messaging
Which platforms are affected?
iOS
Description
I am using Firebase messaging on both iOS and Android. Recently, I have upgraded the iOS version to minimum 14, as well as upgrading the packages to the firebase_messaging: 15.1.6 and firebase_core to 3.8.1. I am using currently Flutter 3.27
After the upgrade, I have observed that the Image notification on iOS is no longer working (on Android works as before). I have checked the following:
- If the certificate is valid. Yes, it is till October
- If the push notification option is enabled in my Identity: yes it is
- If I have the NotificationService code written and referenced in the correct place (Podfile), and yes it is there.
I have done no modification on the code compared to the previous releases. Android still works as expected. Text notifications are working fine on both platforms.
Reproducing the issue
Notification service code:
#import "NotificationService.h"
#import "FirebaseMessaging.h"
@interface NotificationService ()
@Property (nonatomic, strong) void (^contentHandler)(UNNotificationContent *contentToDeliver);
@Property (nonatomic, strong) UNMutableNotificationContent *bestAttemptContent;
@EnD
@implementation NotificationService
-
(void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler {
self.contentHandler = contentHandler;
self.bestAttemptContent = [request.content mutableCopy];// Use FIRMessaging's extension helper to handle image attachments.
[[FIRMessaging extensionHelper] populateNotificationContent:self.bestAttemptContent withContentHandler:contentHandler];
} -
(void)serviceExtensionTimeWillExpire {
// Deliver the best attempt at modified content before time runs out.
self.contentHandler(self.bestAttemptContent);
}
Notification header:
#import <UserNotifications/UserNotifications.h>
@interface NotificationService : UNNotificationServiceExtension
Code from Podfile:
target 'ImageNotification' do
use_frameworks!
pod 'Firebase/Messaging'
end
Firebase Core version
3.8.1
Flutter Version
3.27
Relevant Log Output
Flutter dependencies
Expand Flutter dependencies
snippet
Replace this line with the contents of your `flutter pub deps -- --style=compact`.
Additional context and comments
No response