[launchd-dev] LaunchAgent suddenly appears in Dock bouncing when CGImageSourceCopyPropertiesAtIndex is called

Kevin Meaney ktam at yvs.eu.com
Mon Aug 12 10:28:35 PDT 2013


> I've got a launch agent working and communicating with it using a terminal command nicely. I'm using NSXPCConnection classes.
> 
> If I call CGImageSourceCopyPropertiesAtIndex within the launchagent then the launchagent appears in the dock bouncing. Calling CGImageSourceCopyProperties doesn't cause the same issue. I have tried adding to the LaunchAgent's bundle plist the key LSUIElement with a value of YES. This doesn't change the behaviour. The LaunchAgent continues to work properly and the dictionary obtained from calling CGImageSourceCopyPropertiesAtIndex is saved to disk which is what I wanted to happen.
> 
> I'm linking against frameworks Foundation and ImageIO.
> 
> Any thoughts as to why?

Some more info. How do I stop the LaunchAgent appearing in the dock?

After calling CGImageSourceCopyPropertiesAtIndex the LaunchAgent has opened the profile: /System/Library/ColorSync/Profiles/sRGB Profile.icc
The LaunchAgent has also loaded the CoreGraphics framework which wasn't loaded prior to calling CGImageSourceCopyPropertiesAtIndex.

I'm thinking they might have something to do with why the LaunchAgent suddenly appears in the dock.

For further info I'm including my plist file for the LaunchAgent which lives in ~/Library/LaunchAgents/

<?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>MachServices</key>
	<dict>
		<key>U6TV63RN87.com.yvs.MovieMakerAgent</key>
		<true/>
	</dict>
	<key>Label</key>
	<string>U6TV63RN87.com.yvs.MovieMakerAgent</string>
	<key>KeepAlive</key>
	<false/>
	<key>ProcessType</key>
	<string>Adaptive</string>
	<key>LimitLoadToSessionType</key>
	<string>Aqua</string>
	<key>ProgramArguments</key>
	<array>
		<string>/Users/ktam/GitHub/MovieMaker/DerivedData/MovieMaker/Build/Products/Debug/U6TV63RN87.com.yvs.MovieMakerAgent.app/Contents/MacOS/U6TV63RN87.com.yvs.MovieMakerAgent</string>
	</array>
</dict>
</plist>



More information about the launchd-dev mailing list