调试时从设备获取文件
我正在创建一个应用程序,在其中使用 device 在 plist 文件中编写字典。我的 Mac 中需要该文件。就像我使用模拟器一样,我可以访问我的文档目录,因为这是可以访问的。当我使用设备且应用程序处于调试模式时,如何在我的 mac 或我的代码中获取该文件。
请帮我 谢谢
I am creating a application in which I am writing dictionary in a plist file using device. I need that file in my Mac. As if I use simulator I can access my document dir coz this is accessible. How can get that file in my mac or my code while I am using device and application is in debug mode.
Please help me
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 Info.plist 文件中启用
UIFileSharingEnabled
。然后,将 plist 复制到 Documents 文件夹。该文件可在 iTunes 应用程序选项卡的文件共享部分中访问。使用“导出”按钮将其复制到您的 Mac,或者直接拖放到文件夹中。要复制文件,您可以从以下代码开始,它将原始 plist 复制到带有时间戳的新文件,以便更轻松地分析文件的不同副本:
Enable
UIFileSharingEnabled
in your Info.plist file. Then, copy the plist to Documents folder. The file will be accessible in iTunes Apps tab, File Sharing section. Copy it to your Mac using Export button or just drag and drop to a folder.To copy the file you can start with this code that will copy the original plist to a new file with a timestamp, to make easier to analyze different copies of the file: