My OSX application does not want to open the files it creates

I developed a document-based application that uses basic data. When I launch the application, usually by double-clicking on it, it works fine, and I can create several data files with it. Then I close the application and try to open the file that I just created through the application, but I get a window that says: the document "data.hso" cannot be opened. MyApp cannot open files of this type.

I modified the plist file to include document types. As a resource, I used:

http://daemonconstruction.blogspot.com/2012/05/drop-of-file-folder-on-dock-icon.html

https://developer.apple.com/library/mac/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-101685

Delete files on Cocoa dock icon

I am really desperate at this moment, because I really can’t figure out why it should not work.

Any help is appreciated!

EDIT 1: here is a snapshot of my layer

enter image description here

+4
source share
1 answer

Perhaps the application delegate should implement - (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames

+1
source

All Articles