zoukankan      html  css  js  c++  java
  • iOS

    一、UTI概念

    1、什么是UTI

    Uniform Type Identifier,是字符串,格式标识符。

    根据UTI,可得到相应的其他类型的格式标识符。比如public.jpeg对应于:

    • A four-character file type code (an OSType) of 'JPEG'
    • A filename extension of .jpg
    • A filename extension of .jpeg
    • A MIME type of image/jpeg

    2、可包含的字符集

    可包含字符:字母,数字,点号,连字符。

    3、UTI句法

    反域名语法

    • com.apple.quicktime-movie
    • com.mycompany.myapp.myspecialfiletype
    • public.html
    • com.apple.pict
    • public.jpeg

     

    4、继承

    UTI与其他格式标识符的特点是可继承。比如 public.html 继承自 public.text ,声明可以打开 public.text 的应用同样可以打开 public.html。

    支持多继承。比如 com.apple.application-package 继承自 com.apple.bundle 和 com.apple.package。

    UTI可以说明物理和逻辑上两方面的类型。物理上分为文件夹、文件等类型;逻辑上分为图片、音频等类型。

    5、Identifier Tags

    每个UTI都可以有任意个Identifier Tags,这些Identifier Tags是UTI的等价替代物,比如filename extension, MIME type, or NSPasteboard type。

    二、UTI相关函数

    定义在MobileCoreServices库的UTType.h中

    三、声明新的UTI

    然后你就可以使用com.kingreader.umd标识符了~

    苹果文档:
    https://developer.apple.com/library/prerelease/watchos/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_intro/understand_utis_intro.html#//apple_ref/doc/uid/TP40001319-CH201-SW1

  • 相关阅读:
    pymysql 查询大量数据导致内存使用过高优化方案
    docker-compose文件
    Flask关于request一些方法和属性的整理
    gitignore 文件中忽略项不起作用的解决方法
    Django 时区
    django-apscheduler定时任务
    结队-贪吃蛇游戏-项目进度
    团队-科学计算器-开发环境搭建过程
    《团队-科学计算器-设计文档》
    《结对-贪吃蛇-设计文档》
  • 原文地址:https://www.cnblogs.com/tangjuanj/p/6015794.html
Copyright © 2011-2022 走看看