title: Re-post: iOS modify App auto launch when iPhone is connected to external accessory
body: <p>I had asked this question earlier but was closed for unclear or insufficient details. Hopefully, I have explained it better. Here it goes.</p>
  
  <p>I am building an iOS application that communicates to the external accessory using a proprietary protocol (over iAP). I know that by adding a unique protocol name in the info.plist file, the application can be made to launch automatically when iOS device is connected to the external accessory (I am aware that support is needed from the external accessory device too). </p>
  
  <p><em>Applications that are able to communicate with an external accessory should declare the ?protocols they support in their Info.plist file. Declaring support for specific protocols lets the system know that your application can be launched when that accessory is connected. If no application supports the connected accessory, the system may choose to launch the App Store and point out applications that do.</em></p>
  
  <p>In my application, I wish to give the user a graphical interface to enable or disable automatically launching the application. Behind the scenes, this would require setting the protocol name to a pre-defined value to enable it or clearing it to disable it.</p>
  
  <p>I would appreciate if someone can give me information on how to modify the protocol id programatically.</p>