Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的应用程序创建、导出和导入文件,要知道导入的文件是否是我的,我使用扩展名但这还不够,所以我在文件中添加了一个字符串(作为数据)来检测它,但我再次认为这是不是正确的方法。
你能告诉我objective-c是否有办法做到这一点?
听起来像是Uniform Type Identifiers的工作。UTI 机制提供了基于不同标准识别不同类型数据的能力。