Server Health Monitoring (Host Reachability)
Goal
Monitor the configured host reachability and switch to a fallback when it becomes unreachable.
Prerequisite
Set the host address in Essential Kit settings (Network Services section).
Actions used
NetworkServicesStartNotifierNetworkServicesOnHostReachabilityChanged(persistent listener)NetworkServicesGetStatus(optional)
Variables
isHostReachable(Bool)
Flow
On app launch: call
NetworkServicesStartNotifier.Keep
NetworkServicesOnHostReachabilityChangedin an active state:eventReachableβ use primary hosteventUnreachableβ show maintenance / switch to backup
Optional: call
NetworkServicesGetStatuswhenever you need the latest booleans (isHostReachable,isInternetActive).
Last updated
Was this helpful?