Search code examples
cocoawritetofileuti

Cocoa writeToFile: with a specific UTI


My app exports to CVS but Numbers won't open it because it dosen't have the public.comma-separated-values-text UTI. Is there a simple way to apply the UTI to the file as im writing it or do I have to declare it in info.plist? I don't want my app to open CVS files, it just needs to export it's data.

Thanks for any help


Solution

  • Numbers or Excel opens CSV files, not CVS files. You see, they are C omma S eparated V alues :) The system automatically assigns the UTI. So, use the extension .csv. CVS is a name of a Drug Store chain.