How To Tether iPhone 3.0 Without Jailbreaking

Posted 15 days ago

So with iPhone 3.0 you can tether you computer to your iPhone, but not yet for some carriers. It's pretty dang sweet and works really well so let's do it early. It's actually pretty easy to get setup. I would write an app to automate it, but I'm sure Apple will release an update and break all of this soon, so follow my steps to get going.

I did this with iTunes 8.2 (23) on OS 10.6 (10A380) on AT&T with iPhone 3.0 (7A341), but I'm quite confident it works with iTunes 8.2 on Leopard and most carries (we'll look up a list later). You will need to make sure you are running the 3.0 firmware on your iPhone. I'll try to keep this pretty basic so you don't need technical knowledge. There are a lot of steps because I am very specific for people that are not familar with editing these kind of files. Don't be intimidated. It's pretty straight forward.

  1. Quit iTunes and open up Terminal (/Applications/Utilities/Terminal.app)

  2. Run the following command to enable carrier testing. We'll need this later

     defaults write com.apple.iTunes carrier-testing -bool TRUE
    
  3. Now we need to get the list of carriers. Run this command:

     curl -s -L http://phobos.apple.com/version | grep -i carrier
    
  4. That command will return a big list of ipcc files. Look for the one that ends in your carrier. If you have AT&T, it will be called ATT_US.ipcc. Copy that URL between the <string> tags.

  5. Now type the last portion of the URL before .ipcc where it says YOUR CARRIER (mine would be ATT_US)

     declare CARRIER="YOUR CARRIER"
    
    So for AT&T, it would look like
     declare CARRIER="ATT_US"
    
  6. Type the following commands in Terminal. (Obviously paste the URL where it says.)

     cd ~/Desktop
     curl [PASTE URL HERE] > $CARRIER.zip
     unzip $CARRIER.zip
     rm -f $CARRIER.zip
     open Payload
    
  7. There should now be a folder on your desktop named Payload that just opened. (If there is not, start back at step one and carefully follow the instructions this time.)

  8. Right click on the .bundle file in that folder and choose Show Package Contents. We're going to edit a few files in here. You will need to have the developer tools installed to get Apple's Property List Editor utility. If you do not have these tools, go to http://developer.apple.com/mac, sign up for an account, download Xcode, and install it. Once you do this, it will install Property List Editor in /Developer/Applications/Utilities/Property List Editor.app.

  9. Right click Info.plist, choose Open With, then choose Property List Editor.

  10. Once the Property List Editor is open, choose Show Raw Key/Values from the View menu in the menubar. The Property List Editor is pretty straight forward so don't be scared :)

  11. Change CFBundleVersion to 5.0. Now save and close Info.plist.

  12. Now open version.plist with Property List Editor, change CFBundleVersion to 5.0, save and close version.plist.

  13. Now for the fun one :) Open carrier.plist with Property List Editor, click the triangle next to apns to show its contents. This will probably be the first item.

  14. Click on apns and click the button that appears out to the right. It will have three horizontal lines on it.

  15. Change the type of the item you just created to Dictionary in the type column. Click the triangle next to the Item 0 (the item you created in step 14). The button out the right will have have that same three horizontal lines icon. Click this button to make a new entry in that dictionary.

  16. In this entry, make the key apn and the value internet. Leave the type as String.

  17. Make another entry by clicking that same three horizontal lines icon. This time make the key password and the value password. Leave the type as String again.

  18. Make another entry by clicking that same three horizontal lines icon. This time make the key username and the value iphone. Leave the type as String again.

  19. Now click the triangle next to Item 1. You should see the key apn with the value containing wap. and your carrier. For me this is wap.cingular. Click on Item 1 and make another entry by clicking that same three horizontal lines icon. This time make the key type-mask and the value -2. This time change the type to Number. If you don't one of the items in the apns dictionary who's apn value has wap. in it, simply do this for all of the items in that apns dictionary.

  20. Now click on Root at the very top of the file. Click that same three horizontal lines icon. This time make the key AllowEDGEEditing. Change the type to Boolean and check the box in the value column. Save and quit Property List Editor. We're done with all of that. Phew.

  21. Back in Terminal, run the following command

    zip $CARRIER.ipcc Payload
    
  22. Now you can quit Terminal and open iTunes and connect your iPhone.

  23. Go to the iPhone summary by selecting the iPhone from the source list on the left. Hold down option and click on Check for Update. This will open up a window to choose a file. Choose the ipcc file on your desktop. If you cannot select ipcc files here, be sure you did step 2 while iTunes was not running. You could try running this command again and restarting iTunes if you still can't select ipcc files in this dialog. If you still can't select ipcc files after this, then Apple has probably closed up this hole. Sorry.

  24. If the window just goes away, then you did it! Simply restart your iPhone.

  25. Open up the Settings app on your iPhone. Choose General > Network > Internet Tethering to configure it. Enjoy!

