In my app, I use NSURLSession to download data from a server. The download happens in two scenarios: 1. on app launch 2. if refresh button pushed
I noticed one issue with the following operation:
- Open my app
- Put iPhone into sleep mode
- Awake iPhone out of sleep mode
- Push refresh button
- ERROR - I get "no connection error"
- Push refresh button again - download starts with success
It seems like my app doesn't have an internet connection active each time iPhone awakes from sleep mode. But it restores connection when I push refresh for the second time.