For the fields listed below, what are the recommended or typical values such that (1) my app can open, edit, and save any ".txt" file and (2) such that other text viewing/editing apps can open the files created by my app? If it matters, my app can view, create, edit, and save UTF-8 text.
Document Types fields Name and Types and all the fields for Imported Type Identifiers. And any other important fields or other things that I should set.
Also, if I upload my app to the App Store and make a mistake on some or all of these, will I be able to correct them?
My knowledge in this area is close to zero, so I'm hoping for minimal technical information, just simple answers if such are possible. I hope you understand.
Since public.plain-text
is a system-defined UTType, and you want a standard extension (.txt
), you don't need to declare either an imported or exported type identifier. You can just specify your document type as public.plain-text
directly.
You could use a more specific system-defined type to limit your app to UTF8, but it's probably a better user experience if your plist allows anything that appears to be a text file, then validate the data when you first open the file, to make sure it's a format your can read. Keep in mind that many files end being given the "wrong" extension, and trying to enforce a format precondition may result in obscurely unhelpful errors being presented to the user.