Skip to content

Instantly share code, notes, and snippets.

@pgpt10
Created May 31, 2018 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pgpt10/fff9aec10acace204a5605c75fe6bb30 to your computer and use it in GitHub Desktop.
Save pgpt10/fff9aec10acace204a5605c75fe6bb30 to your computer and use it in GitHub Desktop.
override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void)
{
self.contentHandler = contentHandler
bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)
if let bestAttemptContent = bestAttemptContent
{
// Modify the notification content here...
bestAttemptContent.body = "Address: Sea Shells Apartments, Mumbai" //Here..!!!
contentHandler(bestAttemptContent)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment