8
L'ho fatto in Windows, come registro un protocollo su mac osx. Voglio fare clic sui collegamenti in firefox (a href = "somename: // mylinkAndData") e avviare un binario?registrare un protocollo su mac osx?
L'ho fatto in Windows, come registro un protocollo su mac osx. Voglio fare clic sui collegamenti in firefox (a href = "somename: // mylinkAndData") e avviare un binario?registrare un protocollo su mac osx?
Dai uno sguardo a Launch Services Programming Guide di Apple. Devi aggiungere CFBundleURLTypes alle tue app Info.plist e registrare la tua app con LSRegisterURL().
Estratto dal 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: vedere Handling URL schemes in Cocoa per un how-to articolo