iOS and its fake multitasking

Hi,

Its 1:30 am, i realized that iOS application architecture cannot support multitasking all of a sudden when i was examining my new beard :D. I came to my laptop immediately and to my great surprise IT DOSENT !!! This is a very clever or shld i say a sneeky implementation from the iOS developers.

I will write down how i came down to this. I have been developing lots of apps fr iPhone,iTouch,iPad for more than 1 yr now. When you write apps for iOS there is no memory limit(theoratically) i can load like 100 images and not release them. I started to write lets say an unknown app in android. for tat application i had to show a list of images. But the application will crash with an excepting “out of memory”. After some research i figured out that there is a 4MB heap limit.

I started to think why they would have something like this. This is to make sure all applications get their “fair” use of memory. And so that all applications can coexist in the memory. I was feeling irritated cos of this restriction. My brain started murmering “this wasnt a pblm in iOS”. It was murmering for many days. Finally today when my brain was in its nth iteration of the same thing, i told myself, this means iOS cannot support multitasking.

But i told myself “nah it has multitasking. you are not right”. But i came to my laptop and checked the iOS SDK. I knew this function existed but wat i didnt notice is this.

– (void)applicationDidEnterBackground:(UIApplication *)application

i guess the name explains wat it does. (this is called when an application is going to background)

And this is wat the document says for the function.

“Discussion

In iOS 4.0 and later, this method is called instead of the applicationWillTerminate: method when the user quits an application that supports background execution. You should use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. You should also disable updates to your application’s user interface and avoid using some types of shared system resources (such as the user’s contacts database). It is also imperative that you avoid using OpenGL ES in the background. Your implementation of this method has approximately five seconds to perform any tasks and return. If you need additional time to perform any final tasks, you can request additional execution time from the system by calling beginBackgroundTaskWithExpirationHandler:. In practice, you should return from applicationDidEnterBackground: as quickly as possible. If the method does not return before time runs out your application is terminated and purged from memory.”

If you carefully notice the “bold” parts. It is clear that the system is closing the app. And here is another function

– (void)applicationDidBecomeActive:(UIApplication *)application
this is called when an application in background comes to foreground. and the document says.
“You should use this method to restart any tasks that were paused (or not yet started) while the application was inactive. For example, you could use it to restart timers or throttle up OpenGL ES frame rates. If your application was previously in the background, you could also use it to refresh your application’s user interface.”
So from these two calls it is very clear that the application is released and allocated. This means the applications in iOS application environment does not truly CO-EXIST in the memory. which is inline with my reasoning earlier on why iOS CANNOT support multitasking.
Then i started thinking why would apple do something like this ? I am not buying Steve’s “battery” issue.
Viola i got my answer in minutes :D.  I found this blog after searching for material on this “multi tasking” by iOS.
This also explains wat i discovered (ebby again they figured this out before me). But also a list of services that can be run parallely. Remember an application is different from a service. A service is something tat is running all the time . For example a music player is a service and all application will share this to play music. Similarly phone calling is also a service. An iOS will not shut down these services. So this link will show a list of services a background application can use even after receiving the “go to background call”.
That is when i had the shock of my life. What apple has done is this :).
All older versions of iOS (that is less than 4.0) could also run these services parallely. For example we can still play music receive calls , receive push notification when another app is running in an iOS device running less than iOS4.0. The iOS engineers figured out the flaw in their design and their application environoment cannot allow multiple apps to coexist. So earlier only the music , phone calls , push notification from standard apple apps can be multitasked. For example music played only from apple music player would play when you are using an application. So the engineers extended this feature to all applications. So the only REAL feature added to iOS is that all apps can use these services when another application is in the foreground !!!!!!
I would NEVER call this multitasking. This is Multi App View !!! This was played well by apple. I dont kno how many people can see why they have done soemthing like this. Cos the reason of “battery” life sounds very authentic but not true (ck the comments section of the gizmodo blog). So the whole Apple Inc is making a fool out of all :).
They play a card saying that they are implementing a very efficient multitasking. And does something like this 🙂 only people who work at SDK can know this. I didnt kno all this till now. If i had not started android dev i would not have known this either.
If you ask how this will interfear with user experience. IF there is an application that has to keep using network or some resource other than the ones in the standard services even when the application goes to background it cant. Say ur connected to server X . You have to disconnect and reconnect to the server 🙂 when app goes to background and comes back to foreground.
Well i am happy i could find this out. (i hope i am right abt this). I am not really worried about apps not coexiting or anything else. But i think apple has cleverly hidden this whole truth and has made ppl believe tat it is supporting multitasking. Most users are people who wont have knowledge on any of this. This is a message to all the fan boys. I some times feel that i am an android fan boy but if google does something like this :S i will defn switch sides. I personally believe that a company should tell users what they are getting and what they wont get. Especially apple should do that. They should show some love to its fan boys and tell them the truth on what they are getting. I think they are just using the trust ppl have on the brand. I remember an old tamil songs which says “Till there are ppl who can be cheated there will be cheaters. You cannot eradicate one group of people and expect world to be a better place”.
Now i wonder wat the real reason is behind iOS not supporting flash 😀 . Steve gave the same answer “battery” issue 🙂 But when all other platforms can use flash y not iOS ??  I am pretty sure that there will be a reason like this. This is why we need open sourced codes. Apple cannot say BS if the code is open 🙂 . Google cannot give these BS answers cos the code is open any body can tell why a particular feature is not there in android.
This is another reason for me now on why i wont get an apple product !!!! Lies !!! If apple had acknowledged this and told atleast its dev i would have considered getting an apple product in future. But now i am not going to give love to a company which shows no love 🙂
PS:thanks angel fr ur insipration(tech blogs)
BYE

