I have an iOS app with a custom URL Scheme.
This URL should be used by another app, as callback.
In fact, I need 2 callbacks, one for « succeed » another for « failed », the other app passing also parameters to my app with success/failure info.
If I type myurl:// in Safari, the app is opened … fine (see my plist below).
But how do I :
declare 2 URL schemes in plist ?
detect in my app which URL schemes was used ?
read the parameters passed by the other app ?
Can someone tell me how to implement this ?
I know there was a kind of « enhancedIOSapp » providing some extra app events (didBecomeActive, …) but cant find it anymore.
I found some (old) entries in this forum but some answers and links from JP Devulder are gone.
This is not possible in Xojo. I have a feedback case for it, but if there is any urgency in adding this feature to your app you will need to use another development tool.
So far I can call the other app which in turn calls back my app when the processing is done, ie. my app is open again.
What Im missing is to either have 2 urls (and be able to intercept the event) or, better, to read the information that the other app sends back (success/failure code, transaction number, …).
What part is not possible ?
I saw another post where you said youd be looking at it (here) but this discussion ended … in 2015.
I cant use another tool as this part is just a new feature asked for an existing app. The goal being to open a payment terminal (this works) and see if the payment was approved before confirming the sales.
With so many features asked in the past for iOS, very few of them being taken care off, I doubt Ill be sound and alive when #58377 is implemented.
My customer will have to live with Xojo limitations.
Getting the status/URL back is not possible. You can make your app launch successfully from the URL but cannot view its contents. Sadly this is something that cannot be worked around with declares. Otherwise I would have a project demonstrating it
Since your app wants to know about payment confirmation, maybe you can poll the server for the result of the transaction?
This could be an option. Opening the payment terminal is easy, but using the API is much more difficult.
The payment company provides an iOS SDK but I dont know how or if integrating such a special framework is even possible if not using Xcode.
Another issue is that I need to query all recent transactions as I dont have the transaction id which is provided by the callback.