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

satyam90

macrumors regular
Original poster
Jul 30, 2007
242
0
Bangalore, India
I want to add URL handler for my application. On searching google, I found some information.
In my application, I am following the procedure mentioned in the website Registering URL handler

In the method
Code:
- (void)getUrl:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent
I just added "NSLog" statement to print the URL and monitoring the console log.

I compiled the code in "Release" mode. Now for running the application, I open safari browser and entered "myapp://some_action_or_resource", then press "Enter". Now its opening the application.
I expected "some_action_or_resource" in the console log.
But its not printing the URL. Do I have to do anything in addition to get the URL printed in console log. If I get the URL, I will do other processing needed.
 

satyam90

macrumors regular
Original poster
Jul 30, 2007
242
0
Bangalore, India
I found the solution.

In my code I am registering the event in applidcationDidFinishLaunching.
To solve this issue, it must be done in "init" method.

--Satyam.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.