UTI 唯一类型标识

 

本文转载至 http://blog.csdn.net/zaitianaoxiang/article/details/6657231

 

Adopting Uniform Type Identifiers采用统一类型标识符
Introduction to Uniform Type Identifiers Overview 统一类型标示符概述
Declaring New Uniform Type Identifiers声明新的统一类型标示符

From the documentation:

If your application uses proprietary data formats, you should declare them in the Info.plist file of your application bundle. Some guidelines:

  • Your UTI string must be unique. Following the reverse-DNS format beginning with com.companyName is a simple way to ensure uniqueness. While the system can support different UTI strings with the same specification, the reverse is not true.

  • If your code relies on third-party UTI types that may not be present on the system, you should declare those UTIs as imported types in your bundle.

  • Be sure to add conformance information if your proprietary type is a subtype of one or more existing types. In most cases you should not specify conformance to a nonpublic type, unless you are also declaring that type in your bundle. For a list of public and Apple-defined UTIs, see "System-Declared Uniform Type Identifiers"

如果你的应用程序用到专用的数据类型,你需要声明他们在你的应用程序绑定的info.plist文件。

一些提示:

      你定义的统一类型标识 必须是特定的,随着com.companyName反向DNS格式开始是一个简单的方法,以确保其唯一性。虽然该系统可以支持不同的UTI的字符串按照同样的规格,反之则不行。

      如果你的代码依赖第三方的UTI但是可能不存在于系统中,你应该声明UTI为绑定的导入类型

      如果您的专有类型是一个或多个现有类型的一个子型,则必须要添加一致性的信息,在大多数情况下,你不应该为非公有制类型指定一致性除非你也声明了此种类型在你的bundle中。

      对于公众和苹果定义的UTI的列表,请参见“System-Declared Uniform Type Identifiers”

转载于:https://www.cnblogs.com/Camier-myNiuer/p/3601794.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值