3

I have a config file within my app. Can I execute(run) the the config file on a button click?

Currently, I am emailing the file as an attachment to the respective users on a button click and the execution starts when they open the email and tap on the attachment. Since the config file is native, is it possible to run it on a button click?

I am looking into this currently

(Installing a configuration profile on iPhone - programmatically)

Also, here

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

The answer says that, the only way to install a mobileconfig file is either through safari/mail. But this answer has not yet been approved so not sure if these are still the only options to install the mobile config file.

Community
  • 1
  • 1
Sagar
  • 101
  • 1
  • 1
  • 11
  • What is your config file? – Rafał Sroka Feb 27 '14 at 18:47
  • 1
    What does it mean to "run a config file"? – rmaddy Feb 27 '14 at 18:47
  • It's a .mobileconfig file, which would automatically setup a configuration within my iphone (Settings->General->Profiles) – Sagar Feb 27 '14 at 18:49
  • Someone else already tried this on StackOverflow, bundle a HTTP server, run it, and bind your button to execute an URL on your local HTTP server: http://stackoverflow.com/questions/14835878/open-mobileconfig-file-saved-in-application-in-safari-ios – frin Feb 27 '14 at 18:57
  • I've spent the last month looking for a solution with code that actually works. I've written something that works and I'm going to write a post on how I did it and link working source code with it very soon. I'll post a link here when complete. – Jonathan King Mar 24 '14 at 20:51

1 Answers1

4

This is an official documentation from the apple developer's website. Hopefully, this will help people be updated of what are the current possibilities with respect to installing the configuration file.

Visit https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/iPhoneOTAConfiguration/Introduction/Introduction.html

In short, there are four ways to deploy configuration profiles:

  • By physically connecting the device (using IPCU, now Apple Configurator)
  • In an email message
  • On a webpage
  • Using over-the air configuration as described in the above document

This should end some of the speculations around what is the current scenario.

Nate
  • 31,017
  • 13
  • 83
  • 207
Sagar
  • 101
  • 1
  • 1
  • 11
  • But that document appears to be outdated. "By physically connecting the device" apparently refers to using the iPhone Configuration Utility, which no longer exists and is no longer supported. – matt Aug 15 '15 at 16:06
  • 1
    @matt, Apple Configurator (or Configurator 2) can be used in place of the old iPhone Configuration Utility to do this now. – Nate Jan 14 '17 at 07:43
  • 2
    @Nate Yes, I've discovered Configurator. Personally I still find emailing the config file to be the most reliable way! – matt Jan 14 '17 at 17:24