简体   繁体   English

为什么 Apple Xcode iOS Simulator 会丢失 Safari.app?

[英]Why does Apple Xcode iOS Simulator lose the Safari.app?

I'm using Apple's Xcode iOS-Simulator to run tests of a browser application on a (virtual) iPad device.我正在使用 Apple 的 Xcode iOS-Simulator 在(虚拟)iPad 设备上运行浏览器应用程序的测试。 To connect my code I use Appium.为了连接我的代码,我使用 Appium。 But sometimes the iOS simulator loses the safari.app , so I can't run the tests (without a browser on my device - it's not only not displayed, it's not there).但有时 iOS 模拟器会丢失 safari.app ,所以我无法运行测试(我的设备上没有浏览器 - 它不仅不显示,也不存在)。 I don't know why the safari.app is lost and when this happens.不知道为什么safari.app 会丢失以及何时会发生这种情况。 It's the same problem with all devices (iPad and iPhone) and all software versions that are installed.所有设备(iPad 和 iPhone)以及安装的所有软件版本都存在同样的问题。

First, I tried " reset content and settings ", but nothing happened.首先,我尝试了“重置内容和设置”,但没有任何反应。 Then I installed Xcode's iOS-Simulator 6.1 package and switched to it.然后我安装了 Xcode 的 iOS-Simulator 6.1 包并切换到它。 This version contained safari.app.此版本包含 safari.app。 I switched through the different versions and after some switches, the devices with 7.1 had safari.app again.我切换了不同的版本,经过几次切换后,7.1 的设备再次拥有 safari.app。

A short time later Xcode iOS-Simulator lost the app again.不久之后,Xcode iOS-Simulator 再次丢失了该应用程序。 " Reset content and settings " didn't work again, switching the versions had this time no effect. 重置内容和设置”又没用了,这次切换版本没有效果。

Then, I removed Xcode from the mac and installed it again (with 2.1 gb to download...).然后,我从 mac 中删除了 Xcode 并再次安装(使用 2.1 gb 下载...)。 safari.app was not on the simulated device. safari.app 不在模拟设备上。 I used " reset content and settings " and then the safari.app was there.我使用了“重置内容和设置”,然后 safari.app 就在那里。

The last part (from reinstall to reset) is the way I go every time the simulator loses safari.app, which wastes time and is annoying!最后一部分(从重装到reset)就是我每次模拟器丢safari.app的时候走的路,浪费时间,烦人!

I use OS X 10.9.2 with Xcode 5.1.1 (Build 5B108).我使用 OS X 10.9.2 和 Xcode 5.1.1 (Build 5B108)。

So I have two questions:所以我有两个问题:

  1. What causes iOS-Simulator to lose safari.app?是什么导致 iOS 模拟器丢失 safari.app?

  2. How can I get it back without reinstalling Xcode?如何在不重新安装 Xcode 的情况下取回它?

There might be a workaround.可能有一种解决方法。 You are able to open the xcode folder and go to your simulation files.您可以打开 xcode 文件夹并转到您的模拟文件。 Do a backup of the ios-Simulator files.备份 ios-Simulator 文件。 If your simulator loses the safari app, close xcode and copy your backup files into your xcode folder again.如果您的模拟器丢失了 safari 应用程序,请关闭 xcode 并将您的备份文件再次复制到您的 xcode 文件夹中。 So you don't have to reinstall it.所以你不必重新安装它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM