This article explains the transmission of interrogator samples when Agent is in the background, suspended or a terminated state with the backgrounding enhancements made with iOS agent 5.5
- Silent APNS: Silent APNS are just like standard iOS APNS, except that they are not visible to the user. It is a way to indicate an app to perform any specific tasks. In the AirWatch console, silent APNS can be scheduled in MDM sample scheduler OR it can be sent on demand by querying the device. The iOS Agent utilizes silent APNS to send all interrogator samples to the AirWatch server.
- Background Fetch: Background Fetch is a mechanism by which apps can let iOS launch itself on a periodic basis. It is solely on iOS to decide the best times to carry out background fetch for an app. Some of factors that play a role in this include what times the user launches the app manually, network connectivity, battery level, etc. Although we cannot specify the exact interval at which background fetch should occur, we can specify an interval before which it shouldn't occur. This setting can be configured under Agent settings once background fetch is enabled. The iOS Agent utilizes occurrences of background fetch to send all interrogator samples to the AirWatch server.
- Location Change: If collect location data is enabled under Agent settings, the iOS Agent app starts monitoring for significant location change. iOS reports significant location change event to Agent app whenever the user covers some distance (usually 500m or more). The exact distance is undetermined and not public. The iOS Agent sends all interrogator samples to the AirWatch server on every significant location change event.
Besides Beacon samples, the iOS Agent sends the following Interrogator samples to the AirWatch server, which helps admins manage and perform required actions on devices that violate console policies. Examples include:
- System Module
- Location Samples
- Cellular Data Samples
- Network Adapter Module
- WLAN2 Module
All the Interrogator samples are sent to the AirWatch server in the following scenarios:
- Launch: When iOS Agent app is launched by user.
- Send Data: When user manually sends the data by going to My Device > Send Data.
- Silent APNs: When device receives a silent APNs (either by MDM sample scheduler or manually querying the device).
- Background Fetch: When Agent app launches due to background fetch.
- Location Change: When significant location change is reported by iOS to Agent app.
Frequently Asked Questions
Q: Do MDM Sample Scheduler and Device Query work if app is in terminated/suspended state?
A: MDM Sample Scheduler and Device Query will continue to work to send interrogator samples if Agent is in background, terminated or suspended states. However, if Agent was terminated by user, it won't work until user launches the app or device is rebooted.
Q: Interrogator samples are not seen in AirWatch console even if MDM sample scheduler is configured correctly. Why?
A: If app was terminated by user, then silent APNS are not received by device until user launches the app OR device is rebooted. Additionally, iOS takes into account several other factor's before delivering silent APNS to an app. For example - Silent APNS are received more reliably when on Wi-Fi than on cellular data. Similarly, if device's battery level is at a lower end, silent APNS are less likely to be delivered. Device needs to be at a healthy battery level or needs to be plugged into charging for silent APNS to work best.
Q: Interrogator samples are not seen in AirWatch console if device is queries from AirWatch console. Why?
A: Please refer to previous answer.
Q: Interrogator samples are not seen every time for MDM sample scheduler. Why?
A: iOS prevents delivery of silent APNS to the app if they are sent too frequently. iOS delivers silent APNS to the app only if it determines it is energy efficient to do so. If the energy or data budget for the device has been exceeded, Agent app will not receive any more APNS until the budget has been reset. This occurs once a day and cannot be changed by user or developer action.
Q: Does background fetch work if app is in terminated/suspended state?
A: Background Fetch will continue to work to send interrogator samples if Agent is in background, terminated or suspended states. However, if Agent was terminated by user, it won't work until user launches the app or device is rebooted.
Q: Interrogator samples are not seen in AirWatch console even if background fetch is configured under Agent settings. Why?
A: If app was terminated by user, then background fetch events are not received by device until user launches the app OR device is rebooted.
Q: Interrogator samples are not seen periodically in AirWatch console even after configuring background fetch interval in Agent settings. Why?
A: Apps cannot specify the exact interval at which background fetch should occur. It is solely on iOS to decide the best times to carry out background fetch for an app. The background fetch interval under Agent settings represents the interval until when background fetch must NOT occur. Thereafter, it's upon iOS to decide the best times to trigger background fetch for an app.
Q: Does iOS report significant location change if app is in terminated/suspended state?
A: Yes, if app is in terminated/suspended state and significant location change occurs, iOS launches the app in background to process the new location.
Q: If app is killed by the user, would significant location change continue to work?
A: Yes, even if app is killed by the user, when significant location change occurs, app is launched in background to process the new location.
Q: Location samples are not seen on periodic basis in AirWatch console when user is constantly moving. Why?
A: For significant location monitoring, iOS decides the best times to send the new locations to the apps. Generally, iOS reports new location for 500m or more distance covered. This distance could be anything greater than 500m, best determined by iOS. During AirWatch's internal testing, new location updates were always received at an interval of 1 mile or so.
Q: If device is not connected to a network while user is moving, would Agent still report location samples to AirWatch server?
A: If device has GPS chip, Agent app still continues to receive location changes and will store them locally. Once device is connected to a network, stored location samples will be sent to AirWatch server whenever it gets the opportunity to. However, if device doesn't have GPS chip, then only those locations are sent when device gets connected to a network.
Q: If user is not moving, would Agent report the same location with updated timestamp whenever it gets opportunity to send samples to server?
A: Agent app samples the locations with the timestamp provided by iOS. Thus, if user is not moving, then the last available location will continue to be sent with old timestamp. For example - if last location change reported by Agent was at 6PM and user stops moving, then Agent will continue to send the same location with same timestamp (6PM) whenever it gets opportunity to send samples to server. However, there are still possibilities of Agent sending newer/better location with newer timestamp even if user stops moving.
Q: If device is locked with password, will Agent continue to send interrogator samples to AirWatch server?
A: Yes, Agent will continue to send the interrogator samples in all of the previously mentioned scenarios except for MDM sample schedule, background fetch and device query when its killed by user.