4

I would like to use a Web Application on an iPad. It servers as a launcher for PayPal Here app via paypalhere://takePayment scheme, which receives a payment through a card reader, and then, after a successful payment, should return back to the app, with some GET parameters.

Is there a scheme (or a way to register it) which would switch back to the Web App?

If I didn't use the Web App, the workflow would have one extra step - a pop-up with "Open in PayPal Here?" question, plus, the return URL would open a new tab anyway.

Thanks!

Josef Habr
  • 254
  • 2
  • 14
  • Maybe you can try [url scheme](https://developer.apple.com/documentation/uikit/core_app/allowing_apps_and_websites_to_link_to_your_content/defining_a_custom_url_scheme_for_your_app?language=objc) – Danny Lau Feb 11 '19 at 10:25
  • 1
    Its not possible to link back to a web application from a webapp.https://stackoverflow.com/questions/9256053/programmatically-launch-a-web-app-on-the-home-screen – Tibin Thomas Feb 12 '19 at 05:57
  • Thank you @TibinThomas, pity it wasn't an answer, the bounty would go to you... – Josef Habr Feb 13 '19 at 15:09
  • Thanks @JosefHabr for the update.I will update the comment into an answer for better clarity, – Tibin Thomas Feb 14 '19 at 06:10

2 Answers2

2

No.It is not possible to link back to a web app from a native iOS application using url schemes.

URL schemes are meant for native applications to open other native applications.For this capability the application has to register the url schemes it support via info.plist file.Web apps are currently not capable of doing so and hence doesn't support url schemes.It may be supported in the future in PWA's as apple is adopting PWA's into iOS.Refer this Open installed PWA from external url andthis medium article

Although you can open the webpage from a native app using openUrl method it would be opening in safari instead of as a web application.

Reference:Programmatically launch a web app on the home screen?

Tibin Thomas
  • 1,365
  • 2
  • 16
  • 25
  • Thank you for this heads-up, PWA looks interesting, hope Apple will adopt it, I do feel it could be as easy as adding a meta tag in the app with the link (although not sure what a conflict with another app could do). – Josef Habr Feb 15 '19 at 11:48
0

So thanks to @TibinThomas, I know now it's not possible. These are two good resources.

I guess I will first base the workflow on Safari, and later try to create a simple app with a web view - that should work, if I register a custom URL, too.

Josef Habr
  • 254
  • 2
  • 14