Advertisements

~ by dineshabe on December 11, 2010.

9 Responses to “iOS and its fake multitasking”

  1. Good one…! If apple keeps doing this cheating again and again, it will not live long…! Steve has to wake up and do aome thing about it, not tell another lie that Apple’s still fresh to eat… 😛

  2. good one

  3. Stop leaking corporate secrets! Apple needs to profit out of this! People don’t need power! They just need to feel good :p

  4. 🙂

  5. Have you ever heard of “If it walks like a duck and talks like a duck – it is a duck”. You are assuming here that your or someone elses view of “multitasking” is the only definition of “multitasking”. It is not. Reeducate yourself. Dont be so pompous.

    • Read the post properly. I am saying that the “multitasking” that is there in iOS 4.0 is already present in previous versions of iOS. There is nothing new in 4.0 which is related to multitasking.

      All that is new with 4.0 is an ability to switch between apps that is NOT multitasking. Apple released 4.0 in a way that it looked like they have implemented some thing new. Which they have not !!!

      Any thing can be called multitasking. I know that much. But iOS 4.0 has nothing new in it which is related to multitasking !!!

      Pompous ? So if a guy goes against apple or steve it is wrong 🙂 Steve;s attitude towards other technology like Flash is ok ?
      So it is ok for people to buy an inferior product without knowing wat it is actually doing ? Dude dont be a fan of any tech. IT is ok to like a tech company but u cant blindly support a company. tats called fanaticism !!

      the main idea behind this post is to let ppl know that they r using an inferior product and u cant believe everything that comes out of steve’s mouth.

    • another main point is. steve said they implemented multitasking in a way battery life will stay the same. this is a big lie. y cos.

      1)Multitasking DOES not screw up battery life. There are countless blogs that talk abt this. In short, the things tat consume battery is when u used GPS,GSM,Wifi,3G or camera. So if your app is not doing any of these it is NOT going to screw ur battery.

      2)iOS developers will have to recode a large portion of the OS to give complete multitasking like android. to avoid tat time delay, steve is using the battery issue as a cover. the truth is they cant implement full multitasking. cos when they designed iOS they didnt expect tat ppl will expect multitasking !!

      that to me is pure lying !! steve cant accpet the fact that iOS is inferior in design and implementation !!

  6. amazing! i was also doubting my ipod touch 4’s capability to multitask. a popular game for example, coin dozer, accumulates coins faster when the game is open compared to when it is closed. so i double click the home button to switch to a different app hoping that coin dozer will continue to run in the background. but when i go back to coin dozer, it treated the app like closed. so i got only a few coins.

  7. oh for my case, i think its due to the app itself and not iOS. as i’ve read here –> http://blogs.computerworld.com/16307/iphone_4_multitasking_will_be_disappointing

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: