4

I'm trying to install a .mobileconfig file through an application without going through the Safari or Mail apps.

At the moment, I can download the file in my application, but still have to pass it to safari to handle. This means that the user gets dumped back in safari after they've installed the profile, whereas I want to return them to my application.

The docs mention that Safari looks for the .mobileconfig extension, which it presumably passes on to the Settings app. Is there a way to cut out the middleman, like a prefs:... URL scheme?

  • Just a guess, but what happens if you route the file through an `UIDocumentInteractionController`? – JustSid Dec 07 '11 at 13:35
  • 1
    No, you have to go through Safari and can't make a hook to launch your application after-ward. – fearmint Dec 07 '11 at 14:13
  • can you please tell me how you send the file to safari to install it? you can replay her: http://stackoverflow.com/questions/14835878/open-mobileconfig-file-saved-in-application-in-safari-ios thank you for your help. – Red Mak Feb 14 '13 at 23:49

2 Answers2

3

I've searched for a while and tried everything I can think of - no luck so far. It looks like you have to go through Safari to do it.

To improve user experience, you can launch Safari with a page that you host that 1) allows the user to install the configuration profile and 2) allows them to come back to your app via a custom url scheme (yourapp://app/check_profile).

akhomenko
  • 309
  • 2
  • 4
  • Thanks, that's what I've ended up doing. –  Jan 06 '12 at 14:06
  • I need to do the same exactly. But I have not found any idea in how to come back to my own app. I have defined url scheme. But no idea how to use it. I use openURL to instal .mobileconfig file. – aparna May 02 '14 at 09:49
0

I posted an answer with code which does what akhomenko mentioned, but automatically (no user interaction required), here: Installing a configuration profile on iPhone - programmatically

Community
  • 1
  • 1
xaphod
  • 6,392
  • 2
  • 37
  • 45