Adding and Deleting LSHandlerURLScheme from com.apple.launchservices.secure.plist is not immediately reflecting in Launch Services database

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 merl

  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

macos
macos-high-sierra
launch-services
asked on Stack Overflow Jul 8, 2019 by MacDeveloper • edited Aug 4, 2019 by MacDeveloper

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0