Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement Notification Image part in IOS from the official documentation in swift code instead of C

I'm trying to implement the last part in the notification image in apple notifications integration here

This is the C Code in the documentation:

- // Modify the notification content here...
- self.bestAttemptContent.title = [NSString stringWithFormat:@"%@ [modified]", self.bestAttemptContent.title];

- self.contentHandler(self.bestAttemptContent);
+ [[FIRMessaging extensionHelper] populateNotificationContent:self.bestAttemptContent withContentHandler:contentHandler];

I want to convert it to swift code so i can use it in my Project ImageNotification.swift

like image 677
Ziyad Mansy Avatar asked Sep 18 '25 06:09

Ziyad Mansy


1 Answers

Judging by the Firebase swift documentation it should probably look something like this:

Messaging.serviceExtension().populateNotificationContent(self.bestAttemptContent, withContentHandler: contentHandler)
like image 76
Slavenko Miljic Avatar answered Sep 20 '25 21:09

Slavenko Miljic