我開發OSX的應用程序並處理自定義URL在我的應用程序NSApp表示自定義URL處理
<a href="openApp:[email protected]">Open My profile!</a>
當應用程序正在運行我能進去
- (void)handleGetURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent{
}
事件處理
但是,當應用程序未運行:它確實來AppDidFinishedLaunching,我無法檢測其調用是否正常或自定義URL,
應用程序啓動時有什麼方法檢測嗎?
在此先感謝
可能重複[如何與處理默認URL方案](http://stackoverflow.com/questions/1991072/how-to-handle-with-a-default-url-scheme) –
我在這裏回答了這個問題:http://stackoverflow.com/questions/ 1991072/how-to-handle-with-a-default-url-scheme。請注意,在沙盒應用程序與非沙盒應用程序中安裝方案處理程序時存在細微差異。當啓用沙箱時,應該在applicationWillFinishLaunching中安裝處理程序:,否則在applicationDidFinishLaunching中安裝處理程序 –