Getting around developer pain at iPhoneDevCamp

Dori Smith, long time Apple advocate and JavaScript expert, responds to my post last night about Apple’s absence at the iPhoneDevCamp that I’m attending. Funny enough I’m not allowed to tell you whether or not I’ve met any Apple employees here because if there were Apple employees here they aren’t allowed to talk to the press. Since everyone is the press now I guess they aren’t allowed to talk to anyone. Sigh.

Joey DeVilla takes the alternate point of view and says “Scoble’s got a sweet job: he’s the only person outside the Bush Administration who can be wrong a lot of the time and still and reap the rewards from it.” Heheh.

Anyway, there’s a growing theme here on the floor of the iPhoneDevCamp: developer pain.

Here’s an example of the developer pain. You know that the iPhone senses when you turn it, right? If you’re in a browser the browser changes from portrait mode (skinny and tall) to landscape model (fat and short).

Now, the iPhone internally has an API for getting data from the sensor. The browser even knows when you turn it upside down.

The problem? They don’t have an API that you and I can get to. So, we can’t make our Web pages really accurately reconfigure themselves based on whether they are in portrait or landscape mode. In fact, there’s no way for you to tell whether the phone has been turned at all.

Or is there?

A smart dev realized that there’s a hack. I’m not sure who found this first, so sorry for not handing out credit, but Christopher Allen told me about it.

The hack? Well, each time you turn the iPhone it causes the browser to resize. So, all you have to do is watch for a resize event. Then you can sense whether the phone is in landscape or portrait mode.

But, because this is a hack it means you really don’t know which way the phone was turned. Is it upside down? Rightside up? You don’t know.

Now there are some game developers here who would LOVE to know that. If they did, they could make games that work by turning your phone one direction or another.

But they are feeling the pain. They are hitting walls.

Another wall?

The iPhone can’t play sounds while surfing the Web. So, you can’t play sound for people based on Web events. Again, makes making a game very difficult.

Christopher has a whole list of iPhoneDevPain that he’ll get up on the iPhoneWebDev site.

On the other hand, the list of apps is getting longer and people are having a great deal of fun trying various things. One group built an app that if your iPhone gets knocked off of its dock it’ll “moo.” Useless, but fun.

UPDATE: A guy named Phil Collins says he’s going to unsubscribe from my blog if I don’t stop talking about iPhone.

