Developing for a jailbroken iPhone, A to Z (iPhone 3.0)

30rockin
Rockin 3.0

UPDATE: NEWGUIDE NEWGUIDE NEWGUIDE!

Vital iPhone stats for this post:
iPhone version: 3G (should work with 2G and 3GS)
iPhone OS version: 3.0 (rock the hizzouse!)
Jailbreak status: Jailbroken using Pwnage Tool.

The Goal: Get live on-device XCode debugging without being a paying ADC member. This time OS 3.0 style.

Abstract: Same deal as last round. We want to break code signing on the iPhone, and then we want to make Xcode load software into it automatically to debug. In SDK 2.2 (Xcode version 3.1.2) this was just a simple matter of editing some Plists and such to tell Xcode to ignore provisioning profiles. SDK 3.0 (Xcode version 3.1.3) broke these Plist editing tricks. For a while, all you could do was try to hack SDK 3.0 support into Xcode 3.1.2, installed with SDK 2.2. That was really very hairy, though, if you didn’t want to have to switch environments to debug (close and restart Xcode). It was also annoying to configure. Luckily, there’s a new, much less ghetto way. It’s all based on a little hack posted by <zim> in this thread (coral). Essentially, it just replaces a few bits in the Xcode plugin that actually handles the device build, which restores our build and go ability.

Procedure: things marked (2.2 STEP) will already be done if you followed my previous procedure, and you may not need to repeat them.

  1. Jailbreak your phone. In Cydia, add the source http://iphone.org.hk/apt/. Install the package “Installd Patch” (this used to be Mobileinstallation Patch, just a name change in OS 3.0). Thanks go to @javacom for this lovely little hack, and lots of other wonderful info on his blog. Seriously, if you’re reading this right now, you should be following him. UPDATE 8/3/09: Some are reporting that if you’re on OS 3.0.1 or possibly a 3GS (or both) Installd Patch may or may not actually install. If this is the case, or if you get weird message about your identity being no longer valid, try installing AppSync as a stand-in.
  2. (2.2 STEP) You will need a signing identity. We’ll break the check such that it doesn’t have to be an official ADC one, so you can make your own using this guide from apple (coral). What you are doing in this step is creating a “Self-Signing Identity.” Note that you should name the identity “iPhone Developer” EXACTLY to avoid having to change a bunch of the steps below.
  3. (2.2 STEP) Open your project and go to (menu) Project > Edit Project Settings. In the list of properties, find “Code Signing Identity” > “Any iPhone OS Device” and click in the empty box. Assuming there are no entries in the menu, click “Other” and type in the same name you used to generate the code signing certificate above in step (2). For example: in step 2, I used the name “iPhone Developer” and that is exactly what I put in this field. Hit OK and close that settings window. This setting should persist in future projects, and you shouldn’t have to do this again.

Add the special 3.0 sauce:

  1. Open a terminal.
  2. type cd ~/Desktop (enter)
  3. type vi script (enter)
  4. tap i on your keyboard (to enter “insert” mode in vi).
  5. Copy/Paste (cmd-v) the following code into your terminal window:
    #!/bin/bash
    cd /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneOS\ Build\ System\ Support.xcplugin/Contents/MacOS/
    dd if=iPhoneOS\ Build\ System\ Support of=working bs=500 count=255
    printf "\x8f\x2a\x00\x00" >> working
    dd if=iPhoneOS\ Build\ System\ Support of=working bs=1 skip=127504 seek=127504
    /bin/mv -n iPhoneOS\ Build\ System\ Support iPhoneOS\ Build\ System\ Support.original
    /bin/mv working iPhoneOS\ Build\ System\ Support
    chmod a+x iPhoneOS\ Build\ System\ Support
  6. type ESC, then : x (colon,x) (enter). This saves and exits in vi.
  7. type chmod 777 script (enter)
  8. type ./script (enter) This will execute the script to patch the Xcode plugin. Assuming it completes correctly, you should be good to go, try it out!

If it executed correctly, you should see something like this:

alex-whittemores-computer:Desktop alex$ ./script
255+0 records in
255+0 records out
127500 bytes transferred in 0.035658 secs (3575647 bytes/sec)
191056+0 records in
191056+0 records out
191056 bytes transferred in 1.782819 secs (107165 bytes/sec)

And the final step (added 7/18/09, fixes the issue where debugging failed on 3.0 and where the binary would fail to launch on 2.2.1): Codesign the binary before it hits the phone (this got patched out in the new Xcode method above). In terminal:

  1. mkdir /Developer/iphoneentitlements30
  2. cd /Developer/iphoneentitlements30
  3. curl -O http://www.alexwhittemore.com/iphone/gen_entitlements.txt
  4. mv gen_entitlements.txt gen_entitlements.py
  5. chmod 777 gen_entitlements.py

Add the build phase: in Xcode, select the menu options “Project > New Build Phase > New Run Script Build Phase”, and enter the following script:

export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
if [ "${PLATFORM_NAME}" == "iphoneos" ]; then
    /Developer/iphoneentitlements30/gen_entitlements.py "my.company.${PROJECT_NAME}" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent";
    codesign -f -s "iPhone developer" --resource-rules "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/ResourceRules.plist" \
         --entitlements "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent"  "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/"
fi

NOTE: You will have to repeat this step for every project! (That is, the add build phase part, not the terminal part.) It’s a bummer, but I’m not sure there’s any way around it. I’ll try to figure out if you can persist custom build phases across projects.

Note: You may notice that a number of the steps you remembered from last time are gone now. I believe the few-byte hack above takes care of all the steps. As far as I know, there’s no need to even modify your projects with that one Plist key, everything just works. I currently have this setup working on my production machine, but just to be sure, I’m going to boot up my external disk and I’m going to test this procedure start to finish. As usual, don’t hesitate to comment if you have questions or run into trouble, and I’ll do my best to help.

Special thanks regarding the last step to zim at iPhone Dev SDK forums and to Sylvain Munaut, whose script gen_entitlements.py is used above.

