32

I have a random crash in my iOS app. This happens when on slow internet connection. My office internet speed is too fast.

For testing on simulator, I installed Network Link Conditioner as mentioned here: 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.

I have: Mackbook retina, OSX 10.7.5, XCode: 4.4.1

Restarting Xcode and Simulator also didn't work.

Are there any additional settings required for Network Link Conditioner? Or should I do something else to regenerate the crash? Any help?

7
  • If your Mac is hardwired, switch to wireless. And maybe start 2-3 megadownloads in other windows.
    – Hot Licks
    Commented Oct 16, 2012 at 15:23
  • 1
    @HotLicks I am on wireless and I already had tried this using torrents but it works randomly. 1-2 out of 10 tries. Commented Oct 16, 2012 at 15:31
  • what do you use as your server ? some, like nginx allow you to throttle bandwith on server side
    – Bastian
    Commented Oct 16, 2012 at 15:45
  • I don't know too much about servers but I have a DSL connection with wifi router. The subscription is 20Mbps. Commented Oct 16, 2012 at 15:47
  • @AbdullahUmer Just cover your WiFi router with aluminum foil until the connection is very bad and thus slow. Also, try disabling the WiFi on your computer while your App is downloading and see how it reacts. You can check the connection speed on the computer by holding down ALT button and clicking on the wifi. Then it will tell you the transmit rate (mine shows 300 which is 300 Mbit/s).
    – Sverrisson
    Commented Oct 16, 2012 at 18:16

3 Answers 3

52

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.

Note: It appears after device has been connected to Xcode, enabled for development and some app run on it.

Here's how you can test HORRIBLE network performance: enter image description here

5
  • 1
    very strange. I have iOS 6 in my iPhone 4S and I dont see the Developer Settings in Settings. O.o Commented Oct 16, 2012 at 15:27
  • BTW, this won't help for the time being as I don't have the developer profile. For now I'm working on Simulator only. Commented Oct 16, 2012 at 15:35
  • @AbdullahUmer Sorry, but I assumed that you had a development profile.
    – Sverrisson
    Commented Oct 16, 2012 at 18:09
  • It seems this settings are not there anymore in Xcode 8.3.3
    – Mick F
    Commented Jul 27, 2017 at 13:11
  • 1
    @DirtyHenry It appears after you connect to XCode with cable and run code on the device.
    – Sverrisson
    Commented Jul 27, 2017 at 15:01
7

What about a development proxy server to simulate slow connections? One that looks promising is http://www.charlesproxy.com/

2
  • Thanks dude! But I'm in Saudi Arabia. Proxy servers are blocked here. I can't even access the mentioned website. Commented Oct 16, 2012 at 15:29
  • Charles is a proxy application that runs on your development machine. You can route all http calls via the Charles proxy in your internet settings. One of the things that Charles lets you do is simulate slow connections. i.e. it's not a proxy server and you should be able to use it in Saudi Arabia
    – tarling
    Commented Apr 23, 2014 at 15:53
0

Can't you use a ipad/iphone connected to your mac to reproduce the crash ?

ios6 contains a network link conditioner, too: http://www.neglectedpotential.com/2012/09/ios6-network-link-conditioner/

1
  • I can't because currently we haven't created the developer provisioning profile. So I can't deploy the app in any device. I have been testing on simulator. The internet speed was slow for some reason and I encountered the crash. This was happening since a couple of days but I couldn't understand whats the reason. Commented Oct 16, 2012 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.