Question

I'm writing a Cocoa application using Xcode 4.6. The application supports drag and drop as well as being able to open files from a dialog.

I have registered the file types needed for drag and drop by specifying them in the correct Info.plist file, and that work fine. I'm finding that to apply the correct file extension in the open file dialog I have to duplicate information by programmatically recreating the array of extensions that are in the plist file and applying them to the dialog.

This can be a problem because the plist file and the programmatic array could get out of synch if supported files are ever modified.

I like to have a way to determine what file extensions where specified for the application in the plist file and apply that extension array to any open file dialog invoked in the application.

What is the best way to make sure file extensions are handled consistently in the application?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top