iOS Document/File Type Associations - Wildcard Uti

iOS Document/File type associations - wildcard UTI?

public.item works for every type I've tried so far.

How to support files with a dynamic type identifier but a specific extension?

You can define UTIs in your Info.plist. Make one up if this is for an extension of your own creation and put it under the "Exported Type UTIs". If it's for a known type of file but the UTI isn't well known, you can put it under the "Imported Type UTIs" section of your Info.plist. In either case, you can now reference this UTI in the Document types section.

Custom file types with iOS Document Interaction Programming

As far as i understand the UIT concept of Apple you cannot just change the file extension to change a potential UIT of the file. If the file contains XML-Data, other apps as well as internal apps might recognize your content and show it internally as XML.

Try to store your Plists with NSPropertyListSerialization NSPropertyListBinaryFormat_v1_0 (then you readble XML)

When you did that without success, why not trying this:

  1. use zlib to compress the XML plists afterwards to a zipped file.
  2. make a "unique" file extensions (<file>.myappname)

this should "hide" other apps and quick view.

Tell me if one of the ways did work for you.

iOS open app when file is tapped in `Files` app

In the info.plist add the key "Supports opening documents in place" of type BOOLEAN and set it to TRUE.

You can than check with

BOOL openInPlace = [options[UIApplicationOpenURLOptionsOpenInPlaceKey] boolValue];

in

- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options

if the provided url is a file that should be opened in place (most likely from the files app).



Related Topics



Leave a reply



Submit