0

I am exposing an Mac OSX application by adding its bundle identifier and urlscheme in com.apple.launchservices.secure.plist.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>LSHandlerPreferredVersions</key>
    <dict>
        <key>LSHandlerRoleAll</key>
        <string>-</string>
    </dict>
    <key>LSHandlerRoleAll</key>
    <string>com.test.myurl</string>
    <key>LSHandlerURLScheme</key>
    <string>myurl</string>
</dict>
</plist>

Until I restart the machine I don't see the url scheme in lsregister - dump output

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump | grep myurl

  canonical id:  com.test.myurl (0x80000008)
    URL scheme:    myurl
    all roles:     com.test.myurl (0x80000008)

Even immediately after deleting these entries from the plist is also not reflecting in lsregister , I need to restart.

I tried Kill, seed of lsregister but no luck. How to update this entries in lsregister without a restart

4
  • Which command did you run to register your plist with launchd?
    – nohillside
    Commented Aug 5, 2019 at 9:09
  • I am adding in to com.apple.launchservices.secure.plist file using Plistbuddy Commented Aug 5, 2019 at 17:12
  • Where is the plist stored?
    – nohillside
    Commented Aug 5, 2019 at 18:11
  • $HOME/Library/Preferences/com.apple.LaunchServices/ Commented Aug 6, 2019 at 4:37

0

You must log in to answer this question.

Browse other questions tagged .