UTI

2018-08-15  本文已影响25人  e18fe4955e6e

iOS系统中为了更好的进行类型标识,而提供的一套共用的规范,(Uniform Type Identifier) Apple文档

UTI 定义

下图为Apple定义的jpeg的 UTI类型 - public.jpeg

uti

使用UTI来实现app之间文件传输

word.doc

然后把 com.microsoft.word.doc 添加到info.plist 的 Document Content Type UTIs中

791DB9A6-A06F-49BF-8BCF-B46011791FC8.png
 func application(_ app: UIApplication, open url: URL,
                     options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
        FileStorage.storage(url: url)
        return true
    }
.stl

把定义的stl 的uti Identifier 添加到info.plist的 Document types -> Document Content Type UTIs 中、就可以实现 .stl 后缀的文件传输

2D19733A-C296-4DF7-A84C-772B3731390B.png
uti.gif
上一篇 下一篇

猜你喜欢

热点阅读