<p dir="auto">While I'm not an Objective-C developer, I did some digging on the webs and it looks like getting the coordinates/position of the Dock Icon for a particular app is possible. Please see <a href="http://stackoverflow.com/a/6684646/416845" rel="nofollow">this response</a> and the <a href="http://stackoverflow.com/questions/6684278/getting-the-position-of-my-applications-dock-icon-using-cocoas-accessibility-a#comment7930301_6684646" rel="nofollow">subsequent comment</a> with an update to the method. I verified <a href="https://developer.apple.com/reference/appkit/nsrunningapplication" rel="nofollow">here</a> that the API still exists and is valid, and the method appears to be sound still.</p>
<p dir="auto">I investigated using various plists on the machine to determine dock icon size (which doesn't appear to be possible anymore) and the index of a dock icon, but unfortunately that's not possible unless the app has been pinned to the dock.</p>
<p dir="auto">I think that would add significant benefit for developers if that info was available to <code class="notranslate">app.dock</code>. My particular use case is that I'm rewriting an old app I wrote for windows which makes use of taskbar window thumbnail grouping, something I'm duplicating using a BrowserWindow, but I have no way of knowing how to align the window as I don't have access to the location of the dock icon. At the moment I can only query <code class="notranslate">defaults read com.apple.dock</code> through the shell to glean the position of the dock on the screen, which unfortunately isn't specific enough for my window alignment needs.</p>

<ul dir="auto">
<li>Electron version: 1.6.5</li>
<li>Operating system: MacOS 10.12.4</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">n/a</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">n/a</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">n/a</p>
<h3 dir="auto">Problem Description</h3>
<p dir="auto">In electron 5.x, there'll be a LOG file in the ~/Library/Application Support/xxx/(userData directory), which is a duplicate with mine.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11768033/67834762-339f0f00-fb23-11e9-8478-0dc61391410a.png"><img src="https://user-images.githubusercontent.com/11768033/67834762-339f0f00-fb23-11e9-8478-0dc61391410a.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Proposed Solution</h3>
<p dir="auto">Disable the creation of this LOG file</p>
<h3 dir="auto">Alternatives Considered</h3>
<p dir="auto">None</p>