0

As for the identifier the documentation says:

A unique identifier for the request (if identifier is not unique, notifications are not delivered). You can use this identifier later to cancel a request that is still pending. This parameter must not be nil.

It's says it's not delivered. However according to here and according to my own verification it does get delivered, but it rewrites the previous notification sent with that identifier.

So I'm guessing the apple documentation should have said:

if identifier is same, it will only update the previous sent notification. If you want a separate notification, you must change its identifier.

Am I right about the documentation being wrote in a confusing way?

Mogsdad
  • 44,709
  • 21
  • 151
  • 275
mfaani
  • 33,269
  • 19
  • 164
  • 293
  • Overtime I'm slowly learning not to trust every piece of documentation I see as some could be written in a confusing manner or some could just be purely wrong/outdated – mfaani Jul 11 '17 at 16:22

1 Answers1

0
let request = UNNotificationRequest(identifier: "textNotification", content: content, trigger: trigger)

This is the request that makes notification trigger with identifier as you can see.So indeed yes notifications do require an identifier,providing same identifier and not keeping unique will only let you trigger one notification at a time(Which is the latest one you schedule)ignoring any other you scheduled . But in order to get multiple notification one after another or some other time yes you require unique identifier.That is what i understand behind concept of unique identifier.

Tushar Sharma
  • 2,839
  • 1
  • 16
  • 38
  • I'm not asking as to how it works. I'm asking whether or not the documentation is correct? – mfaani Jul 11 '17 at 17:18
  • @Honey A unique identifier for the request (if identifier is not unique, notifications are not delivered).In my point documentation is little confusing here .Not having unique identifier will only trigger latest notification and not any other that's what it means to say i guess. – Tushar Sharma Jul 11 '17 at 17:21