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 :)

Notes on iPad Magazine Publishing

Before I get too deep into this post, I must admit, I’m a huge big fan of physical print magazine. My current subscriptions include Inc. and Popular Science. I believe I paid $10 bucks to get both of these publications delivered to my door for an entire year. I must also admit that I have a vested interest in how magazines will work on the iPad which I plan to unveil sometime in the near future. Ok, cool.

It’s been said that the iPad could be the savior of the magazine publishing industry but truthfully I have yet to see a really amazing implementation of a digital magazine that makes me actually want to buy content and interact with the product on a regular basis. A few apps, including Flipboard and Pulse, have made me feel giddy about “consuming” content but after a few days I’ve found myself not opening these apps at all. Not to mention, these apps are not even selling any content whatsoever. I still regularly find myself opening my relatively *ugly* RSS reader and reading content there. It’s just easier on the eyes, for me anyways, to see content laid out in that fashion.

Needless to say, big magazines publishers are currently scrambling to get their content on the iPad. Many have resorted to charging ridiculous prices for “digital editions” of their magazine publications which has turned off many potential customers- myself included. I’m assuming the high cost per issue is really in place to cover the steep cost of production. They gotta pay off them developers some how!

Unfortunately, however, major magazine publishers have very few options at this point.

Hire an entire staff of iPad developers and content creators
The first option magazine publishers have is to hire iPad developers and additional resources to support a new wing of the business. This may require cutting some of your existing staff in order to allocate a budget for your new staff or shifting around some existing roles within the organization. I should also note that this kind of talent search also requires allocating additional resources in the staffing/recruiting department. Great iPad developers are hard to find and even harder to hire full-time so this will definitely be a challenge for magazine publishers.

Wait it out
Soon big magazine companies will either have to create new technology in-house to publish their digital content or wait until this technology has been made available to them. Creating new technology in-house may allow publishers to be first to market however this is a very expensive solution. Developers with the technical know-how to make this happen are very few and very expensive. Publishers who opt to build their own technology for publishing to the iPad or any other digital outlet, will not only need to build the new technology but also have a fully trained team on staff that understands their proprietary software and process.The alternative of course is waiting for the technology to arrive which will making publishing to the iPad easier and faster without having to completely rehaul your company. One of the drawbacks however in waiting for this tech is that it may make a publisher seem late to the game. In the end this is a less expensive option with a potentially higher or equal return on investment.

Dive in NOW!
Like many of the top publishers, getting their content on the iPad as quickly as possible was the solution. Regardless of quality in the end product, the content HAD to be available on the new platform. This is understandable and I think it’s very brave (and risky!) for a lot of this publishers to take the leap first. I also believe we will continue to see publishers take even bigger risks once iPad use becomes more ubiquitous.

It’ll be really interesting to see how the future of publishing is shaped before our eyes. In a way, publishers are making a huge bet that Apple’s iPad is indeed the best format and device for consuming their content and that’s probably good news to Apple. I have lots more to write about on the subject but I figured this would be a nice introduction to this topic and my thoughts on it.

What do you think about magazines on the iPad?

 

Two desktop apps every iOS developer should have

If you are an iOS developer you should definitely give these apps a spin. They’ve definitely helped me become more efficient in my work.

Snippets

Snippets is a powerful application for Mac OS X that stores the most valuable pieces of code you can reuse in different projects many times.

The main idea is to make the process of reusing as easy as possible to avoid wasting your valuable time to write the same code again.

Snippets is great at sorting and organizing code snippets. I no longer have to remember how to do certain programmy things when I know I can quickly and easily refer to a snippet I’ve saved.

 

 

Ingredients

Ingredients is a free browser for Apple’s documentation

Ingredients adds a nice way to browse and search the SDK documentation. Highly recommend it if you find yourself jumping to Apple’s documentation often.

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/

Freelancer Lesson From Don Draper

While watching Season 3 of Mad Men (for the second time) in preparation for Season 4, Don Draper hit me with this very appropriate business lesson ….

“Connie, there are snakes that go months without eating. And then they finally catch something, but they’re so hungry that they suffocate while they’re eating. One opportunity at a time.”

Fellow freelancers and indie developers, choose the projects you take on wisely.

Getting the iPad and Verizon Fios WiFi Router to play nice

Ever since I bought my iPad and signed up for Verzion Fios internet my iPad’s wifi connection has been dropping on every use. If you have the ActionTec WiFi router which Verizon typically provides you with, you may find my instructions below helpful:

1. Go to http://192.168.1.1
2. Username should be ‘admin’ and password should be ‘password1″ (don’t worry about the extra characters the text box automatically adds. It’s an encryption feature.)

3. Click on ‘Wireless Settings’ on the top navigation menu

4. Click ‘Basic Security Settings’ from the left navigation menu

5. Switch the Channel to 6 (or one of the standard Channels 1 or 11)

6. Click Apply at the bottom of the page

7. Click ‘Advanced Security Settings’ from the left navigation menu

8. Select WPA2 security (the default is WEP , which is weaker)

9. Set up your pre-shared key on the screen presented (this is your network password)

10. Click apply

No more dropped connections after following these steps!