Category: Coding

I code in Objective-C, PHP, and hopefully Ruby on Rails soon (workin’ on the last one).

January 11, 2010 / / iPhone
Debugging on device. Freaking finally.
Debugging on device. Freaking finally.

UPDATE: There’s a new method for iOS4 but they’re pretty similar anyway.

So it’s been a while, but now that I’m on break again and have some time, I’m doing a bit of iPhone development again. That means I’m going to need to debug on-device (or at least load my app to it to have fun in the real world with my handiwork). This time, the procedure’s a little different though.

Vital stats:
iPhone OS 3.1.2
Xcode version 3.2.1, 64 bit
Mac OSX 10.6.2 Snow Leopard

Let’s do it.

UPDATE: Corrected a problem with the run script build phase: corrected the directory names for the new version and copied the new phase that doesn’t include “resource_rules.plist.”

UPDATE 2: Somehow I forgot the add an identity step. It’s now #1 below. Sorry guys. Also, while this whole thing should apply to iPhoneOS 4, I’m going to officially text it/repost with 4.01 soon.

May 6, 2009 / / Coding

If you’re beginning to learn Objective-C like I am, things like this aren’t immediately obvious. I was trying to fool around with creating my own class, and I kept getting this warning
warning: no '-blah blah blah' method found along with an accompanying
warning: 'ClassName' may not respond to '-blah blah blah'

The really annoying part was that, despite these warnings, the code still worked just fine. Turns out, my issue was that I had this method in my class implementation (PolygonShape.m):

February 23, 2009 / / Coding
Error Starting Executable: No provisioned iPhone OS device is connected.
Error Starting Executable: No provisioned iPhone OS device is connected.

Ok, lame title, I admit it. That doesn’t change the annoyingness of the error though. Here’s the story: I sit down last night to watch the Oscars and get my feet wet developing for the first time in maybe a month or two. I go to debug an app on the device, you know, to see if I’ve still got it, and lo and behold a big hairy error pops up:

November 29, 2008 / / Coding

So my first iPhone post was pretty detailed, but don’t let that deceive you, I’m not actually experienced developing for iPhone. In fact, I’m not even really experienced developing on Mac using Objective-C either. In fact, that’s sort of the point of this blog, or at least the iPhone category. I’m not a hardened Obj-C developer who’s looking to write tutorials that I think less experienced developers will like. Rather, I’m a beginner in this field who’s looking to guide other beginners by writing my solutions to the problems I’ve encountered. The first problem I encountered was that I couldn’t debug my apps on-device without paying $100 for a code-signing identity that I may never actually take advantage of. As a result, the first post on this blog is how to get around that stumbling block. Moreover, I’ve also found that you are bound to experience the same problem at least a few times, and I’ve also found that, in a field as fast-moving as iPhone development, retracing your steps is a serious problem. This blog is meant to be a guide for me as well as anyone else.

November 28, 2008 / / Coding

Vital iPhone stats for this post:
iPhone OS version: 2.2 UPDATE 7/11/09: OS 3.0 procedure here
Jailbreak status: Jailbroken using Pwnage Tool 2.2, old baseband preserved (see post here, coral cache)

The Goal: Get live on-device XCode debugging without being a paying ADC member.

Abstract: The iPhone uses code-signing to restrict what gets run on the device. Under normal conditions, this means that John-developer signs up with ADC (Apple Developer Connection) and gets, among other credentials, a code signing identity. He downloads a certificate, plugs all the info into XCode, and when he compiles his project for debugging or release, it gets signed with this certificate. When it gets transferred to an iPhone (say, for debugging) or released to the App Store, this signature gets checked to ensure that the code came from a registered, trusted ADC member.

What WE want to do is run our own code, developed in XCode, on our iPhone without this valid certificate from Apple. Part of this process allows code from OTHER non-ADC-signed developers to run on other phones, but that’s not the real point. The goal of THIS tutorial is to make the Build and Go live-on-device debugging work on a jailbroken iPhone without the proper signature, in other words without the need to pay. Note: this does not allow you to develop for the App Store. This is only good if you’re only developing for yourself or you plan to distribute only for jailbroken phones/iTouches.