7

I developed a document-based app that uses Core Data. When I start the app normally by double-clicking on it, it works perfectly and I'm able to create some data files with it. Then I'm closing the app, and trying to open the file I just created through the app, but I get the window that says:

The document "data.hso" couldn't be opened. MyApp cannot open files of this type.

I did modify the plist file to include the Document Types. As a resource I used:

I'm really desperate at this moment, cause I really can't think of a reason why it shouldn't work. Any kind of help is highly appreciated!

Here is the snapshot of my plist:

snapshot of plist

pkamb
  • 33,281
  • 23
  • 160
  • 191
Eugene Gordin
  • 4,047
  • 3
  • 47
  • 80
  • Show your info.plist. Is your app asked if it can handle the file at all? – Wain Oct 03 '13 at 20:46
  • 1
    So you are using the document based and core data... Any chance you are saving the database as sqlite file instead of your "document" ? Check the folder where your app is and compare it with your AppDelegate and see the files there. I would start with that – Farini Oct 03 '13 at 21:13
  • just added my plist snapshot...maybe it would show what I'm doing wrong – Eugene Gordin Oct 03 '13 at 23:09

1 Answers1

5

Maybe your application delegate needs to implement - (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames

Smilin Brian
  • 980
  • 8
  • 18