title: swift - how call app's code from another app and return data
body: <p>I need to implement next scheme:</p>
  
  <p>1) <code>App1</code> has some UI like signin/signup, and user's profile. But main functionality is creating specific <code>http</code> request to get/update token.</p>
  
  <p>2)when tapping button at <code>App2</code> - <code>App2</code> calls <code>App1</code>, then <code>App1</code> execute <strong>only</strong> <code>http request</code>, and return token to <code>App2</code>, like callback. And this actions should be invisible for user, maybe like empty screen with spinner</p>
  
  <p>What is the best way to make it real? Is it possible for iOS?</p>
  
  <p>To share data between apps I suppose use <code>App Group</code> and shared <code>UserDefaults</code>, but how to call some class/function?</p>