0

I am building an ios application that requires internet connection via wi-fi in order to talk to web service. Now before anything, i want my application to run a background process that checks internet availability and when connected talk to web service.

Any body knows how to implement this in background process?

I already use this solution to check whether there is an internet connection or not

Easiest way to detect Internet connection on iOS?

but I want to know how to run this process in the background in order to work even the application is closed.

Community
  • 1
  • 1
etab
  • 199
  • 1
  • 14

1 Answers1

1

You can have your checks done when in foreground. Its not allowed to for an app to execute code in background continuously(although you can execute some code when you go to background initially). If you are not planning to publish this app in app store and its a enterprise solution, then you should explore ways to stay in background by running a music file (without sound) to get CPU Cycles. It worked for me..

TorukMakto
  • 1,936
  • 2
  • 21
  • 37
  • can i download the app on my iphone without publishing it on the app store ? – etab Sep 01 '13 at 10:14
  • yes, provided you have added device UUID in your provisioning profile. Although apple developer license would allow you to add only 100 devices.. – TorukMakto Sep 01 '13 at 10:16
  • and after 100 ? i am building this app for local customers and they are more than 100 !! another thing that i cant add device to provisioning profile do i have to pay for that ? – etab Sep 01 '13 at 10:22
  • There is a provision for enterprise license. Yes you have to pay and get apple enterprise development license. – TorukMakto Sep 01 '13 at 10:24