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.
I want to get that response and close SFSafariViewController.
In android I did it through Javascript and Javascript interface..
My server side code for android:
<?php
//curl initialize
//Some code
//Curl Execution
$response = curl_exe($ch)
?>
<script>
showAndroidToast("<?php echo $response;?>");
function showAndroidToast(res){
Android.dataResponse(res);
}
</script>
In android.
Android.dataResponse(res) is my javascript interface which i added to my Chrome Custom Tabs (https://developer.chrome.com/multidevice/android/customtabs).
I want similar functionality for my IOS app.I don't know. Is this possible with SFSafariViewController or not?