Saturday, March 8, 2008

Only foreground 3rd party apps on iPhone - Intentional or Design flaw?

I read this post in Techcrunch which discusses on iPhone's limitation to allow only foreground 3rd party applications. 3rd party applications are the ones developed using the iPhone SDK.

While the Mike thinks that this is an intended restriction owing to the limited memory and resources, I personally do not think thats the only reason. And I know why I am correct for some reasons ;).

I believe the restriction is more of a design flaw of the iPhone SDK. I believe that Apple engineers haven't yet figured out a way (or most probably did not have time to do so) a way to switch between the native applications and the 3rd party applications. You would need a robust layer which will take care of remembering the 3rd party applications' running context and bring back the UI when the application again comes to foreground. Also, there might be scenarios wherein what about happens if a native background application wakes up and wants to use the UI. In which case, how would the 3rd party application behave. Would it be able to yield the user interface for the native application.

Most of the above use cases need lot of thinking and through integration of it into the SDK layer. I am sure Apple would later release an updated SDK which will allow 3rd party applications to run in the back ground as well.

There may be a work-around for this problem. The 3rd party application developer can care of trapping/getting notification from the OS/platform for exiting its own context and then saving the relevant context information in the memory. The next time you launch the application, it can read the previously saved context and bring itself back to the state of previous execution. Its very similar to playing the brick game in your blackberry.

[Article imported from Mobile Computing Trends]

No comments: