在工作站上浏览我正在开发的 iOS 应用程序在设备上创建的文件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6121613/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 20:04:58  来源:igfitidea点击:

Browse the files created on a device by the iOS application I'm developing, on workstation?

xcodeios

提问by Jim Blackler

I'm developing an IOS app that creates files on the device, e.g. with NSKeyedArchiver.

我正在开发一个 IOS 应用程序,可以在设备上创建文件,例如使用NSKeyedArchiver.

During Android development it's possible to browse a device filesystem when it's connected to your workstation via USB, for instance to help with troubleshooting your app.

在 Android 开发过程中,当设备文件系统通过 USB 连接到您的工作站时,可以浏览设备文件系统,例如帮助排除您的应用程序的故障。

However for IOS I don't see anything similar under the Organizer in Xcode, to help me browse files my app creates from the workstation. Googling "iOO browse device files", "iPhone view files" etc. reveals solutions for jailbroken devices but not for regular devices provisioned for development.

但是对于 IOS,我在 Xcode 的 Organizer 下看不到任何类似的东西,以帮助我浏览我的应用程序从工作站创建的文件。谷歌搜索“iOO 浏览设备文件”、“iPhone 查看文件”等会显示越狱设备的解决方案,但不提供用于开发的常规设备的解决方案。

How can I browse files on a device created by an iOS app I'm developing?

如何浏览由我正在开发的 iOS 应用程序创建的设备上的文件?

回答by Amy Worrall

In Xcode's Organiser, go to your device's Summary tab. Find your application in the list, and click the disclosure triangle. Under it, you should see an icon saying "Application Data". Click the down pointing arrow to download the data, and it'll prompt you for somewhere to save it.

在 Xcode 的管理器中,转到设备的“摘要”选项卡。在列表中找到您的应用程序,然后单击显示三角形。在它下面,您应该看到一个图标,上面写着“应用程序数据”。单击向下箭头下载数据,它会提示您选择保存数据的位置。

In Xcode 5, listed under your device in Organizer, click on "Applications" and you can see "Data files in Sandbox" in the bottom half of the window.

在 Xcode 5 中,在管理器中您的设备下列出,单击“应用程序”,您可以在窗口的下半部分看到“沙盒中的数据文件”。

In Xcode 6, go to Window -> Devices, select the device, select the app name under Installed Apps, click the settings gearbox, then select Download container.... In finder, double finger tap the package and select Show package contents. enter image description here

在 Xcode 6 中,转到Window -> Devices,选择设备,在Installed Apps下选择应用程序名称,单击设置齿轮箱,然后选择Download container...。在 finder 中,双指点击包裹并选择显示包裹内容在此处输入图片说明

回答by Ilya

In Xcode 6, open the Deviceswindow:

在 Xcode 6 中,打开设备窗口:

Step 1

第1步

Then, select the app (in Installed Apps) and then click the gear icon and select Download Container.

然后,选择应用程序(在已安装的应用程序中),然后单击齿轮图标并选择下载容器

Step 2

第2步

回答by Dren

Pls note, that you can view contents of downloaded .xcappdata container by right click on it and select "Show Package Contents"

请注意,您可以通过右键单击它并选择“显示包内容”来查看下载的 .xcappdata 容器的内容

回答by Samir Seetal

iExplorer works like a charm! Just used it to export some app files! http://www.macroplant.com/iexplorer/download-ie3-mac.php

iExplorer 就像一个魅力!只是用来导出一些应用程序文件!http://www.macroplant.com/iexplorer/download-ie3-mac.php

回答by Marlon Dias

In Xcode9: / Window / Devices and Simulators

在 Xcode9 中:/Window/Devices and Simulators

Select the desired installed app, click the gear at the bottom and Download container...

选择所需安装的应用程序,单击底部的齿轮并下载容器...

In Finder, "right-click" the downloaded file and Show Package Contentsto open it in a new Finder window.

在 Finder 中,“右键单击”下载的文件并显示包内容以在新的 Finder 窗口中打开它。

I hope it's useful. Peace.

我希望它有用。和平。

回答by mohsen

XCode version : 10.2.1

XCode 版本:10.2.1

goto window-> Devices and Simulators

转到window->Devices and Simulators

enter image description here

在此处输入图片说明

and after that choose your device from the left list, choose the app from the installed app, so you can press show containerfor show app's contains on the new page on xcode, press download containerto download it to your OSX, also you can replace an old container to the moment state with Replace container...

然后从左侧列表中选择您的设备,从已安装的应用程序中选择应用程序,这样您就可以show container在 xcode 的新页面上按显示应用程序的包含,按download container将其下载到您的 OSX,您也可以将旧容器替换为时刻状态与Replace container...

enter image description here

在此处输入图片说明