Custom URL Schemes, how to ?


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 can’t find it anymore.
I found some (old) entries in this forum but some answers and links from JP Devulder are gone.

Thanks !

My plist look like this:

[code]<?xml version="1.0" encoding="UTF-8"?>

UIFileSharingEnabled CFBundleURLTypes CFBundleURLSchemes myurl CFBundleURLName com.domain.myapp.myurl [/code]

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.


You should know that there are many people looking for this feature, but getting new features added to iOS has been a slow process the last 5 years.

Hi Jason,

Thanks for the bad news :wink:

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 I’m 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 you’d be looking at it (here) but this discussion ended … in 2015.

I can’t 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 I’ll be sound and alive when #58377 is implemented.
My customer will have to live with Xojo limitations.

Thanks anyway.

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 :slight_smile:

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 don’t 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 don’t have the transaction id which is provided by the callback.

Thanks anyway.

Hi @Olivier Colard

I think this post from Greg is a good reading about how to integrate SDKs into Xojo iOS Apps:

Hope it helps to solve your problem!


[quote=467040:@Javier Menéndez]I think this post from Greg is a good reading about how to integrate SDKs into Xojo iOS Apps:

Thanks Javier, I’ll have a look at it.
My Obj-C knwoledge is very limited and I’ll have to create all needed declares…

If there’s somewhere explanation on how to interpret and translate obj-c methods to Xojo syntax I’d be happy :wink:

I’ve been looking at this blog post and at the framework (SumUp), but it’s a static library …

I’m stopping here, and, sadly, I don’t expect Xojo to help in this matter.

Thanks anyway for your answers.