In iOS, you can modify the notification content before displaying it using a Notification Service Extension . A Notification Service Extension is an app extension that is used to modify the content of a remote notification before it is displayed to the user. To modify the notification content, you can follow these steps: Create a Notification Service Extension target in your Xcode project. In the extension's Info.plist file, set the NSExtensionPrincipalClass key to the name of your extension's principal class. Implement the didReceive(_:withContentHandler:) method in your extension's principal class. This method is called when a notification is received by the system. In the didReceive(_:withContentHandler:) method, modify the content of the notification as desired. You can change the notification's title, subtitle, body, sound, badge, and attachments. Call the contentHandler parameter with the modified notification content. The system will then display the modified not
Benjamin Franklin