Question

I'd like to give users the chance to import data into my app. The app uses core data and my idea would be that the user prepares a text file and send it as email. In the "Open in..." dialog I like my app to be listed.

The file will be a text file but the content must follow certain rules, so that I'm able to extract the data I need to populate core data entities.

Must I define a custom UTI for that?? (I don't want my app listed for every text file)

Was it helpful?

Solution

Yes you can define a UTI, as well as a MIME type for your format. Give it a unique file extension and the fact that's it's encoded in plain text is not important (HTML, XML, etc. all fall into this category).

You don't specify how complex your text format will be, but if it's complex then you might want to consider using a language parser tool to process it, utilizing bison/flex (yacc/lex), or ANTLR.

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