问题
I'm trying to check if .mobileconfig file installed on the iOS device. I've tried an approach which described by this link http://blog.markhorgan.com/?p=701, but I'm fail with it. Maybe someone have other ideas or whatever ... ? Thank in advance.
回答1:
Why do you need to know if a configuration profile is installed on the device? Apple doesn't provide API to check if configuration profiles are installed as it would be a privacy invasion of the app into the user's setup (unless the configuration profile was installed by the app, which is usually vended through specific API like Network Extension). If you're an IT admin trying to keep devices configured and want to double-check they stay in compliance, you should be using MDM or Apple Configurator.
I see what the original post is doing to try and workaround this lack of API, but this only works if you are the one who gives the profile to the user (and so can add the extra certificate payload) and Apple would not be happy if they found this in your App Store submitted app.
来源:https://stackoverflow.com/questions/28278991/check-if-a-configuration-profile-is-installed-on-ios