Friday, 15 May 2015

ios - Architectural issue: Design of recurring events -



ios - Architectural issue: Design of recurring events -

i need have logic in our app, allows define recurring events (e.g. every tuesday, oder every 1st day of month) lead specific action in app.

i thought uilocalnotification idea, class send notification user , want process event only in app (if app not online, may next time app up)

another thought set list event , check every time app up, whether event due - seems quite old fashioned - hope there better.

thanks lot suggestion

you want utilize uilocalnotification in situation, fulfill needs described.

since said, event should fire whenever app active (in foreground) have add together custom logic create happen, not hard task , have multiple options here.

what suggest utilize app lifecycle methods of appdelegate, schedule , remove notifications when it's appropriate.

the uiapplicationdelegate protocol contains 2 relevant methods case (actually bit more, these 2 job you...). first have applicationwillenterbackground:, that's should remove scheduled notifications. in method applicationdidbecomeactive: can reschedule notifications, 1 called every time app coming foreground again.

let me know if have farther questions :)

ios xcode architecture recurring

No comments:

Post a Comment