274 Comments

  1. July 12, 2009

    Thanks a lot! 🙂

    Can I copy your post in my blog?

  2. AJ
    July 12, 2009

    Great tutorial, thank you so much. I got a bit stuck at the part where you have to save the vi. I didn’t realise you had to press [esc] to exit insert mode before you can save it. Otherwise, thanks for the really easy tutorial!

  3. Graham
    July 12, 2009

    What I want to know is, what do I need to do to my G3 to get it to run on China Mobile, and then can I undo that so ATT/Apple are none the wiser when I’m in Boston this fall? All this stuff has me good and confused.

  4. Graham
    July 12, 2009

    Uh, 3G. G3 was my lovely black laptop that still gets used in a pinch in Colorado.

  5. July 12, 2009

    Mojtaba: Sure, just cite it and link back.
    AJ: True, I thought I was forgetting something :). I’ll add it in.
    Graham: You need to jailbreak your phone, then install a program called “ultrasn0w” which is a software carrier unlock enabling any sim card and therefore any carrier. You probably will then need to apply some settings specific to CM that make everything run smoothly, but CM is big so those probably exist as an installable package too.

    In terms of it still running in Boston, it will, no problem. In terms of ATT/Apple being none the wiser, ATT won’t have any way to know, and Apple will only know if you try to bring it in for service. They typically don’t care, though: if you bring in a jailbroken iPhone, the first thing they do is restore it to the stock, non-jailbroken firmware.

    Most of that’s out of the scope of this article, but there are plenty of people who are still confused about it, so I’ll probably write an article. In the mean time, if you want, gchat me. You have my email address, right? Facebook also works.

  6. CalveYard
    July 12, 2009

    Hi,
    Thanks a lot for the steps. And can i use my latest Xcode 3.1.3 and 2G 3.0 iPhone to try installing my sample app onto device using the steps mentioned above first 3 steps and then steps for ‘special 3.0 sauce’? These steps are safe right?
    What will happen after step ‘8. type ./script (enter) This will execute the script to patch the Xcode plugin. Assuming it completes correctly, you should be good to go, try it out!’ ?

    Do i need to run ‘Build & Go’ in Xcode after 8th step?

    Could you please confirm it so that i’ll start trying this immediately..

    Thank you again.

  7. July 12, 2009

    Yep. After step 8, everything is all set for you to go ahead and start using Xcode normally. After step 8, selecting the “Device – 3.0 SDK” in Xcode and clicking “Build and go” will compile your app and run/debug it ON the device, as is the normal behavior of Xcode if you are a registered paying developer with a code signing certificate.

    To clarify, you don’t NEED to run Build and go to complete the hack, but it is kind of the point of the hack.

  8. CalveYard
    July 13, 2009

    Hi,

    Thank you so much for providing such a wonderful steps. It has worked for me.
    I have one question. I am able to install my sample application in one of my 2G iPhone 3.0 device, can i also try installing the same app into my another 3G iPhone 3.0 device with the same certificate? Will that work? Otherwise, what should i do in this case, do i need to create another certificate(from apple Guide) for second device and follow the same steps?

    Thank you.

  9. July 13, 2009

    I can say for sure that any of your OS 3.0 devices will work the same way. That is, your 2G iPhone with 3.0 should behave the same way as your 3.0 3G or 3.0 3GS. What I’m NOT positive about is whether or not the method still applies to devices running 2.2.1. I’m relatively sure it does, but I will test this afternoon to be positive.

  10. July 13, 2009

    Hey Alex,

    This is an awesome find and discovery! 🙂 I’m glad that I came across this, and managed to get it to work. I have a question tho(I’m an xcode n00b). Is it possible to step thru codes from the IDE via remote debugging with this method?

    I did the following, and yet it didn’t stop at breakpoint :
    – set breakpoints first (dark blue)
    – set active configuration to ‘Device – 3.0 | Debug’
    – Build and Debug

  11. July 13, 2009

    Hi,
    I don’t get step 2…
    I made a Certificate…
    with Create Certificate
    Name: Nico
    Type: Self Signed tpe
    Let me override defaults == true
    9 times enter without any changes at all !

    after that I changed the project settings
    Any IPhone OS Device to ” Nico ” …

    is it ok ?
    or what I have to do ?!

    Phone is already jailbraked and I’ve done AppSync 3.0 to make the Mobileinstallation patch
    but I get the same error ” No provisioned iPhone OS device is connected. ”
    could someone please help me ?! thx

  12. jSmith
    July 13, 2009

    I followed the above steps and they seem to have worked quite well! Build and Go (Run) works great. My apps install and run on the iPhone without any problems. However, I cannot seem to get on-device debugging to work (Build and Debug). I can debug in the iPhone Simulator just fine but, it would be very helpful to be able to debug on the iPhone itself. Are there additional steps that need to be taken?

    Thank you very much for posting this!

  13. July 13, 2009

    Nico: open Window>organizer and tell me if your iPhone shows up in the list to the left. If not, try rebooting Xcode and see if it does then.

    jSmith and Perry Loh: I can verify that, for some reason, actual debugging doesn’t seem to work on-device. The error I’m getting in console around the failure to recognize the breakpoint is:

    Ignoring packet error, continuing…

    I get that about 3 times then it spews a bunch of garbage and generally just doesn’t work.

    In what I think is a related bug, I can’t get the build phase to even start the app on an OS 2.2.1 device. The app simply won’t launch on the phone until I sign it with ldid. I tried adding a build phase to xcode to sign the binary with ldid on the mac prior to loading it, but that doesn’t seem to work (maybe I messed up the build phase).

    At any rate, lots of things are, indeed, messed up, and I’m looking into them. If anyone else can offer some insight, I’d love to hear it, I’m not actually THAT experienced with most of this and I’m sort of stumbling blindly.

  14. July 14, 2009

    Jesus Christ it’s working…. thx mate !

  15. Robert
    July 14, 2009

    Thanks a lot everybody who was involved!

  16. Wardio
    July 14, 2009

    Managed to get app to install and run on ipod touch, but as others have found, i can’t get on device debugging to work, never seems to hit my breakpoints and is spewing the same error messages as people have reported…

    Anyone had any joy getting this to work?

  17. CalveYard
    July 16, 2009

    <I can say for sure that any of your OS 3.0 devices will work the same <way. That is, your 2G iPhone with 3.0 should behave the same way as <your 3.0 3G or 3.0 3GS. What I’m NOT positive about is whether or not <the method still applies to devices running 2.2.1. I’m relatively sure <it does, but I will test this afternoon to be positive.

    Thanks Alex. I tried installing on my 2.2 iPhone device with the same steps applied, but couldn't be able to work(install).

  18. Dagwood
    July 16, 2009

    Hi Alex,

    Great post!

    Followed all of your steps with the patch and the “vi”. I have a jaibreak phone 3G 3.0 but in “xcode”
    I get The version of iPhone OS on “your iphone” does not match any of the versions of iPhone OS supported for development with this copy of Xcode. Please restore the device to a version of the OS listed below. If necessary, the latest version of Xcode is…..

    Is there a jaibreak version with the development version or have I missed something critical in the process that I needed to do?

  19. July 16, 2009

    Did you make sure to actually update to the current version of the SDK? Open Xcode and look in About, it should be version 3.1.3. I can’t imagine you missed it, because I suspect the patch doesn’t work for version 3.1.2, but if you did, that’s the message you’d get.

  20. July 16, 2009

    CalveYard, sorry, for some reason Akismet got your comment. I’ve been having this same problem trying to test on my 2.2.1 iPod Touch, and I’m trying to figure out what’s up. Stay tuned.

  21. Rich
    July 17, 2009

    The script compiles and runs, but I get the following output:

    richmac-2:Desktop rich$ ./script
    0+0 records in
    0+0 records out
    0 bytes transferred in 0.000019 secs (0 bytes/sec)

    Have I missed something?

  22. Nigel
    July 17, 2009

    Thanks, works great.

  23. Rich
    July 17, 2009

    Rather than run the code as a scripte, copying and pasting straight into a terminal seemed to do the trick!

    Cheers.

  24. July 17, 2009

    Huh, glad you got it to work, Rich! I realized that the #! /bin/bash line might have gotten lost since it was on a line with non-code text, so I bumped it down in case that was the problem.

    All others, don’t worry, I’m still trying to figure out the issues. We’ll see what the forthcoming 3.1 release holds.

  25. mars
    July 17, 2009

    I followed the steps in this article on my mba xcode 3.1.3 and iphone 3g with 3.0. Unsuccessful. I still get the non provisioned device error in xcode when building for iphone 3.0 debug rather than simulator. please help!

  26. July 17, 2009

    Did you restart the computer and the phone? Sometimes that can be the difference.

  27. Falk
    July 17, 2009

    Thanx Alex, gr8t work. One more question. I have another question, which is actually pretty simple (but I haven´t found an answer anywhere else).

    I managed to build my App, but I do not want to add it to a device subsequently, but rather create an .ipa file, which I can send to testers to install them on their jailbroken phones. Is it enough to zip the executable.app and change the file extension to .ipa or do I need to consider something else?

  28. July 17, 2009

    Falk, the .ipa has a filestructure of its own. It IS just a zip file of this filestructure, but what I don’t know is exactly how the internals work. Try unzipping an app you already have (drag/drop it out of iTunes onto your desktop, it’ll only copy, not move, then rename to .zip and unzip), then try replacing the .app in the Payload directory and rezipping. I have a feeling it’ll have the same artwork as the app you unzipped (you never replaced the itunesartwork file) but it may work to distribute your own app. What I’m not sure of is what that .bin does. It may be a hash of the payload, preventing this idea from flying. It may be that you can just delete it, try it.

    What’s guaranteed is that your target device (your tester’s) will have to be jailbroken and have Installd Patch installed. Or you can manually fakesign your binary with ldid on the phone, then transfer it back off, as is done for cydia distribution, but that’s a different article.

    Let me know what you find.

  29. efes
    July 17, 2009

    Hi, i already have a developer account and i want to use my own codesigning Also i want my phone jailbroken. Can i apply your procedure by not doing the step 2 or what should i do?
    Thanks

  30. mars
    July 17, 2009

    Alex, let me review what ive done. I downloaded and installed installd patch from the iphone.org.hk source. then i created my certificate and added it in project settings to my helloworld project. created the script in vi, made the chmod and the results ran pretty identical to what you have online. then i clicked build n go and got the compilation error saying com.yourcompany.company not provisioned. i just rebooted machine and iphone, ran it without the iphone connected and i got users/youruser/bin/gen_entitlements.py no such file or directory…

  31. July 17, 2009

    efes: I was actually considering going down that same road since soon enough I’ll have some apps I want to release officially. I’m not EXACTLY sure how to go about it, but I think that you can sign up and just follow all of apple’s standard procedures for provisioning your device(s). That involves going online to get a code signing identity, generating a provisioning profile, and so on. I don’t believe that any on device jailbreaking should prevent that from working. However, the Xcode hack in this article is relatively ghetto – it has a lot of bugs for some reason, and I’m not sure how well it’ll play with an official provisioning profile (since it doesn’t even play that well without one yet). My suggestion would be to NOT patch Xcode yet, and to try following Apple’s direction but on your jailbroken device. The good thing is that the Xcode patch is always reversable – if it messes you up, reinstall the SDK.

    Falk: Thanks for the link, I’ll check it out and wait for an update from you. There’s actually a link that may contain information you want cited as a source in a post I’ve already written. I just haven’t published it yet because of all of the bugs still plaguing this post. I wanted to sort this out before I began offering support for the new post. That said, I may just post it anyway, because it’s relevant on its own and I’m not sure when I’ll be able to figure this all out (although it’s nearly the weekend, hope is on the horizon [literally]!). <- I have to take pride in those properly-balanced perens. Sorry. Moving on. Mars: Have you tried to break Xcode before? For the 2.2 SDK, there was a method where you added a build phase to the Xcode build process that would use that script (which you had to download from a website whose location I forget) to generate falsified entitlements for the device. It was no longer necessary as of the latest method for 2.2, and is not a current step in this SDK 3.0 method, but you may have hangover from a prior attempt to get this going on 2.2. My suggestion is, if you don't remember where you found that tip, and you don't know how to retrace your steps to remove it as a build phase, fully uninstalling the SDK and reinstalling from the fresh 3.0 download should do the trick. Let me know how it goes.

  32. mars
    July 17, 2009

    yes i remember doing that…so i would just need to go back to the build menu and remove that script?

  33. efes
    July 17, 2009

    Alex: thanks for the reply,

    I have a new question then a point is not clear in my mind. Correct me if i am wrong, in order to jailbreak my phone i need to restore it with modified os software on the other hand to install my provisioning profile i need to restore my phone by using xcode. So how is it going to be both jailbroken and provisioned? i used ripdevs installerApp to jailbreak (which does not require restore) for earlier versions but they are not supporting 3.0 yet

    thanks

  34. July 17, 2009

    Mars: Yes, if you can, that should do the trick.

    efes: Ahh, you do raise an interesting point. I have never provisioned my devices, so I didn’t realize that you had to do a full restore with a provisioned image. So as I see it, you have two potential options, assuming both work: 1. provision your device, use quickpwn. I don’t think that quickpwn works with 3.0, and I’m not sure what the install mechanism of redsn0w or purplera1n are (besides, I think purplera1n is 3G S only. 2. make a provisioned image, save it out to a .ipsw like you would download and restore in iTunes (can you do this?) then use pwnage tool on THAT provisioned image. Assuming you can do them, either should work. Those are just ideas, though.

    mars again: That’s the site I remember. I don’t think I’ve ever figured out how to undo adding a new build phase, but I’ve also never really tried. I can look into it later (probably tomorrow, I won’t be home for another few hours, long commute), or if you don’t want to wait (I know I wouldn’t) you can try uninstalling/reinstalling, which should give you a fully fresh platform.

  35. Bear
    July 17, 2009

    When i am enter the command chmod 777 script

    i am getting an error “No such file and directory ” Why ???????????????????

  36. mars
    July 17, 2009

    bear, this is alexs blog but, does the script file appear in the desktop after you run the first part of the script and hit colon x?

  37. mars
    July 17, 2009

    alex, i found how to delete the scripts, open the targets group, delete the run scripts folders in my apps. i build and go and told me no provisioned iphone was connected. because my iphone wasnt connected. i iwas gonna connect it when i remembered i read the iphone used to develop was rendered useless as a mobile phone, and i cant do that to my actual unit, i need it. but i want to make sure thats not pure hype against jailbreaking the iphone and getting you to pay dev portal fee? have you done this?

  38. July 17, 2009

    mars: You say that like you expect me to MIND you helping the other commenters :P. Good to know about deleting scripts though. And yes, I’ve never heard that hype myself, but I can tell you for certain that this method doesn’t affect the vitality of the device as either an iPod or a phone (depending on which hardware you use). I can’t speak to ACTUALLY provisioning a device the official way – perhaps that DOES cause some headaches with normal use, but I’d be willing to bet that that’s not true either. To be very specific, I’ve tried this with both my devices (iPhone 3G and iPod Touch 1G) on both OS 3.0 and 2.2, and both work fine as a phone/ipod still – they’re my personal devices, I don’t use them exclusively for development.

  39. Mars
    July 18, 2009

    Alex, I’ll try uploading today then and let you know it goes. Thx! Btw, have you anything about the next iPhone because I was thinking of getting a 3gs but I think I’ll save my monies for a more substantial upgrade to the device since I wasn’t really impressed with the changes made this time. The only changes I felt important were the voice control for dialing even phone numbers. Other than that I would wanna see a better camera, with flash, real Bluetooth capability, faster OS…(projectable keyboard and screen 🙂 hahahahaha)

  40. July 18, 2009

    Mars: The new 3GS is actually a SIGNIFICANTLY better device than the iPhones to date (or iPod touches). It uses an Arm 11 chipset instead of an Arm 9, which is leaps and bounds better as a processor – not just in speed. The camera IS nicer, it takes good, clean (if not high res) video, and the sounds is nice. I absolutely would have bought it, IF ATT didn’t decide to give me a giant middle finger and charge an extra 200 if you have a 3G. I’m not spending $500 on it, so I’m waiting for the next revision. And you ARE right, there arent many new features. It’s less that the new phone is unbearably wonderful and more that my 3G is unbearably slow.

    Everyone: zim here has a few suggestions that should make full on debugging work with the 3G. I’ll post them once I’ve verified that they work for this setup (they should though). I’ll also try to test them on my 2.2 device and see what I get. They should solve that problem too, but we’ll see.

  41. mars
    July 18, 2009

    yes i know its faster, thats really the only thing that i cant really get on my 3g, pretty much everything else that means much to me i can get via cydia…videorecording, voice control…so what im saying is that i cant play the marketing game. if MS or APPLE put out a new device every year, i cant follow suit and buy or even upgrade, id rather wait for something truly GROUNDBREAKING. Anyway, im at the office now, finally, im about to try the uploading…ill b in touch..HAHAHA GR8! it worked…i just gave me an error from the debugger. error launching remote program:device locked…my iphone locked right about that time, so i know what it is..time to code. let me take this opportunity to ask you about objC/Cocoa. My background experience is in asp/html and thats about it. i started reading up on C once. i understand C is procedural but C++ is OOP like objC? or is it still procedural? my point being, if you were gonna study a language for the future, would you opt for objC over c++?

  42. July 18, 2009

    Your understanding is correct: C is procedural, but C++ and Objective-C are both object oriented. I don’t have a ton of experience with C++, but I use both C (for programing Arduino) and Obj-C (for iPhone) all the time, along with lots of other languages for personal, work, and school reasons. In terms of which of those two choices I’d opt to learn, I’d pick Obj-C, but there are lots of important reasons: first, lots more things use C++ than use Obj-C. In fact, Apple is the only platform that I know of off the top of my head that uses Obj-C heavily. You can program other things in Obj-C, it’s not like it’s off limits, it’s just that nobody really does. So off the bat, C++ is more useful in the world. The important caveat to this is that, of course, C++ isn’t more useful in MY world – I’ve never had to use it, while, on the other hand, I use Obj-C all the time to code for iPhone, so I learned Obj-C instead, that’s that.

    Second, I find that, while the syntax of Obj-C is totally different from that of C# is totally different from that of C++, getting used to new syntax is significantly less of a hurdle than getting used to object orientation. I liken it to cars – a pickup truck is a VERY different animal from, say a Lambo, just like Obj-C is VERY different from Matlab’s M (another OOP language I use heavily at work and school). That said, (in the US anyway) once you have a class C driver’s license, you can drive either, and the individual vehical just takes a bit of getting used to. (In this analogy, C is kind of like a bicycle or Vespa – it’ll get you there, and you even have more maneuverability, but damned if it won’t take you a while).

    Does that make sense? I know procedural languages and a range of OO languages from barely OO at all to BLEEDING OO (Obj-C). Once you know one, it’s just a matter of getting used to the others, so do whatever’s most useful for you NOW.

    As an aside, another idea that’s interesting is that, typically in an academic setting, the most useful language is picked as the one to teach students. That used to be C or C++ since those are common and foundational. Now, however, we’re starting to see engineering programs (IE mine at BU) using Matlab since most every engineer uses that in work at some point these days. Comp sci programs use java, because lots and lots of scientists use Java to model things, and some are using Apple’s course in Obj-C, since theres a huge market for it even if it’s used by only one device company.

    Basically, the point is, do what you want, knowing you’ll almost always have to adapt later anyway.

  43. mars
    July 18, 2009

    ok, i understand your point. I dont really need to learn or use either one heavily. since i just wanna mess around with apps on iphone and just changed my dell xps for a macbook air, i opted to dive into objC. but i kinda see that objC and cocoa, (let me see if i can say this the way i think it), are more on the side of open developers like google and MS and c++ are more on the closed private niche side. [although i know ms visual studio is just like xcode for c++ and it has a huge developers commuinty] but for some reason i see google and google related companies [apple in my mind being more akin to co-developing with google than with microsoft] with a better future. i know thats a very subjective statement to make, after all, MS does have the market share and economic prowess apple has really never been able to compete with, but with a company like google breaking ground in many apps and businesses, for some reason, in my mind, i see them [apple and google] being able to do what apple never could and what could have taken google decades to do on its own due to MS’s headstart, which is if not dominate, at least level the field a bit more.

    of course if this were to happen, i guess it would just make it as useful to code in objC as in C++.

    anyway, ill go back to learning to code for my iphone. btw, BU, bringhman young? you are a scientist or engineer? i thought i read somewhere EE, right?

  44. July 18, 2009

    I know what you mean, for sure, although I don’t think it’s a terribly accurate depiction: Plenty of open source and cross-platform projects use C++. I think the underlying idea that you’re getting at is that Obj-C is “cooler,” which I agree with even though there’s very little basis for that 🙂

    And BU = Boston University, EE student, yeah.

  45. July 18, 2009

    New step added! Everything works on both devices now, thanks to zim and Sylvain Munaut. Check out this thread

  46. alex
    July 18, 2009

    Hello!
    I’ve deleted SDK 2.0(sudo /Developer/Library/uninstall-devtools –mode=all)
    Installed SDK 3.0.
    made successfully 8 steps.
    Then added to my project my cert(MyDeveloperCert which I used for SDK2.0) and got error – Code Sign error: no provisioning profile found matching certificate identity ‘MyDeveloperCert’
    I’m not able to compile my project without this error…
    Why? Help me please..

Leave a Reply

Your email address will not be published. Required fields are marked *