natsu1211 / Alarm-ios-swift

clone of the official IOS clock alarm app written in swift
MIT License
388 stars 116 forks source link

Cancel only Our Alarm otherwise it will affect other module of the whole app which also use local notifications #20

Open garudaonekh opened 5 years ago

garudaonekh commented 5 years ago

Hi, I implement this alarm as part of another app. But i come to know that you remove all alarm so it will effect alarm set by other module of my app.

How to just remove only the alarms set by this alarm module?

thanks

natsu1211 commented 5 years ago

Hi, I think what you need is just some id to identify the parent "module". you can use a 2-d array, each 1-d array in it stores the alarm for each module, or a hash table for some 1-d arrays.

mobileonekh commented 5 years ago

Can we use the same identifier for all alarm set by this Alarm Swift or each identifir needs to be unique? for exmple, identifier= "myswiftlarm"

this way, we can remove all alarm with this name.