Launch app using a custom URL

Hi,

I am trying to implement a way to launch my app using a custom URL.
I defined an URL that can be opened like rev://
For this, I add (by hand because I could not find a way to script it after build) the lines

<key>CFBundleURLTypes</key>
	<array>
		<dict>
			<key>CFBundleURLName</key>
			<string>rdv URL</string>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>rdv</string>
			</array>
			<key>LSIsAppleDefaultForScheme</key>
			<true/>
		</dict>
	</array>

I then drag and drop my application in the Application folder.
This work very nicely. If enter rdv://www.test.com then my application starts.

The problem is that I did not find a way to get access to the link (here www.test.com).

Looking around I found some information (like here ) but I could not find a way to implement it in Xojo. I have the feeling that MBS plug-ins could be used but I failed so far.
Did anybody implemented it in Xojo yet ?

Many thanks,

best,
Franck

If I remember correctly you simply look for an Appleevent with event GURL.

In a Cocoa app, the NSAppleEventHandlerMBS class in our plugin may help here.

Thanks Christian. With your hint, I could figure out how to do it.
Here is what I did:

1- I used your example “NSAppleEventHandlerMBS test”
2- I copied the MyNSAppleEventHandlerMBS class into my application
3- I created the necessary Property e as MyNSAppleEventHandlerMBS
4- the Event Handler of the MyNSAppleEventHandlerMBS class is activated when starting my application after clicking on the personalized URL.
Inside the Handler the property p as NSAppleEventDescriptorMBS = theEvent.paramDescriptorForKeyword("----") contains the link that can be accessed by p.stringvalue

thanks again !
Franck