Registering ksync url handler in mac OS

Blank 1/12/2021 14:41 - 1/12/2021 14:41

To register a ksync:// handler in mac, follow below steps

 

  • Open Apple Script Editor
  • Copy paste below code
on open location myURL
  tell application "Terminal"
  do script "java -jar ~/ksync3.jar " & myURL
  end tell
end open location
  • Save apple script as application
  • Now right click on the saved application click select Show Package Contents.
  • undefined
  • Under contents folder open Info.plist file and find the line
  • <key>CFBundleIdentifier</key>
  • Paste the following code after it.
  • <key>CFBundleURLTypes</key>
    <array>
       <dict>
          <key>CFBundleURLName</key>
          <string>KSync URI Scheme</string>
          <key>CFBundleURLSchemes</key>
          <array>
             <string>ksync</string>
          </array>
       </dict>
    </array>
  • Save it!
  • Just for the first time, run application. Now you will be able to execute ksync:// handler in your browser.