c# - Events still appear in calendar app after RemoveEvents is called on them using Monotouch -


i developing iphone app using monotouch. able add events defaultcalendarfornewevents calendar (the same calendar i'm using find , delete them) without problem. however, every time call method in app remove event calendar, every instance of event still shows in calendar application if calendar application shut down , restarted, or ensured not running while app manipulating calendar. i'm getting breakpoints on removeevents line, , returning true. function:

public static void deschedulereminderevent(string presc_id_for_del) {     ekeventstore store = new ekeventstore();     ekcalendar calendar = store.defaultcalendarfornewevents;      if (calendar != null) {         nsdictionary readonlydic = dstor.dictionaryforkey("savedcalreminders");         if(readonlydic != null) {             nsmutabledictionary savedcalreminders = nsmutabledictionary.fromdictionary(readonlydic);             foreach(nsstring prescid in savedcalreminders.keys) {                 if(string.compare(prescid, presc_id_for_del) == 0) {                     ekevent currentevent = store.eventfromidentifier(savedcalreminders.objectforkey(prescid).tostring());                     if(currentevent != null) {                         savedcalreminders.remove(prescid);                         dstor.setvalueforkey(savedcalreminders, new nsstring("savedcalreminders"));                         store.removeevents(currentevent, ekspan.futureevents, new intptr());                     }                     break;                 }             }         }     } } 

can tell me i'm missing?

turns out problem elsewhere , monodevelop wasn't throwing errors. code above in fact remove events if cares use it.


Comments

Popular posts from this blog

Delphi Wmi Query on a Remote Machine -