整理data of plist file

.plist file是特殊的xml文件,在ios中,使用sandbox机制 to persist data, made data locally.
There are four different way(plist, userdefault, sqlite, xxxxx)
使用xcode。
1.获得.plist文件
Windows - devices - download container
这个步骤会把整个folder with container下载下来
格式如下:gareth.collectDefaultData 2017-05-10 11/03.58.xcappdata

right click the xcappdata and choose "show package content"
this xcappdata is in AppData - Library - Preferences

  1. conver .plist file to .json file
    in terminal, Enter the directory in the .plist
    Enter :// plutil -convert json -o Data.json g1.plist
    Data.json是你自己需要的json file的名称
    g1.plist是目标文件
    此时会得到一个只有一行的json 文件

  2. extract json file to normal txt file
    I implemented a python file named "extractJSON.py"

plist处理起来非常麻烦,key是disorder的,如果按照我之前的插入数据,很难做统计
固有此方法

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,908评论 18 139
  • 喜欢简单的生活,喜欢随遇而安的欢乐;闲暇时看看书,烦闷时听听歌……很多人都问我:这样的日子会不会太无聊?但是我觉得...
    A艾米儿阅读 137评论 0 0
  • 其实这个道理很简单啊,因为所谓的投资,不就是用现在的资源换取未来的资源吗?所以,活在未来的人一定比活在当下的人拥有...
    俞燕文阅读 144评论 0 0
  • ‘‘人之初,性本善’’为大多数人所熟识的,但是真正的一生下来就是善良、纯洁的人是很少的.每个人都有潜藏的恶,只是这...
    欲与情阅读 964评论 0 1
  • 当你得到永生时,你会选择让什么来陪伴这无休止的生命,是爱情、是人性,还是更复杂的感情?当这一切强加在你身上时,你又...
    香小蕉阅读 446评论 0 2