When is a WebOS “OK”?

So I’ve been wondering for a while now as product announcements get made and the online and press communities react: when is a WebOS a good thing?

Specifically, for instance, when Apple first announced the iPhone, it provided developers with a WebOS based API set for delivering applications to end users, including the ability to run multiple applications at once. This was immediately trashed by just about everyone.

However, when Palm announced they were ditching their traditional c/c++ based OS and replacing it with a WebOS, the same people who trashed Apple for the same decision were gushing over what a brilliant move Palm was making. And they are equally thrilled about Google’s WebOS announcement.

Perhaps it was because Apple didn’t try and come up with a clever marketing term (ie, WebOS) and instead just called it what it was, a development environment based on a Safari. Both Palm and Google are providing exactly the same thing, a traditional OS at the core with a sophisticated web browser as the “operating system” that the end-user and developers are sand-boxed in.

I’m not saying that a WebOS is not a good idea, I thought that Apple’s offering was pretty nice but admit that I wasn’t interested in developing for it until the Obj-c/c/c++ API was announced. By the exact same token, I’m not really interested in developing for the Palm or Google offerings for the same reason; the type of apps I develop are not that interesting from a developer standpoint on WebOS based API’s.

What I’m really wondering is why sometimes the general opinion is that a WebOS is great and other times the same general opinion is that a WebOS is terrible.

Posted in Rants | Tagged , | Leave a comment

Suggestions to correct iTunes / iPhone music sync

Recently I had a coworker who upgraded his iPhone to 3.0 find that he could no longer sync that iPhone with his iTunes music library on a Windows computer. It would, however, sync just fine on a Mac OS X computer. Also, it was correctly syncing other items, such as his app store applications.

Googling turned up a few suggestions that we tried:

  • Turning off the phone
  • Removing all music and re-adding it (ie, remove from iTunes DB, NOT from the hard drive!)
  • Resetting iTunes sync settings (preferences->devices then clear sync history or forget all remotes)

None of these worked, but we did find the answer with a last resort effort.

Solution: Uninstall all Apple software (you probably only needed to uninstall iTunes, but this is what we did) and then re-install iTunes.

This uninstall/reinstall should allow you to again sync an iPhone with your music library.

Posted in Help | Leave a comment

CAContextInvalidLayer and setFence:count

So there I was, up for nearly a day straight and have figured out the certificate issue that was preventing my program from running on my iPhone after upgrading to SDK 3.0 beta 5.

On the device I was getting this error: CAContextInvalidLayer –¬†CALayer already attached to a context while on the simulator I was getting this error: setFence:count: called more than once per transaction. Cryptic messages that googling for solutions found no answers to.

After many hours of investigation and trial and error, I checked out older revisions of my code base (gotta love svn, or any revision control system for that matter!) until I arrived at a build that installed and ran on the device. From there I started doing file by file compares with the next version (which didn’t install) looking for anything that might be the cause.

Finding nothing obvious, I started implementing each change one by one. The difference between the revisions were minor and few in count (as any good checkin should be) so this didn’t take long… and I arrived at a solution!

My application was using several layers to create visual effects. At one point I made a “change that will make no difference”, and so minor I kept ignoring it in my code reviews! However, this code was the cause of all of my issues… but only long after the actual code had been run.

The problem came down to how I created my layers. I had started out very basic, but then thought it would be better to make a copy of the first layer so I could inherit more of it’s properties. However, this code:

targetLayer = [[CALayer layer] initWithLayer:self.layer];

copied too much information and when I later tried to work with the layers I ran into the “already attached” problem. The correct way to create layers for my program (and what I started out with) is:
targetLayer = [CALayer layer];

Reverting that one change in my latest code base let me get back to making progress. Hopefully documenting my error here will save someone else a few minutes or hours if they run into the same issue.

Posted in iOS | Tagged , , , | Leave a comment

Quick fix for TableViewCellSubviews sample project

Symptom

  • The Sample Code for TableViewSuite, example 4 TableViewCellSubviews has an incorrect project setting that prevents running the sample in release.

Problem

  • The problem is due to the TableViewCellSubviews project referencing the application as CustomTableViewCell instead of TableViewCellSubviews.

Solution

  • FIX: edit the .pbxproj file for TableViewCellSubviews, and replace all instances of CustomTableViewCell with TableViewCellSubviews.
Posted in iOS | Tagged , , , | Leave a comment

putpkt: write failed: Broken pipe

Hopefully this will provide some useful information for someone, because I did a lot of google searching and didn’t come up with an answer to this one that way.

After upgrading my sdk from 2.2.1 to 3.0 beta 5 I was no longer able to install my application on the iPhone. The compile, link, build and install process went fine but as soon as the application was launched, and before it got to main(), the app crashed. In the debugger I was getting putpkt: write failed: Broken pipe.

After hours (and hours) of various tests, back tracking, deleting, re-installing, restoring and other contortions I finally remembered that several weeks back I had added an entitlements plist to solve a similar issue. So, I deleted the reference to the plist from my project settings entitlement field, and it worked!.

That is, until I went to make a distribution build, at which time it failed again. However, this time it gave me the old, familiar error about an invalid entitlement. So, I re-added the entitlement plist reference and the ad-hoc installation worked.

Hopefully the final 3.0 SDK will correct this issue so that I don’t have to remember to do this each time I switch between development and distribution builds.

Posted in iOS | Tagged , | Leave a comment

A new site!

We have a new website after … what, 10 years? Taking me a lot of time to figure out how to put a site together in a “web app” vs plain old HTML and some php/mysql. Bizarre!

Posted in Announcements | Tagged | Leave a comment