ios - Call a method with delay of 15 sec irrespective of app state -


i need call method in every 15 seconds irrespective of fact, whether on view controller in foreground, whether in background or killed, need call @ times.

i know can delay task using nstimer

nstimer* mytimer = [nstimer scheduledtimerwithtimeinterval: 15.0 target: self                                selector: @selector(callafterfifteenseconds:) userinfo: nil repeats: yes]; 

but, wanted know implement fulfil condition. guess can use in app delegate need guidance implement correctly.

calling in app delegate class right place not work following cases.

  • it not work if app killed ground.
  • it not in background mode continuously. os stop process after period of time.

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -