iOS - Prevent iPhone Configuration Profile from being deleted OR check to see if it's installed

后端 未结 2 1652
醉话见心
醉话见心 2020-12-16 05:57

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 screw

2条回答
  •  情歌与酒
    2020-12-16 06:41

    It is possible to check is .mobileconfig is installed. What you need to do is:

    1. Create CA (certificate authority) and export it as .cer.
    2. Issue certificate using created CA and export is as well as .cer.
    3. Using Apple Configurator app add CA .cer in the certificates area. Mobile configuration profile will have CA .cer.
    4. Issued certificate (on step two) add to app bundle.
    5. Using Security framework evaluate (SecTrustEvaluate) issued certificate on step 2.

提交回复
热议问题