Mac OS系统自身包含有转换plist的工具:plutil.其中-p是以human可读方式显示plist文件,而convert就是转换参数,其中支持的格式有:xml,二进制和json。下面拿一个实际例子测试下,该plist文件是二进制文件:

apple@kissAir: Contents$ls

Info.plist MacOS     
Resources

apple@kissAir: Contents$cat I*

bplist00?

!"#$%&'()*(WDTXcodeYDTSDKName_NSPrefPaneIconFile\CFBundleNameZDTSDKBuild_CFBundleDevelopmentRegion_CFBundleVersion_BuildMachineOSBuild_NSPrincipalClass]NSMainNibFile_NSPrefPaneSearchParameters_SSupportsSuddenTermination_CFBundlePackageType_CFBundleInfoDictionaryVersion_CFBundleExecutableZDTCompiler_CFBundleIdentifier_DTPlatformVersion\DTXcodeBuild_CFBundleSignature_NSPrefPaneIconLabel_DTPlatformBuildT0463Zmacosx10.6_FlashPlayerPreferences.png\Flash
PlayerV10K549WEnglishZ15.0.0.239U12F45_FSPreferencesMain_FlashPlayerPreferencesTtrueTBNDLS6.0\Flash PlayerP_ com.adobe.flashplayerpreferencesRGMV4H1503T????\Flash Playe7?I^kv??????,Lal????????

'28Lejos??????+?

显示其内容:

plutil -p I*

{

"DTXcode" => "0463"

"DTSDKName" => "macosx10.6"

"NSPrefPaneIconFile" => "FlashPlayerPreferences.png"

"CFBundleName" => "Flash Player"

"DTSDKBuild" => "10K549"

"CFBundleDevelopmentRegion" => "English"

"CFBundleVersion" => "15.0.0.239"

"BuildMachineOSBuild" => "12F45"

"NSPrincipalClass" => "FSPreferencesMain"

"NSMainNibFile" => "FlashPlayerPreferences"

"NSPrefPaneSearchParameters" => "FlashPlayerPreferences"

"NSSupportsSuddenTermination" => "true"

"CFBundlePackageType" => "BNDL"

"CFBundleInfoDictionaryVersion" => "6.0"

"CFBundleExecutable" => "Flash Player"

"DTCompiler" => ""

"CFBundleIdentifier" => "com.adobe.flashplayerpreferences"

"DTPlatformVersion" => "GM"

"DTXcodeBuild" => "4H1503"

"CFBundleSignature" => "????"

"NSPrefPaneIconLabel" => "Flash Player"

"DTPlatformBuild" => "4H1503"

}


转换:

apple@kissAir: Contents$plutil -convert xml1 I* -o ~/x


这是转换后的内容:

apple@kissAir: ~$file x

x: XML document text

apple@kissAir: ~$cat x

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

<key>BuildMachineOSBuild</key>

<string>12F45</string>

<key>CFBundleDevelopmentRegion</key>

<string>English</string>

<key>CFBundleExecutable</key>

<string>Flash Player</string>

<key>CFBundleIdentifier</key>

<string>com.adobe.flashplayerpreferences</string>

<key>CFBundleInfoDictionaryVersion</key>

<string>6.0</string>

<key>CFBundleName</key>

<string>Flash Player</string>

<key>CFBundlePackageType</key>

<string>BNDL</string>

<key>CFBundleSignature</key>

<string>????</string>

<key>CFBundleVersion</key>

<string>15.0.0.239</string>

<key>DTCompiler</key>

<string></string>

<key>DTPlatformBuild</key>

<string>4H1503</string>

<key>DTPlatformVersion</key>

<string>GM</string>

<key>DTSDKBuild</key>

<string>10K549</string>

<key>DTSDKName</key>

<string>macosx10.6</string>

<key>DTXcode</key>

<string>0463</string>

<key>DTXcodeBuild</key>

<string>4H1503</string>

<key>NSMainNibFile</key>

<string>FlashPlayerPreferences</string>

<key>NSPrefPaneIconFile</key>

<string>FlashPlayerPreferences.png</string>

<key>NSPrefPaneIconLabel</key>

<string>Flash Player</string>

<key>NSPrefPaneSearchParameters</key>

<string>FlashPlayerPreferences</string>

<key>NSPrincipalClass</key>

<string>FSPreferencesMain</string>

<key>NSSupportsSuddenTermination</key>

<string>true</string>

</dict>

</plist>


最新文章

  1. Project简介
  2. OC block的简单使用
  3. 移植UE4的模型操作到Unity中
  4. Python应用与实践
  5. jQuery 中 children() 与 find() 用法的区别
  6. wikioi 1206 保留两位小数 【考查浮点数输入输出】
  7. ado无法访问数据库问题
  8. PHP问题Parse error: syntax error, unexpected end of file in
  9. 关于“SQL Server 阻止了对组件 &#39;Ad Hoc Distributed Queries&#39; 的 STATEMENT&#39;OpenRowset/OpenDatasource&#39; 的访问 ”
  10. NHibernate优点和缺点:
  11. php 7.3 新特性
  12. 基于Spring cloud Ribbon和Eureka实现客户端负载均衡
  13. 【easy】111. Minimum Depth of Binary Tree求二叉树的最小深度
  14. JDK Timer &amp; TimerTask
  15. Hadoop学习笔记之五:HDFS功能逻辑(1)
  16. SSM集成activiti6.0错误集锦(二)
  17. 黄聪:PHP发送邮件出现Connection: opening to ssl://的解决办法
  18. PAT Maximum Subsequence Sum[最大子序列和,简单dp]
  19. 在Docker平台实现MySQL Replication(复制)
  20. C#控件一览表

热门文章

  1. 百度地图SDK3.4的使用
  2. .so的封装调用
  3. iOS下WebRTC音视频通话(一)
  4. iOS中 DataBase SQL数据库 UI_高级
  5. 第三方ProgressHUD进度条 技术分享
  6. (NO.00003)iOS游戏简单的机器人投射游戏成形记(六)
  7. OJ题:字符串分隔
  8. 【leetcode81】Product of Array Except Self
  9. OC——第五天NSSArray&amp;nbsp;/NSDicti…
  10. 《java入门第一季》之正则表达式常见规则