Programmatically verify an MDM profile (configuration) has been successfully pushed to an iOS device?

后端 未结 1 513
时光说笑
时光说笑 2021-02-10 07:53

I am writing an iOS client app that sends a request to a server who turns around and requests that an updated configuration profile be pushed to my device via external MDM (AirW

1条回答
  •  灰色年华
    2021-02-10 08:29

    It will not be possible for your app to determine whether a configuration profile has been installed as no (public) APIs exist that allow an app to query it's installed profiles nor will you be able to determine whether an MDM push notification has been sent to the device. You will have to rely on your MDM (AirWatch) to determine with certainty that the profile has been installed.

    When AirWatch pushes the profile to the device it will receive an acknowledgement that the profile has been installed but it's not until AirWatch re-queries all installed profiles that it will report that the profile has been installed. What I have seen is that soon after AirWatch sends a profile installation command it will re-query the list of profiles on the device so it may be feasible to just poll the server a few times and wait until you see that the profile has been installed. I have not spent much time in the AirWatch REST API in detail but I assume this is possible.

    Other than this, the only other option I can see is for you to do something with Reachability to detect whether the VPN tunnel is being setup.

    0 讨论(0)
提交回复
热议问题