timer - iOS Run Code Once a Day -


the idea behind app simple: download file. app people not within internet access range, need know at, 9:00 am, download file hard drive. there button within app manually well, i've got working.

as understand it, difficult if possible. know ios doesn't multitasking, aware allow background timer functions. open sort of suggestions might have accomplish this, if means writing separate app. thanks.

edit: see there possibility of working notifications, or maybe calendar. ideas in category welcomed.

edit 2: read external server initiating app, gave no description.

here's situation regarding background execution , notifications , timers etc. in relation app scheduling activity happen periodically.

  1. an app cannot execute in background unless:

    1. it requests time os so. done using beginbackgroundtaskwithexpirationhandler. not specified (intentionally) apple how long time is, in practice around 10 minutes.

    2. an app has background mode, modes are: voip, audio, location, newstand. if has 1 of these types app cannot execute without restrictions. rest of discussion assumes app not have background mode.

  2. when app suspended cannot rouse directly. cannot have scheduled nstimer, cannot make use of performselector:afterdelay. etc.

    the way app can become active again if user make active. user can via of following:

    1. launch app directly icon

    2. launch app in response local notification scheduled app while active.

    3. launch app in response remote notification sent server.

    4. a few others: such url launching if app registered deal launching via url; or if registered capable of dealing type of content.

if app in foreground when local/remote notification fires app receives directly.

if app not in foreground when local/remote notification fires app not receive it. there no code executed when notification fires!

only if user selects notification app become active , can execute.

note user can disable notifications, either entire device, or specific application, in case user never see them. if device turned off when notification due fire lost.


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -