以编程方式检查iPhone上是否安装了配置文件 [英] Programatically check if there is a configuration profile installed or not on an iPhone

查看:394
本文介绍了以编程方式检查iPhone上是否安装了配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要开发一个应用程序,以编程方式检查手机上是否安装了配置文件(例如X)。

I need to develop an application that programatically checks if there is a configuration profile (called "X", for example) installed on the phone or not.

I尝试过这个链接上的解决方案,但它没有用。我还发布了一个问题已经与此解决方案相关,但没有答案。

I tried the solution already on this link but it didn't work. I also posted a question already related to this solution, but there has been no answer.

推荐答案

这很难做到。如果您在MDM解决方案的上下文中询问,那么设备上的应用程序可能会询问服务器安装的内容(假设您或您的公司在设备上开发MDM端和应用程序)。如果您的应用程序需要自行查找,那么唯一的方法是,如果您的应用程序是内部应用程序:
- 将其作为VOIP应用程序运行,以便它可以在后台定期运行
- 通过asl_queue监控iOS内核消息,以获取与安装或删除配置文件相关的消息。

This is very hard to do. If you are asking in the context of an MDM solution then your app on the device could ask the server for what is installed (assuming you, or your company, develop both the MDM-side and the app on the device). If your app needs to find out by itself then the only way to do this is if your app is an in-house app: - run it as a VOIP app so it can run regularly in the background - monitor the iOS kernel messages via an asl_queue for messages relating to a profile getting installed or deleted.

这篇关于以编程方式检查iPhone上是否安装了配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