跳到主要内容
uencoder

Plist

Plist(属性列表)是 Apple 生态的序列化格式,有 XML 与二进制两种形式,用于 macOS/iOS 配置。

用途

提供 Apple 平台标准的配置与元数据序列化格式。

机制

支持 NSArray、NSDictionary、NSString、NSNumber、NSData、NSDate 等有限类型。XML plist 用 <dict><key>...</key><string>...</string></dict> 结构。二进制 plist 更紧凑。plutil 可转换。

用例

  • macOS 偏好设置
  • iOS Info.plist 配置
  • Xcode 项目配置
  • Apple 元数据

示例

  • 输入
    <plist><dict><key>name</key><string>Ada</string></dict></plist>
    输出
    {name:"Ada"}

    XML plist

常见错误

Binary plists cannot be edited with text tools
Convert to XML with plutil for editing

相关词条

相关工具

参考链接