Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

paos

macrumors newbie
Original poster
Aug 13, 2009
15
0
Hi, I'm trying to launch my application from a custom URL, I've already registered it on info.plist URL schemes, on iPhone sdk there's a UIApplication method:

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url

which lets me handle this from AppDelegate, I've been looking for something like this on NSApplication documentation but couldn't find anything.
Actually, my application launches after clicking on the custom url, but I have some code that needs to be executed after application launches and can't figure out how to do this.
Does someone have any idea of how to do this?
thanks!
 
Hi , I solved my problem registering the appleEvent and handling from my app using:
- (void)handleGetURLEvent: (NSAppleEventDescriptor *)event withReplyEvent: (NSAppleEventDescriptor *)replyEvent

It works fine when I launch my app from an URL on Mail Application, but when I try to launch from an URL o safari (lets say from a gmail client) nothing happens , any idea??
 
It works fine when I launch my app from an URL on Mail Application, but when I try to launch from an URL o safari (lets say from a gmail client) nothing happens , any idea??

I'm not on a Mac to check right now but iirc Safari has a preference about launching "safe" URLs in external apps...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.