2009-02-27 4 views
8

私はウィンドウでそれをやった、どのように私はMAC OSXでプロトコルを登録するのですか? firefox(a href = "somename:// mylinkAndData")のリンクをクリックしてバイナリを起動したいのですか?mac osxにプロトコルを登録しますか?

答えて

13

AppleのLaunch Services Programming Guideをご覧ください。あなたのアプリInfo.plistにCFBundleURLTypesを追加して、LSRegisterURL()でアプリを登録する必要があります。

抜粋 Firefox.app/Contents/Info.plist から:

<key>CFBundleURLTypes</key> 
    <array> 
      <dict> 
        <key>CFBundleURLIconFile</key> 
        <string>document.icns</string> 
        <key>CFBundleURLName</key> 
        <string>http URL</string> 
        <key>CFBundleURLSchemes</key> 
        <array> 
          <string>http</string> 
        </array> 
      </dict> 
.... 

EDIT:ハウツー記事

ためHandling URL schemes in Cocoaを参照してください。
関連する問題