xcode 减慢iOS模拟器的互联网速度
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12916133/
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
Slow down internet for iOS simulator
提问by Abdullah Umer
I have a random crash in my iOS app. This happens when on slow internet connection. My office internet speed is too fast.
我的 iOS 应用程序随机崩溃。互联网连接速度较慢时会发生这种情况。我办公室的网速太快了。
For testing on simulator, I installed Network Link Conditioner as mentioned here: Installing Apple's Network Link Conditioner Tool
为了在模拟器上进行测试,我安装了 Network Link Conditioner,如下所述:Installing Apple's Network Link Conditioner Tool
Now the problem is that, I selected a slower connection profile but still I'm having the normal (fast) internet speed in simulator.
现在的问题是,我选择了较慢的连接配置文件,但我仍然在模拟器中拥有正常(快速)的互联网速度。
I also created my own profile and set the download bandwidth to 5kbps but still no use.
我还创建了自己的配置文件并将下载带宽设置为 5kbps 但仍然没有用。
I have: Mackbook retina, OSX 10.7.5, XCode: 4.4.1
我有: Mackbook 视网膜,OSX 10.7.5,XCode:4.4.1
Restarting Xcode and Simulator also didn't work.
重新启动 Xcode 和 Simulator 也不起作用。
Are there any additional settings required for Network Link Conditioner? Or should I do something else to regenerate the crash? Any help?
Network Link Conditioner 是否需要任何其他设置?或者我应该做些什么来重新产生崩溃?有什么帮助吗?
回答by Sverrisson
You can set the network to slow characteristic by testing on devices. Go to Settings -> Developer Settings -> Network Link Conditioner -> Enable. This is for iPhone/iPad running iOS 6 Network Link Conditioner is also available for the Mac in "Additional Tools for Xcode" for testing in the Simulator.
您可以通过在设备上测试将网络设置为慢速特性。转到设置 -> 开发人员设置 -> 网络链接调节器 -> 启用。这适用于运行 iOS 6 的 iPhone/iPad 网络链接调节器也可在“Xcode 的附加工具”中用于 Mac 以在模拟器中进行测试。
Note: It appears after device has been connected to Xcode, enabled for development and some app run on it.
注意:它出现在设备连接到 Xcode、启用开发和一些应用程序运行之后。
Here's how you can test HORRIBLE network performance:
以下是测试 HORRIBLE 网络性能的方法:
回答by Tim Büthe
What about a development proxy server to simulate slow connections? One that looks promising is http://www.charlesproxy.com/
模拟慢速连接的开发代理服务器怎么样?一个看起来很有希望的是http://www.charlesproxy.com/
回答by Bastian
Can't you use a ipad/iphone connected to your mac to reproduce the crash ?
您不能使用连接到 Mac 的 ipad/iphone 重现崩溃吗?
ios6 contains a network link conditioner, too: http://www.neglectedpotential.com/2012/09/ios6-network-link-conditioner/
ios6 也包含一个网络链接调节器:http: //www.neglectedpotential.com/2012/09/ios6-network-link-conditioner/