2

I got a lot of support requests from my Mac App Store apps describing drag & drop photo from Apple's app "Photos"(what a xxxx name they are using as an app!) to my app appears impossible under OS X El Capitan. That was ok in iPhoto ages.

The sandbox settings of my apps are all YES to these entitlements: com.apple.security.assets.movies.read-write com.apple.security.assets.pictures.read-write com.apple.security.files.user-selected.read-write

What I have to do is asking user drag & drop photos to their desktop first then drag & drop again to my app.

Anyone got this kind of problem for your third party apps and how can we fix it in OUR upgrade?

Jiulong Zhao
  • 1,313
  • 1
  • 15
  • 25
  • You can use a share extension to send it from those app, as seems Apple is doing it themselves. – Cai Jun 06 '16 at 22:20
  • Do you mean pop up a Share to menu every time? Any detail please? – Jiulong Zhao Jun 08 '16 at 04:45
  • I ment this https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/Share.html#//apple_ref/doc/uid/TP40014214-CH12-SW1 , but if you want direct drag and drop, it's also do able. I remembered Apple got a page with some sample code. – Cai Jun 08 '16 at 08:59

2 Answers2

3

Currently the Photos app uses File Promises when dragging files. (There is talk that this maybe will be changed because very few app handle file promises.)

You find more information about this in Drag and Drop Programming.

For dropping promised files on to application icon in Dock see my answer here.

Community
  • 1
  • 1
catlan
  • 25,100
  • 8
  • 67
  • 78
0

I created a sample project to demonstrate how you can do it here:

https://github.com/x43x61x69/Promised-files-Example

Cai
  • 3,609
  • 2
  • 19
  • 39
  • This iOS sample works by using Share Extensions! It should be considered as the the correct answer although the question is related to Mac OS. Thank you Cai! – Jiulong Zhao Jun 09 '16 at 19:32