# macOS Sierra - Promised file drop on App icon

**URL:** <https://forum.xojo.com/t/macos-sierra-promised-file-drop-on-app-icon/34725>\
**Category:** macOS\
**Created:** [December 1, 2016, 8:48am UTC](https://forum.xojo.com/t/macos-sierra-promised-file-drop-on-app-icon/34725 "2016-12-01T08:48:51Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olivier\_Colard](https://forum.xojo.com/user_avatar/forum.xojo.com/olivier_colard/32/313_2.png) [@Olivier\_Colard](https://forum.xojo.com/u/Olivier_Colard)\
**Post date:** [December 1, 2016, 8:48am UTC](https://forum.xojo.com/t/macos-sierra-promised-file-drop-on-app-icon/34725/1 "2016-12-01T08:48:51Z")

</div>

Hi there,

I have an app where users can drop files on the application icon in the dock.  
I’m accepting any kind of file, “promised” files (from Photo, eg) or files from the finder.

Desktop app OSX, Xojo 2016r3

This is working fine with El Capitan (10.11.6).

This is NOT working with macOS Sierra (10.12.1) when dropping “promised” files on the app icon.  
It’s fine with finder files.  
It’s fine when dropping promised files on the application window.

So the problem is limited to dropping on the application icon, the OpenDocument event is not fired for promised files.

I don’t think it’s a Xojo problem as I’m having the same problem if I drag a Photo file to the dock Mail icon (which works with El Capitan).

Does anyone know if something has changed with Sierra and if there’s a workaround ?

Thanks and best regards.

Olivier

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [December 1, 2016, 9:25am UTC](https://forum.xojo.com/t/macos-sierra-promised-file-drop-on-app-icon/34725/2 "2016-12-01T09:25:27Z")

</div>

And dragging the file into the Applications Icon in the Dock ?

---

<div class="post-metadata">

**Author:** ![Olivier\_Colard](https://forum.xojo.com/user_avatar/forum.xojo.com/olivier_colard/32/313_2.png) [@Olivier\_Colard](https://forum.xojo.com/u/Olivier_Colard)\
**Post date:** [December 1, 2016, 9:34am UTC](https://forum.xojo.com/t/macos-sierra-promised-file-drop-on-app-icon/34725/3 "2016-12-01T09:34:45Z")

</div>

That’s what I’m saying 😉  
I’m dragging a file from Photo (eg) and drop/release it on the Application’s icon in the Dock.

It works with El Capitan, not with Sierra.

---

<div class="post-metadata">

**Author:** ![Sam\_Rowlands](https://forum.xojo.com/user_avatar/forum.xojo.com/sam_rowlands/32/265_2.png) [@Sam\_Rowlands](https://forum.xojo.com/u/Sam_Rowlands)\
**Post date:** [December 1, 2016, 9:46am UTC](https://forum.xojo.com/t/macos-sierra-promised-file-drop-on-app-icon/34725/4 "2016-12-01T09:46:53Z")

</div>

The short answer; you’re not meant to work with Photos in this way. I’ve filed a bunch of bug reports over Photos and application interconnection and they’ve all been closed “Due to design”.

So what you’re meant to do is to create your application in Swift and Xcode, you put all your photo manipulation effects into a central ‘Framework’ then you create Photos plugin with one interface, that calls upon the Framework and a desktop application with another interface (but the same framework).

What a lot of companies have ended up doing it creating a Photos plugin that write the CGImage to disk, then opens their application and passes it the image, then when you save in their application, it replaces the image created by the plugin, which then reloads the CGImage and returns it back to Photos.

My biggest gripe is the one application that customers want a Photos plugin, works best with RAW images - read multiple in one go. Which a Photos plugin doesn’t support at all. You get an 8-Bit image from a RAW file, and only one image.

If you have customers bemoaning this change, file a bug report with Apple and advise your customers to downgrade if they can, or tell them to look at Adobe Lightroom, while looking like something from the 1990s is a much more developer and powerful application that Photos can ever dream of being.

---

<div class="post-metadata">

**Author:** ![Olivier\_Colard](https://forum.xojo.com/user_avatar/forum.xojo.com/olivier_colard/32/313_2.png) [@Olivier\_Colard](https://forum.xojo.com/u/Olivier_Colard)\
**Post date:** [December 1, 2016, 11:48am UTC](https://forum.xojo.com/t/macos-sierra-promised-file-drop-on-app-icon/34725/5 "2016-12-01T11:48:33Z")

</div>

Hi Sam,

Thanks a lot for your answer.  
My application is not worth writing a Xcode or Swift plugin and, even if it was, I don’t have a sufficient knowledge to do it.

The app is not published yet, so the easiest is to remove the ability to drop on the application icon. So the future customers won’t complain about regression when they upgrade from El Capitan to Sierra.

What is surprising is that I can drag/drop from Photos on the application windows, just not on the icon.  
What is also strange is that this doesn’t work anymore with Mail which is an Apple application.

I’ll search and monitor stack overflow to see if other developers have the same issue with Xcode/Swift apps.

Thanks anyway.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [December 1, 2016, 12:17pm UTC](https://forum.xojo.com/t/macos-sierra-promised-file-drop-on-app-icon/34725/6 "2016-12-01T12:17:07Z")

</div>

> [@300914:@Sam Rowlands](#):
>
> Due to design

Xojo use that too ! :-{

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [December 1, 2016, 1:05pm UTC](https://forum.xojo.com/t/macos-sierra-promised-file-drop-on-app-icon/34725/7 "2016-12-01T13:05:27Z")

</div>

bta 10.12.2 (16C53a):

The application generated using Xojo 2015r1 on El Capitan.

Drag and drop a text file to the application Icon: file loaded.

Drag and drop a text file to the Dock application Icon: file loaded.

Drag and drop a text file to the application window: loaded.

32 bits (of course in this case)

I suppose you:  
This Computer --\> File Types (click in the button and check some or all file types CheckBoxes.

---

<div class="post-metadata">

**Author:** ![Beatrix\_Willius](https://forum.xojo.com/user_avatar/forum.xojo.com/beatrix_willius/32/282_2.png) [@Beatrix\_Willius](https://forum.xojo.com/u/Beatrix_Willius)\
**Post date:** [December 1, 2016, 1:21pm UTC](https://forum.xojo.com/t/macos-sierra-promised-file-drop-on-app-icon/34725/8 "2016-12-01T13:21:57Z")

</div>

My Radar issue about dragging and dropping multiple files to the desktop not working has the issue no 26.530.592. This is a duplicate to 4.520.993. Which makes the original bug old old old.

---

<div class="post-metadata">

**Author:** ![Olivier\_Colard](https://forum.xojo.com/user_avatar/forum.xojo.com/olivier_colard/32/313_2.png) [@Olivier\_Colard](https://forum.xojo.com/u/Olivier_Colard)\
**Post date:** [December 1, 2016, 5:15pm UTC](https://forum.xojo.com/t/macos-sierra-promised-file-drop-on-app-icon/34725/9 "2016-12-01T17:15:59Z")

</div>

@Emile Schwarz [quote]Drag and drop a text file to the application Icon: file loaded.[/quote]

To clarify, I have NO problem dragging & dropping files from the Finder or from the Desktop to the application window for to the dock application icon.  
The only problem is dragging files from Photos to the dock application icon, i.e. with promised files.

Again, I don’t think it’s Xojo related as I have the same problem dragging files from Photos to Mail, e.g. which is working fine with El Capitan.

---

<div class="post-metadata">

**Author:** ![DetlefK](https://forum.xojo.com/user_avatar/forum.xojo.com/detlefk/32/23653_2.png) [@DetlefK](https://forum.xojo.com/u/DetlefK)\
**Post date:** [December 1, 2016, 5:20pm UTC](https://forum.xojo.com/t/macos-sierra-promised-file-drop-on-app-icon/34725/10 "2016-12-01T17:20:30Z")

</div>

Another solution that I don’t want to toss into the ring:  
Make your app Sierra only.

---

<div class="post-metadata">

**Author:** ![Sam\_Rowlands](https://forum.xojo.com/user_avatar/forum.xojo.com/sam_rowlands/32/265_2.png) [@Sam\_Rowlands](https://forum.xojo.com/u/Sam_Rowlands)\
**Post date:** [December 2, 2016, 1:38am UTC](https://forum.xojo.com/t/macos-sierra-promised-file-drop-on-app-icon/34725/11 "2016-12-02T01:38:44Z")

</div>

> [@301004:@Olivier Colard](#):
>
> The only problem is dragging files from Photos to the dock application icon, i.e. with promised files.

I wish I could strangle someone at Apple for making Photos use promised file drops. Although I do understand why they do it.

I have a book at home from Apple about how to make your applications support interapplication communication and why making apps so they can work together is better for the user. Now we have each app as an island mentality.

Promised files don’t exist until the drop is completed; then it’s the responsibility of the promiser to create those files at that location. At first I thought that Apple Photos was simply copying the files there, but then found that no, it’s actually opening the original file and then saving a lower quality JPEG in the dropped location.

---

<div class="post-metadata">

**Author:** ![Olivier\_Colard](https://forum.xojo.com/user_avatar/forum.xojo.com/olivier_colard/32/313_2.png) [@Olivier\_Colard](https://forum.xojo.com/u/Olivier_Colard)\
**Post date:** [December 2, 2016, 7:59am UTC](https://forum.xojo.com/t/macos-sierra-promised-file-drop-on-app-icon/34725/12 "2016-12-02T07:59:53Z")

</div>

Yes Sam, I noticed that too, the dropped image is not the same quality as the original one. Even “exporting” a file doesn’t always give the best quality.

I wanted to point out that dropping on the docked application icon is working with El Capitan and not with Sierra.  
So if Apple didn’t change this behavior ‘by design’ it’s a regression.

---

<div class="post-metadata">

**Author:** ![Sam\_Rowlands](https://forum.xojo.com/user_avatar/forum.xojo.com/sam_rowlands/32/265_2.png) [@Sam\_Rowlands](https://forum.xojo.com/u/Sam_Rowlands)\
**Post date:** [December 3, 2016, 5:03am UTC](https://forum.xojo.com/t/macos-sierra-promised-file-drop-on-app-icon/34725/13 "2016-12-03T05:03:13Z")

</div>

There is another way… You can use the NSMediaLibraryBrowser to display a floating window to which people can use to pick their photos from “Photos” and any files dragged in from this palette are REAL files, not promised files.

[http://www.ohanaware.com/xojo/BetterPhotosintegration.zip](http://www.ohanaware.com/xojo/BetterPhotosintegration.zip)

When discussing this thread; I forgot all about this function. I’ve used it in the past with good success.

---

<div class="post-metadata">

**Author:** ![Olivier\_Colard](https://forum.xojo.com/user_avatar/forum.xojo.com/olivier_colard/32/313_2.png) [@Olivier\_Colard](https://forum.xojo.com/u/Olivier_Colard)\
**Post date:** [December 3, 2016, 4:12pm UTC](https://forum.xojo.com/t/macos-sierra-promised-file-drop-on-app-icon/34725/14 "2016-12-03T16:12:41Z")

</div>

Thanks Sam,

Thanks for the tip and for sharing the sample app, its much better indeed.  
I’ll have to find a way to customize the Media controller appearance to match my own app style but I’m not sure it’s possible…

---

<div class="post-metadata">

**Author:** ![Sam\_Rowlands](https://forum.xojo.com/user_avatar/forum.xojo.com/sam_rowlands/32/265_2.png) [@Sam\_Rowlands](https://forum.xojo.com/u/Sam_Rowlands)\
**Post date:** [December 4, 2016, 1:49am UTC](https://forum.xojo.com/t/macos-sierra-promised-file-drop-on-app-icon/34725/15 "2016-12-04T01:49:59Z")

</div>

[quote=301309:@Olivier Colard]Thanks Sam,

Thanks for the tip and for sharing the sample app, its much better indeed.  
I’ll have to find a way to customize the Media controller appearance to match my own app style but I’m not sure it’s possible…[/quote]  
You’re welcome and I’m not sure it’s easily doable, I seem to recall reading that there is a way of embedding the control into a window, but I never explored it as this ‘sorta’ worked.

It is a lesser evil of sorts; and I don’t know how long it might be around for, but in the mean time it’s certainly better than that promised file shit.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 6:33pm UTC](https://forum.xojo.com/t/macos-sierra-promised-file-drop-on-app-icon/34725/16 "2020-10-29T18:33:59Z")

</div>


