I am working on an iOS/iphone app where I want users to actually have internet for the app to work.
I have some data fetched from the internet, so the app won't work as expected if the user is not connected.
I have many views, where I want to integrate a solution for this.
I thought of many ways to solve that, but I am not sure if there's a better 1.
Adding check for internet in the app delegate, didfinihlanchingwithoptions. Issue -> the check will only happens when the user 1st open the application and not when he returns after a call for example, and will only happen on the rootviewcontroller.
Adding the check in viewwillappear of each view. This works, and I put the checks in a way that the view won't block during trying to connect. But, what if the view was loaded, and then the user got disconnected.
Should I implement an NSTimer that keeps checking for internet? If yes, won't this be too heavy on the app? If No, what should I do?
Thank you.