How to detect wifi network change in iOS when app is in background

0

How to detect wifi network change in iOS when the app is in background and suspended states?

I want the iOS app to be notified whenever there is a change in network. For eg: I want the app to be notified when the device switches from WiFi-1 to WiFi-2. The app will be published on App Store.

I tried using Hotspot Helper for this. It works perfectly. But in order to use Hotspot Helper we need to get an entitlement from Apple. Apple provides that entitlement only if we are creating hotspots which is not in our case. So, we cannot use Hotspot Helper.

How to detect wifi network change in iOS when the app is in background and suspended states?

There is no supported way to do this unless your app has the need to run in the background. For example, if you have an app that plays audio, or an app that has a business case for using an app extension that is running. However, do not just add these things to your app to get background runtime, this is a recipe for all sorts of other issues and edge cases.

We got the Hotspot Helper Entitlement from Apple :)

How to detect wifi network change in iOS when app is in background
 
 
Q