检测用户是否在其设备上安装了特定配置文件

Detect if user has a specific Profile installed on their device

我今天遇到了这个应用程序,Adblock Mobile,它在用户设备上安装了一个配置文件,并通过其 secure VPN 将所有网络流量路由到 disable/block在网上冲浪和使用实现广告的应用程序时的广告,例如横幅广告或插页式广告。我的应用程序收入的大部分是基于广告的,所以这让我有些担心,我真的很惊讶 Apple 会批准这个应用程序,因为它阻碍了 iAd 按预期工作。

有没有办法访问用户已安装的配置文件,以检查是否从我的应用程序安装了此配置文件?

不,由于沙盒,这是不可能的。如果您可以通过编程方式检查或安装配置文件,那将是一个巨大的安全问题。 Apple 对安全性非常严格。

您可以在此处找到有关该主题的更多详细信息:iOS - Prevent iPhone Configuration Profile from being deleted OR check to see if it's installed

Retrieving data programmatically from a Configuration Profile in IOS

如何安装配置文件: http://www.howtogeek.com/176195/why-configuration-profiles-can-be-as-dangerous-as-malware-on-iphones-and-ipads/

不,无法检查配置文件是否存在。一些来源:

  • “...如果您正在考虑检查配置文件是否存在,如果不安装它,那是不可能的(就目前可用的文档而言)”,2012 年 10 月,iOS - Prevent iPhone Configuration Profile from being deleted OR check to see if it's installed

  • Apple dev forum: How can I read the configuration profile, 2011. "Not specifically. However, iOS 7 added a bunch of enterprise integration features that might allow you to achieve the same goal via a different path.", 2013.


但是如果您只想知道您的广告是否投放,您可以通过另一种方式做到这一点:只需尝试加载您的一些广告并查看它们是否实际加载并采取相应行动。

这应该很容易实现。这就是您所需要的,您只关心广告被屏蔽的事实,而不是以何种方式屏蔽。

很多网站都这样做。例如。荷兰科技网站 tweakers.net 向屏蔽广告的人发送消息。我相信一些 iOS 应用程序也将很快开始这样做。

检查这个 SO 问题 How to detect Adblock on my website? 以了解网站处理此问题的一些方式。