sathyapriya
sathyapriya

Reputation: 1

Internet availability checking automatically in app after some period of time interval in objective c

I have developed an ios app which stores admission form data in sqlite when there is no internet connection in objective c .consider a case like , after some time internet comes and data in sqlite should be fetched and updated automatically in server through api call without killing or close the app. is it possible??

Upvotes: 0

Views: 30

Answers (1)

Milan Nosáľ
Milan Nosáľ

Reputation: 19737

You can use Reachability and add a delegate to it - it will notify you when the reachability state changes. It's better to get notified on a change than having to ping it every few seconds.

There are examples on how to use it on their page, so I'm not going to repeat it here.

Upvotes: 1

Related Questions