title: SFSafariViewController and Javascript
body: <p>I am working on IOS app in which I open login page in SFSafariViewController. And On that login page when the login is successful, a Json response is generated.</p>
  
  <p>I want to get that response and close SFSafariViewController. </p>
  
  <p>In android I did it through Javascript and Javascript interface..</p>
  
  <p>My server side code for android:</p>
  
  <pre><code>&lt;?php
  //curl initialize
  //Some code
  //Curl Execution
  $response = curl_exe($ch)
  ?&gt;
  &lt;script&gt;
  showAndroidToast("&lt;?php echo $response;?&gt;");
  function showAndroidToast(res){
  Android.dataResponse(res);
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>In android.</p>
  
  <p>Android.dataResponse(res) is my javascript interface which i added to my Chrome Custom Tabs (<a href="https://developer.chrome.com/multidevice/android/customtabs" rel="nofollow noreferrer">https://developer.chrome.com/multidevice/android/customtabs</a>).</p>
  
  <p>I want similar functionality for my IOS app.I don't know. Is this possible with SFSafariViewController or not?</p>