title: Communicate transparently between apps running on the same iPhone
body: <p>There are a number of similar questions so this one is carefully scoped not to be a duplicate. </p>
  
  <p>Preconditions</p>
  
  <ul>
  <li>There are <strong>two iPhone apps</strong> (separate bundle IDs), and you have full control over the source code of each one</li>
  <li>The user has both apps installed on the <strong>same phone</strong></li>
  <li>No network connectivity to other hosts</li>
  <li>No jailbreaking</li>
  <li>Assume the apps have proper capabilities to run in the background indefinitely</li>
  </ul>
  
  <p>Goals</p>
  
  <ul>
  <li><strong>Communicate bidirectionally between the apps</strong></li>
  <li>Minimize or eliminate user-observed evidence that such communication is taking place</li>
  <li>Background app will have new information that needs to go to the foreground app, so need push or polling mechanism</li>
  <li>Ideally could be used in production and so doesn't use private APIs</li>
  </ul>
  
  <p>So the question is <strong>"Can it be done?"</strong></p>
  
  <p>What follows are some notes on "Already tried" - different approaches that have been considered.</p>
  
  <p>Well understood attack vectors</p>
  
  <ul>
  <li>Use another host - reasonable, but excluded in the problem definition because of latency</li>
  <li>Custom URL schemes - a pretty good approach, but not ideal because of animations and context switches, especially if polling</li>
  <li>Stuff under Settings.app -> Privacy (e.g. Contacts) - would work, but would rather not ask for permissions</li>
  </ul>
  
  <p>Things that probably won't work</p>
  
  <ul>
  <li>"Open in..." api</li>
  <li>Shared filesystem in some way</li>
  <li>Bluetooth</li>
  </ul>
  
  <p>Possible ideas</p>
  
  <ul>
  <li>Inter-app audio</li>
  <li>Localhost socket - Is this the best approach?: <a href="https://stackoverflow.com/questions/13734248/ios-is-it-possible-to-communicate-between-apps-via-localhost">iOS - Is it possible to communicate between apps via localhost?</a></li>
  </ul>
  
  <p>Apple has carefully avoided exposing this functionality. Has anyone figured out a way to do it anyway?</p>