Web Services with Cocoa Surprise

Posted 18 days ago

This week I have a talk at the first Oklahoma City CocoaHeads meeting. I was going to talk about transferring data from web services with plists. I spend most of the day working on SSConnection, a simple Foundation class for easily transferring plist data from a web service to a Cocoa application.

I was so into plists because at the Austin iPhone Tech talk I attended, they encouraged you to transfer data in plists because it had native parsing. I have to admit the native parsing is quite awesome. One method and everything is all parsed and ready.

I was using JSON (javascript object notation) to transfer everything with the JSON Framework. I had started switching everything to use plists. I spend a ton of time writing a PHP class to convert arrays to and from plist strings.

When I was preparing for my talk I decided to do some benchmarks to show how much more awesome plists were than JSON. The plist version was about 8 times faster than my JSON Framework version. I was pretty happy with that result. My friend, Jake, said he was using TouchJSON to parse JSON in his apps, so I figured I'd go ahead and benchmark that one too. I was expecting JSON Framework to beat it because the interface to the JSON Framework is a lot simpler than the interface to TouchJSON.

What I found was very surprising. TouchJSON actually beat plists. It was slightly faster in every test I ran. This is awesome because plists have a much larger file size. They are usually about twice as big as JSON files due to all of the extra markup.

I am keeping everything using JSON now instead of switching to plist. JSON will transfer twice as fast and parse faster than plists do. Awesome.

Sorry to everyone I preached plists to. I assumed Apple would be correct. They were not.

Why I Do Not Profit Share

Posted 22 days ago

As a freelancer, I get a lot of people pitch me ideas they want me to work on. On average, I get one of these ideas pitched to me every two days. This is great. I am always looking for something to work on.

Almost all of these app ideas are iPhone apps. I welcome iPhone work as I absolutely love the platform. For the first time I had a client want to profit share with me. They wanted to work on an idea they probably spent a few hours on for weeks and then share all of the profit with me. There are several reasons why I do not do this, ever.

  1. I am fully capable of coming up with my own ideas and then getting all of the money. Why would I work on the customer's idea that I'm less passionate about and get half of the money?

  2. If the customer really believed in their idea, they should take out a business loan and pay me the small amount of money compared to what they will make if their ideas is as good as they think it is.

  3. It is a bad idea for the customer because I will be way less motivated to work on something with future compensation that I may never receive.

So if you are thinking of asking me to work on your idea and cannot pay half upfront (as well as the remainder of course), then do not contact me because I will not work on your idea.

Scratch that, I'm staying in Oklahoma City

Posted about 1 month ago

So a few weeks ago I posted that I was moving to Louisville. After having seconds thoughts and going back and forth on my decision, I'm going to stay here in Oklahoma City.

I wish I could be in both places. I have such great friends in both cities. Buying a house is one of the things that is keeping me here.

I'm excited about a lot of things to come. Life is good.

Moving to Louisville

Posted about 1 month ago

Now that I don't have a "job" I have freedom to live where ever I want, which is awesome. I will really miss all of my Oklahoma friends, my house, and the band I play in.

I am looking forward to a lot of old friends in Louisville. I love it here.

It's kinda funny how this all worked out. I didn't plan on moving actually. My mom is moving to Northern California this summer for an awesome job. I'll be moving back to Louisville to live in her house so she doesn't have to sell it. I'll be renting my house out to some friends in Edmond. It all worked out perfectly.

I will be continuning my freelance work exactualy like I was in Oklahoma. I will probably move after WWDC this summer.

Update: Scratch that, I'm staying in Oklahoma City