execute application mac os yosemite 10.10.3 when plugged in usb

95 views Asked by At

Someone says it works in yosemite 10.10.3

I put the following into: ~/Library/LaunchAgents/com.example.plist, my idproduct is 0x0624 and the id vendor is 0x0718 but it doesn't work.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.example.program</string>
    <key>ProgramArguments</key>
    <array>
    <string>/path/to/program</string>
    </array>
    <key>LaunchEvents</key>
    <dict>
            <key>com.apple.iokit.matching</key>
            <dict>
                    <key>com.apple.device-attach</key>
                    <dict>
                            <key>idProduct</key>
                            <integer>0624</integer>
                            <key>idVendor</key>
                            <integer>0718</integer>
                            <key>IOProviderClass</key>
                            <string>IOUSBDevice</string>
                            <key>IOMatchStream</key>
                            <true/>
                    </dict>
            </dict>
    </dict>
</dict>
</plist>
1

There are 1 answers

0
cadki On

I found this in apple developer, i donĀ“t understand i make the same in the web and load the launchd.