Jul
22
2008

I have moved back and forth between wanting to sell my original an iPhone and upgrade to a 3G, and just wanting to stay where I am.
Originally, Rogers data prices in Canada were too high, so I was going to stay put. Then they announced good pricing, so I listed my iPhone on eBay — it ended at $330, which is almost as much as I paid for it new. But the guy never sent the money… and then Pwnage 2.0 came out.
Now I’ve decided I really am satisfied with my first gen for another year. See Pwnage can jailbreak both the 3G and the original iPhone, but it can only unlock the original iPhone. The 3G remains carrier locked — which means a 3-year contract with Rogers if I want one. No thanks!
So now I have somewhere between the best of both worlds. I’m on a local carrier, but with no lock, and complete freedom to go elsewhere (although, there’s no in-country competition right now.) Location services suck on the original iPhone, due to the lack of real GPS, but everything else is pretty much the same now that I have the 2.0 firmware. And boy, am I glad I have it.
The AppStore is awesome. Its truly great. I thought they’d have a hard time showing up Installer.app and the jailbreak community’s efforts, but I was wrong. There’s a ton of fantastic content on the App Store (and some crappy stuff.) Each unique little App I get makes my iPhone that much more delightful — and I haven’t even downloaded any of the non-free apps (although there are a few I’ve got my eye on.) Here are a few of my favourites:
- WordPress is great. Buggy, and low on features, but a solid first release. I love that I can blog pictures from my phone now!
- Remote is SO cool. I can’t wait until some more AppleTV 2.1 hacks are done, so that I can upgrade that and control it from my phone!
- The Google app has some very neat interaction with Location Services.
- Singing that song you can’t think of the name to on your iPhone and having Midomi find it for you is really cool.
- LifeChurch’s YouVersion Bible contains not only multiple versions of the Bible, but it lets you see other people’s thoughts on different verses and makes for a pretty neat experience.
- And Bubbles and PhoneSaber keep our 1.5 year old son entertained for minutes! That’s pretty amazing, given his attention span.
I really think Apple has something here. Its always been obvious that the iPhone would revolutionize handsets, and even push stubborn carriers into the future a little bit (visit ruinediphone.com to see how the backlash forced even Rogers to grow up a bit). But this application delivery model is very solid, despite the iPhone’s flaws, and I think RIM and Microsoft (never mind Palm) will be hard pressed to follow suit.
Jul
22
2008
As a follow up to my previous post, here’s how to do the same thing, but from a web browser (say, on your iPhone) — it assumes you’ve already written a shell script, as discussed earlier.
- Configure Apache to run PHP on your Mac (these instructions are for Leopard, but similar ones are out there for Tiger)
- Configure Apache to run as your own user, instead of the WWW user — a serious security risk. Only do this on an internal network! The WWW user won’t have adequate permissions to do what we need to.
- Put this .php page in your /Library/WebServer/Documents/ folder as RestartMedia.php — you’ll need to supply your own image file in the same path as well.
- Visit http://yourcomputer.local/RestartMedia.php from a browser. Clicking on the text or image will execute a shell script located at: /Applications/Automation/RebootMediaServers.sh
Obviously you can customize this at will, including file locations. This was just a quick hack that does the job for me — and the webpage is optimized for Mobile Safari.
Jun
27
2008
Going back to the beginning, and learning Project Builder, Interface Builder and ObjectiveC on NextStep. Can you believe this is the technology that NeXT had the same year Windows 3.1 came out? And its the same stuff that’s used to build Mac and iPhone apps today…