34 thoughts on “Getting around developer pain at iPhoneDevCamp

  1. I think more should be said about the iPhone. If some readers want to stop reading what I feel (My opinion mind you) is a great blog than so be it!

    Maybe someone can create better hacks than DVD Jons’ _lame_ hack “Oh yes, I an duh man . . .uh, you can’t use the phone however….” L33T H4x0R indeed! I get the sense when he crossed the ocean he also jumped a few sharks.

  2. I think more should be said about the iPhone. If some readers want to stop reading what I feel (My opinion mind you) is a great blog than so be it!

    Maybe someone can create better hacks than DVD Jons’ _lame_ hack “Oh yes, I an duh man . . .uh, you can’t use the phone however….” L33T H4x0R indeed! I get the sense when he crossed the ocean he also jumped a few sharks.

  3. Hey, Robert, thanks for the link — and thanks for taking my lovingly-given jab in the spirit it was intended!

    Although I don’t think your long-term prognosis (Microsoft outplaying Apple long-term) is correct, I think you’ve hit upon something important — the fact that Apple doesn’t send someone to “work the crowd” at these indie events. Apple may have created enough Passionate Users that developers are putting together events on their own, but with a little extra effort, they could really put that passion over the top.

  4. Hey, Robert, thanks for the link — and thanks for taking my lovingly-given jab in the spirit it was intended!

    Although I don’t think your long-term prognosis (Microsoft outplaying Apple long-term) is correct, I think you’ve hit upon something important — the fact that Apple doesn’t send someone to “work the crowd” at these indie events. Apple may have created enough Passionate Users that developers are putting together events on their own, but with a little extra effort, they could really put that passion over the top.

  5. I think the resize event is the way the switch between landscape and portrait should be handled. And if width > height, and the browser is an iPhone, you can probably guess which way the phone is turned.

    This is not hacky behavior..

  6. I think the resize event is the way the switch between landscape and portrait should be handled. And if width > height, and the browser is an iPhone, you can probably guess which way the phone is turned.

    This is not hacky behavior..

  7. @DaveD,

    When the iPhone is finally unlocked, which looks like it will happen in the next few days, will you get one and apply the patch? Or pay somebody to do it for you? So you can use it with another carrier?

    Had the openmoko.org phone not come out, I may have done that myself with Rogers or Telus here in Canada.

    If you can restore bogus filesystem images, and slashdot users say you can, it means you can compile whatever software you want against the .so’s on the phone with gcc, and push that fs with your code back to the phone.
    This is however far less attractive than having the actual source code, and being able to modify even the system code. Which is why I will use my limited mobile budget to get a totally open phone rather than the hacked proprietary model.

  8. @DaveD,

    When the iPhone is finally unlocked, which looks like it will happen in the next few days, will you get one and apply the patch? Or pay somebody to do it for you? So you can use it with another carrier?

    Had the openmoko.org phone not come out, I may have done that myself with Rogers or Telus here in Canada.

    If you can restore bogus filesystem images, and slashdot users say you can, it means you can compile whatever software you want against the .so’s on the phone with gcc, and push that fs with your code back to the phone.
    This is however far less attractive than having the actual source code, and being able to modify even the system code. Which is why I will use my limited mobile budget to get a totally open phone rather than the hacked proprietary model.

  9. Okay, Mr. iLinux. Apple and Steve Jobs have no idea of the significance of what they released, but you do?

    Oh, sorry, that is obvioud by how you name your alias. Too bad you don’t choose to go by your real name. Our loss.

    But back on topic – this phone will change the world? Got it. For whom?

    Hey – I own 4 Macs and 4 iPods. Pre-ordered an AppleTV which I love. I’d buy an iPhone but AT&T quality sucks where I live. Hoping that will change by the end of the year with Cellular One becoming part of AT&T.

    But even if I buy an iPhone, I’m not about to say it’s a world changing event. And yes, being an AAPL stock holder for 4 years I’m one who IS benefitting by this device.

    Still can’t agree with that changing the world bit. I had a hard time believing I’d hear from someone more over-the-top that Robert. Seems I was wrong.

  10. Okay, Mr. iLinux. Apple and Steve Jobs have no idea of the significance of what they released, but you do?

    Oh, sorry, that is obvioud by how you name your alias. Too bad you don’t choose to go by your real name. Our loss.

    But back on topic – this phone will change the world? Got it. For whom?

    Hey – I own 4 Macs and 4 iPods. Pre-ordered an AppleTV which I love. I’d buy an iPhone but AT&T quality sucks where I live. Hoping that will change by the end of the year with Cellular One becoming part of AT&T.

    But even if I buy an iPhone, I’m not about to say it’s a world changing event. And yes, being an AAPL stock holder for 4 years I’m one who IS benefitting by this device.

    Still can’t agree with that changing the world bit. I had a hard time believing I’d hear from someone more over-the-top that Robert. Seems I was wrong.

  11. Well, it’s a good idea, but to keep it legal, they would have to do the same thing as the PSP sharing.

    There would have to be a tool that takes the bought and paid for crypted filesystem image, decrypts it, then patches it and re-encrypts it with the 3rd party binaries.
    That way you are ONLY selling your software and not the Apple Inc software. Essentially it would patch the software you bought, and thus be fine to sell.

    I think that the same thing that happened to the PSP will also happen to this device. Except far worse, because it has the phone in it.

  12. Well, it’s a good idea, but to keep it legal, they would have to do the same thing as the PSP sharing.

    There would have to be a tool that takes the bought and paid for crypted filesystem image, decrypts it, then patches it and re-encrypts it with the 3rd party binaries.
    That way you are ONLY selling your software and not the Apple Inc software. Essentially it would patch the software you bought, and thus be fine to sell.

    I think that the same thing that happened to the PSP will also happen to this device. Except far worse, because it has the phone in it.

  13. …that’s exactly what I’m talking about. This wave has yet to crest. Perfect storm.

  14. …that’s exactly what I’m talking about. This wave has yet to crest. Perfect storm.

  15. http://it.slashdot.org/comments.pl?sid=246663&cid=19776665

    I just saw this. The iPhone does not require signed binaries.

    That means that you can literally roll up your own restore image, and zap it back to the phone with YOUR OWN SOFTWARE!!!
    Of course compiling it against the binary file system from the existing iPhone filesystem snapshot.

    That means that you probably could use the gyroscope API directly, by using an API inspection tool in for the shared object files.

    If you can restore bogus images that you rolled up, the sky is really the limit as now software developers can roll up all sorts of iPhone alternative software, and not be limited to developing for the phone from the web.

    Non-signed binaries and having the crypt pass on the image means that cottage industries will pop up that sell rolled up iPhone file system images on the internet for cash with paypal. I think that is a great thing.

  16. http://it.slashdot.org/comments.pl?sid=246663&cid=19776665

    I just saw this. The iPhone does not require signed binaries.

    That means that you can literally roll up your own restore image, and zap it back to the phone with YOUR OWN SOFTWARE!!!
    Of course compiling it against the binary file system from the existing iPhone filesystem snapshot.

    That means that you probably could use the gyroscope API directly, by using an API inspection tool in for the shared object files.

    If you can restore bogus images that you rolled up, the sky is really the limit as now software developers can roll up all sorts of iPhone alternative software, and not be limited to developing for the phone from the web.

    Non-signed binaries and having the crypt pass on the image means that cottage industries will pop up that sell rolled up iPhone file system images on the internet for cash with paypal. I think that is a great thing.

  17. Keep up the good work on the iPhone development reports. Most have no clue how significant this is, not even Apple/Jobs. Interesting and unpredictable things begin to happen when technologies converge. Even more interesting is when many have no idea precisely what it is that is converging, not even the hacks or phreaks. The elements that the iPhone has combined will change the world for the good…and the bad, new industries will spawn, new innovations based on combinatorial approaches, new forms of software/hardware security. People will begin to use devices like this in ways no one could have predicted. Some of the key elements being combined are: BSD Unix(OS X), the Web/Internet, extremely intuitive interfaces, widgets, Mobiles in the hands of the masses including the highly influential. Many should think more deeply about these elements and the resulting effects of their fussion. Exciting times ahead!

    References:
    http://iphone.fiveforty.net/wiki/index.php/Main_Page
    http://www.anderson-technologies.com/archives/5
    http://ajaxian.com/archives/iphone-native-looking-skin

  18. Keep up the good work on the iPhone development reports. Most have no clue how significant this is, not even Apple/Jobs. Interesting and unpredictable things begin to happen when technologies converge. Even more interesting is when many have no idea precisely what it is that is converging, not even the hacks or phreaks. The elements that the iPhone has combined will change the world for the good…and the bad, new industries will spawn, new innovations based on combinatorial approaches, new forms of software/hardware security. People will begin to use devices like this in ways no one could have predicted. Some of the key elements being combined are: BSD Unix(OS X), the Web/Internet, extremely intuitive interfaces, widgets, Mobiles in the hands of the masses including the highly influential. Many should think more deeply about these elements and the resulting effects of their fussion. Exciting times ahead!

    References:
    http://iphone.fiveforty.net/wiki/index.php/Main_Page
    http://www.anderson-technologies.com/archives/5
    http://ajaxian.com/archives/iphone-native-looking-skin

  19. I hope as more people post about the painful lack of development support, Apple will remember past mistakes. An open and robust API is one of the few things that will keep the iPhone from being a truly great device.

  20. I hope as more people post about the painful lack of development support, Apple will remember past mistakes. An open and robust API is one of the few things that will keep the iPhone from being a truly great device.

  21. The iPhone is turning out to be a marketing wonder for 3rd party unrelated applications. I wouldn’t really call a browser in a mobile device a platform, because it’s commonly been around for 3-4 years now.

    But it is considered that simply for the marketing value.

    http://developer.apple.com/iphone/designingcontent.html
    “Know What Safari Supports on iPhone”
    “JavaScript execution is limited to 5 seconds for each top-level entry point.”

    So that would pretty much make any AJAX based game impossible. Now with that said, you can’t display a flash game vertically. So handling a Javascript onsize event is pretty pointless. You could still do it in DHTML, but you still would have a super hard time displaying the graphics vertically.

    Flash to this day is still listed as an unsupported technology on that official Apple page.

    Here is a related article about how they did in fact get a shell on the iPhone from slashdot.(soon API access)
    http://it.slashdot.org/it/07/07/07/0249211.shtml
    Couple that with the fact that they already broke the user and root passwords the other day by pulling out the flash drive and plugging it into a computer to read out the unix /etc/shadow file, then brute forced it. They will have the sucker unlocked from AT&T in no less than a week or so. Unless they locked it on a chip. $$$

  22. The iPhone is turning out to be a marketing wonder for 3rd party unrelated applications. I wouldn’t really call a browser in a mobile device a platform, because it’s commonly been around for 3-4 years now.

    But it is considered that simply for the marketing value.

    http://developer.apple.com/iphone/designingcontent.html
    “Know What Safari Supports on iPhone”
    “JavaScript execution is limited to 5 seconds for each top-level entry point.”

    So that would pretty much make any AJAX based game impossible. Now with that said, you can’t display a flash game vertically. So handling a Javascript onsize event is pretty pointless. You could still do it in DHTML, but you still would have a super hard time displaying the graphics vertically.

    Flash to this day is still listed as an unsupported technology on that official Apple page.

    Here is a related article about how they did in fact get a shell on the iPhone from slashdot.(soon API access)
    http://it.slashdot.org/it/07/07/07/0249211.shtml
    Couple that with the fact that they already broke the user and root passwords the other day by pulling out the flash drive and plugging it into a computer to read out the unix /etc/shadow file, then brute forced it. They will have the sucker unlocked from AT&T in no less than a week or so. Unless they locked it on a chip. $$$

  23. The iPhone is a bit tired now. It’s the current way overpriced darling gadget of the moment.

    Let’s say these hackers manage to make the iPhone “usable” much like adding little bits of code to Firefox. It’s still fairly useless for a lot of stuff out of the box.

    Apple should have allowed any provided to support the iPhone. They could have multiplied their sales a million times over. Besides, look at AT&T. They are purely reprehensible after cooperating with the NSA to spy on Americans.

    Lastly, the iPhone is not an open platform. If I can’t access the APIs then to me it’s useless. The world needs more open standards and less proprietary nonsense.

  24. The iPhone is a bit tired now. It’s the current way overpriced darling gadget of the moment.

    Let’s say these hackers manage to make the iPhone “usable” much like adding little bits of code to Firefox. It’s still fairly useless for a lot of stuff out of the box.

    Apple should have allowed any provided to support the iPhone. They could have multiplied their sales a million times over. Besides, look at AT&T. They are purely reprehensible after cooperating with the NSA to spy on Americans.

    Lastly, the iPhone is not an open platform. If I can’t access the APIs then to me it’s useless. The world needs more open standards and less proprietary nonsense.

  25. It’s self inflicted pain…it’s only been one week since launch…and they all knew they couldn’t get at the fancy stuff. Geeeeez.
    I guess the good side is a bunch of geeks got out. I looked at the pics, there’s some people in serious need of sunlight there. ;-)

  26. It’s self inflicted pain…it’s only been one week since launch…and they all knew they couldn’t get at the fancy stuff. Geeeeez.
    I guess the good side is a bunch of geeks got out. I looked at the pics, there’s some people in serious need of sunlight there. ;-)

Comments are closed.