iOS - 防止删除iPhone配置文件或检查是否已安装 [英] iOS - Prevent iPhone Configuration Profile from being deleted OR check to see if it's installed
问题描述
我正在开发一款iOS企业应用程序,该应用程序依赖于手机上的配置文件。不幸的是,用户可以取消此配置文件,这真的搞砸了我们的应用程序。
所以我想知道 a)是否可以防止配置文件被删除或
b)有没有办法检查配置文件是否已安装(比如,在运行时,如果不存在,我们可以再安装一次)?
-
如果您希望配置文件不被用户篡改/禁用, 这个有可能!如果您使用 Apple Configurator 在常规选项卡中构建
.mobileconfig
文件,请选择security
asnever
。请注意:一旦配置文件安装在设备上,除非您恢复设备,否则无法恢复 -
长话短说目前没有记录的方法甚至以编程方式调用/安装配置文件(
.mobileconfig
)文件到设备上:所以如果你正在考虑检查配置文件是否存在,如果不安装它,它是不可能的(至于目前为止的可用文档) - 如果你确实找到了让我知道的方式
注意:
.mobileconfig
文件只能通过Safari / Mail运行。
这个类似的SO讨论可能会有所帮助:在iPhone上安装配置文件 - 以编程方式
I'm working on an iOS enterprise app that relies on an Configuration Profile being put on the phone. Unfortunately, the user can "cancel" this profile, which really screws with our app.
So I was wondering if a) is it possible to prevent a configuration profile from being deleted OR
b) is there a way to check to see if a configuration profile is installed already (say, at runtime, then we can just install it again if it's not there)?
If you want the configuration profile not to be tampered with / disabled by the user, this is possible! If you're using Apple Configurator to build your
.mobileconfig
file in the generals tab selectsecurity
asnever
. Be aware: once the profile is installed on the device it cannot be reverted unless you restore the deviceThe long story short is there is no current documented way to even programmatically call / install a configuration profile (
.mobileconfig
) file onto the device: so if you're thinking about checking whether the profile exists and if not to install it, it's impossible (as for available documentation thus far) - if you do find a way let me know
Note:
.mobileconfig
files can only run through Safari / Mail.
This similar SO discussion may help: Installing a configuration profile on iPhone - programmatically
这篇关于iOS - 防止删除iPhone配置文件或检查是否已安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!