Click for a bigger picture.
In fact, the technology is so close that I used a tutorial for developing a sample Mac app, to develop a sample NextStep app. The notion of “FAT Binaries” that work on multiple hardware architectures came from NeXT as well, since it ran on any number of platforms by the end.
Apr
15
2008
There’s lots of different solutions on the net. I had to collect them all before I could get rid of my problems, which were:
- Error: Package Download Failed
- Error: Main Script Execution Failed
Both seemed to be the end result of corrupt permissions. I used ZiPhone to Jailbreak a clean 1.1.4 install and was disappointed when I hit them. Here’s what I had to do to fix them:
- SSH into your iPhone using Terminal, or Putty on Windows
- You’ll need to login as root with the password alpine
- Type: cd /
- Type: cd Applications/
- Type: chmod 755 Installer.app/Installer
- Type: chmod u+s Installer.app/Installer
- Type: chown -R root:wheel Installer.app
- Reboot your iPhone just to be sure.
- Launch Installer.app and immediately install Community Sources.
- When its done it will want to update Community Sources. Do this.
Everything should work as normal. Note that I think the two chmod commands do the same thing, but I’m not that sure on my command line stuff, and it doesn’t hurt to do them both. Hope this helps someone else!
Jan
31
2008
If you use GMail, or Google Apps for Your Domain on your iPhone, you’ve probably noticed an odd folder structure, with most of your folders being found under [Gmail]. This looks ugly, and it turns out, is easy to fix:
- In your “Advanced” Mail account settings, set the IMAP Path Prefix to “[Gmail]/”
- (The trailing / is added automatically)
Now your folders will look flatter and much prettier. This works in Mail.app on your desktop Mac too! And don’t worry — it’ll still be able to find the Inbox on its own.
Oct
16
2007
So today a pretty stable-looking version iNdependance was released and it was finally time for me to get some 1.1.1 action going. I couldn’t live without my hacks (NES on the run is just too much fun, and VNSea lets me hack at my server without getting off the couch) but there are a few 1.1.1 features that I was interested in… just not enough to make me give up my 3rd party apps.
The instructions that came with iNdependance were quite good, but here’s a few things I would have like to have been told before hand:
- If you’re already running a hacked 1.0.2 and its not unlocked and you’ve got SSH installed, you’re ready to go for the customized upgrade to 1.1.1. I had assumed that I’d have to let iTunes upgrade and then perform the hack — this is not true. The hack requires a hacked 1.0.2 to modify the 1.1.1 install process. Stay where you are and skip ahead to the “special” 1.1.1 install.
- I had bad luck doing the steps through a USB hub. Nothing seemed to be working right until I disconnected the hub (and dock, just to be safe) and connected directly to a USB port on my Mac Mini.
- Summerboard and Customize do not work on 1.1.1. There are a lot of apps that do, but I assume that tools that make assumptions about the file system or Springboard configuration aren’t ready for 1.1.1. This is sad because Summerboard was very pretty. Hopefully Erica gets a new version out soon.
Aside from these caveats, and a much longer jailbreak process, things are essentially like they were for the 1.0.2 hack. I don’t think I’ll use the iTunes WiFi Store, but I’m glad to have quick access to my iPod controls now!
Update: This might just be a fluke, but I found I’ve been unable to create mail accounts on the iPhone. No matter how accurately I know I type my password, it refuses to accept it — for both GMail and a regular POP account. Syncing the mail accounts on from my desktop computer, however, added the accounts to the iPhone, and we’re back to the races…
Update to Update: I found out that this was related to a bug in 1.1.1 — not unique to hacked iPhones. Make sure you turn off caps lock after using it, while entering passwords.
Oct
15
2007
Having to scale and scroll on webpages on your iPhone is annoying. Sometimes its necessary, but very often just a little bit of effort could be put in to make the page iPhone friendly — or to make an iPhone specific version of the page. I’ve previously discussed the WordPress theme, but I have another page that I built that I use frequently, and I wanted to make an iPhone version.
So I spent some time Viewing Source on iPhone web apps that I use, and stole/extracted a few little snippets that can be applied to easily make iPhone pages. For an example of the transformation applied…
You’re welcome to View Source yourself and steal to your heart’s content. A few things that are non-obvious:
- Note the meta tag for viewport where you can control how the iPhone scrolls and scales the page:
- This particular combination prevents all scaling, but gracefully handles a rotate.
<meta name="viewport" content="user-scalable=false; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0" />
- The PHP I use in the main index to detect an iPhone and redirect looks like this:
<?
if (stristr($_SERVER['HTTP_USER_AGENT'], ‘iPhone’)) {
header(”Location: index-iphone.php”);
}
?>
- There’s plenty of great iPhone-like CSS definitions here…
Oct
15
2007
Here’s a hack for ContentRobot’s excellent iPhone Plugin + Theme additions for WordPress that allows the user to decide which version to view. When deploying this theme, I had originally chosen two different roll-out strategies — both modifications of what’s provided by the original code.
For jonandnic.com I made two versions of the website. This seemed like a worthwhile idea at the time, but now that I’ve further hacked the plug-in, I think the approach I used on this site is better.
In short, what I wanted to do was allow the user to choose which version of the site they want to view. The iPhone theme obviously has less features than a full widget/side-bar ready theme, and despite the small screen size, there are times that I want that functionality on my iPhone.
Initially I had a hack in that would ask the users with each page visit. This got annoying, so I improved my hack to include a cookie that saves the preference for an hour. This way they can decide on each visit which version they want to see.
This is a derivative work from the original plug-in, which is provided here, under the GPL.
Update: Here’s another note. Once the user’s made their selection, you can allow them to change their preference by adding the following code somewhere in your iPhone theme code. I added it to the Footer…
<p>View <a href="<?php bloginfo('siteurl'); ?>?iphone=no">Full Version</a> of this site</p>