Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create a persistent iOS banner notification [closed]

I don't know about early versions of IOS, but iOS 11 has a feature:

enter image description here

How to create a persistent notification programmatically with swift in my IOS app? I didn't found any docs about it.

I also found this answer: Create a persistent notification in iOS but it was a long time ago, maybe the situation has changed ?

like image 646
Alex Avatar asked Feb 15 '18 17:02

Alex


1 Answers

The feature you're describing is a local notification. See the docs here:

https://developer.apple.com/documentation/usernotifications

You cannot force notifications or their style on the user. That is what the Settings window in your screen shot is about. Only the user can decide whether your notification alert will appear as Temporary or Persistent. (The user can also decide to suppress your notifications completely.)

like image 162
matt Avatar answered Oct 03 '22 20:10

matt