Ios UNUserNotification Content Attachement (Image) resize/hide on notification expansion (Long click)

1.1k Views Asked by At

I have an app which shows local notification with content attachment as below image:

Notification in default state

Now when i click to show the notification actions button, the image gets enlarged and thus my image gets blurred. I tried to find the ways to show the action buttons but not expand the notification view to show the content attachment big and blur. My current output is

Expanded notification image

So, am i missing something with these rich notification in ios, or there is just no way to hide the content. Thanks in advance

1

There are 1 best solutions below

0
On

I had this problem months ago and after much research and trying I finally found the solution to the problem. I hope, this will be helpful for anyone who faces the same problem in near future.

For this I created a new target in my project i.e. Notification Content Extension and added in my project and updated the content of notification extension with a custom xib view

For more details, please go through the below link, I got all the help from it.

https://www.appcoda.com/user-notifications-ios12/