Simulating slow connection speeds in iOS App

It’s been a while since I’ve had the chance to share some tips but here’s something I came up with while testing an app I’m currently working on. The app downloads pretty big files at times and it’s pretty useful in testing to simulate slow connection speeds. Unfortunately because of some of the features in the app, it cannot be tested in the simulator so using something like SpeedLimit is not really an option (although this does work really well if you’re testing in the simulator). If you’re working on a fiber optic internet connection all the time you may forget that more often than not, your end user will not be on a really fast connection.

So what can you do to simulate a slower internet speed? It’s actually pretty easy. You will need a computer with with an ethernet connection and an airport card. You will share your ethernet connection over airport with your iOS device. Then you will throttle your connection speed on your laptop and boom … you’ll be crawling at 56kbps before you know it. Here’s the step by step.

1) Connect your mac using and ethernet cable into your router
2) On your mac, open System Preferences and click on Sharing.
3) Set “Share your connection from:” to Ethernet from the dropdown
4) Set “To computers using” to “Airport”
5) You’ll want to set your password and what not in the airport options. It’s pretty straightforward.
6) On your iOS device connect to the wireless network you’ve just created on your mac
7) Open terminal on your mac and there are two things to type here:

$ sudo ipfw pipe 1 config bw 384KByte/s
$ sudo ipfw add 1 pipe 1 src-port 80
In the command above will throttle your connection down to 384KByte/s or close to 3G speed. This is the number you will replace to simulate different connection speeds.
8) Make sure your delete that pipe when you’re done otherwise you’ll be surfing at snail speed.
$ sudo ipfw delete 1
For reference here are some numbers to play with:
1544kbps (T1)
768kbps (DSL)
384kbps (3G)
64kps (Edge)

I’m sure there are other ways to do this, but this method worked well for me. Happy Testing :)

Why AT&T will lose me as a customer. #attfail

As far back as I can remember owning a cell phone (since the cingular days), I’ve always had AT&T as my cellular provider. No problems whatsoever. I’ve always had great reception, hardly any dropped calls, and life was awesome.

Recently, however, my fiancée and I have moved into a new apartment in Brooklyn, NY where our reception is TERRIBLE. You would think being in a major metropolitan area, cellular reception would be ubiquitous. Think again.

Compound the lack of cellular reception with the need for me to run my business out of my home office and you can see how someone like me would be a bit upset. I’ve thought about dropping a land-line in my apartment but unfortunately that’s another expense my tiny little bootstrapped startup can’t afford.

I’ve called AT&T customer service a few times and here is a summary of their reponses:

Call #1 resolution:

We’re upgrading a tower close to you in 3 days. Wait three days and see if that makes it better.

Call #2 resolution (after resolution 1 failed):

We know you’re having cell reception issues. That’s because a bunch of towers in your area are down and we have no idea when they will be repaired or if that will even help.

I even got an email from a customer service rep that recommended this:

If indoors and there are no signal bars are displayed, attempt to step outside and see if the signal improves. If so, then indoor coverage is not available at the current location. Move to open areas that are less likely to block the signal to increase the phone’s signal strength. Confined areas such as tunnels, mirrored buildings, and elevators are known for blocking wireless signals.

Awesome. I guess that means every time I need to place or receive a business call and I need to quickly run down three flights of stairs and across the street to get some reception. Unacceptable.

As an iPhone developer, it is somewhat expected that I use an iPhone on a regular basis. While I love my iPhone 4, cell reception issues in my apartment have resulted in way too many dropped calls with clients and colleagues.

So interwebs, what should I do?

UPDATE (after posting this article I went back and forth a few times with @ATTJenn):

ATTJenn: I can take a closer look at this if you can please DM your cell number and zip code. Thanks.
Me: <number and zip sent>
ATTJenn: Thanks. There are known issues in your area that we are working to resolve. I apologize for the inconvenience and appreciate your patience.
Me: Can you tell me when you expect these issues to be resolved?
ATTJenn: Here is some additional information on how we are working to improve that area: http://bit.ly/c74JGoabout
Me: That article is from a month ago which says the upgrades are completed. I don’t have issues anywhere except my office.
ATTJenn: If the issue is isolated to one building, then it would not be related to the known issues in the area. I can understand that you are upset about how your service works when you are inside your office, and I am sorry for your frustration. A lot depends on the material used in the building’s construction. The signal for cell phones is in essence a radio signal and can be affected by the same structures that would block a radio station signal, for example. Depending upon where the tower is located and the angle of the antenna, you may find better coverage in one building over another.
Me: So what solution do you have for me other than moving to another building or canceling my service?
ATTJenn: At this point the best way to improve signal in a building is with MicroCell. You can check availability at http://bit.ly/njH2
(I checked the availability and the site was down. Lame.)
ATTJenn: You may want to also try manually switching to Edge just when in your office. This may help while in the building.
Me: Edge doesn’t help and there’s absolutely no way I am buying a microcell to fix your network. I don’t live in the middle of nowhere
Radio silence since then. I’m sure there will be more on Monday. Verizon is looking more attractive by the minute.

Death star image from http://www.applegazette.com/

The Indie iPad Developer’s Conundrum

We’ve all heard the success stories. Indie developers quitting their day job and striking it rich with an iPhone app they developed. Learning how table views work, working with tab controllers and pinging web service APIs into the wee hours of the night. Then making a killing in the app store. With the introduction of the iPad, these stories may come even less often …

What indie iPhone Developers need to learn now:
As soon as I began looking at the iPad SDK, I realized … I’m gonna need a UI/UX Designer now.With the introduction of the iPad, existing indie iPhone developers will be forced to either:

A) learn photoshop and illustrator
B) join forces with a good graphic designer.

Creating a compelling and engaging user experience on the iPad is significantly more difficult than on the iPhone. The iPad screen real estate is greater and you (the developer) need to fill that space up with visually striking goodness.

iPad Launch Day
Today the iPad launched and many developers will head to Apple Stores (or hopefully receive their shipments on time) and instantly load up their iPad app they’ve been previously working on using the simulator. The screen real estate is larger which makes for your potentially mediocre app to look even more medicore. Especially next to some of the apps that have already been showcased. Not to mention a few of the ridiclously awesome apps include: Netflix and Marvel.

What about you Jeff ?
At first sight, I could not place the iPad in my day to day. I already have a kindle and really enjoy reading books on it because of the e-ink. However, Indian Code clients have already gained interest and will undoubtedly be requesting services for this platform. So I will eventually need to own one pretty soon and will need to work closely with graphic designers to produce awesome releases. You can get away with using lots of the built in visual elements, but at some point , if you’ll really want to push the envelope and you’re gonna have to use visual elements outside of the SDK.

All in all, it is a great time to be an iPhone, iPad , and Mac developer. There is a lot of work out there if you seek it. Find yourself a good graphic designer who can be your partner and focus on making beautiful things! So go now and get started!