0

I am creating a flow that: 1) takes the user from my iOS app to my website through Safari 2) and then navigates back into the app via javascript

However when I try and redirect the user back to my app from my site using url schemes, i get the familiar "Open this page in 'appName'" alert. Is there a way to avoid this alert from showing up? Is there some way to whitelist my website as a source for my app to allow me to direct the user back to my app w/out any alerts?

It seems like it might be possible with Universal Links, but I am wondering if there is a simpler way to do so.

EDIT: I should have mentioned that I have the unique requirement that I need to use Safari. I am processing donations in my app, and Apple requires you to go this through Safari and not a webview. Any ideas? –

xrxrxrx
  • 107
  • 2
  • 6

1 Answers1

1
  • You can achieve this using webView instead of Safari,so that control will not go out of the App.
  • Now the problem is how to get the click from webView, for that you can use this approach How to invoke Objective C method from Javascript and send back data to Javascript in iOS?
  • I have integrated this approach in my App so this approach will work for sure. It feels like you are in APP & some times it will diificult to differentiate between WebPage & native page
Community
  • 1
  • 1
Rohit Pradhan
  • 3,867
  • 1
  • 21
  • 29
  • I should have mentioned that I have the unique requirement that I need to use Safari. I am processing donations in my app, and Apple requires you to go this through Safari and not a webview. Any ideas? – xrxrxrx Feb 21 '16 at 07:15