Cont from previous post.

•December 11, 2010 • Leave a Comment

Hi ,

Please read the previous post before reading this 🙂 i was talking with theodore and realised if all iOS engineers have done is extending a small feature. Then y didnt they give this to iphone 3G ?? Cos even in 3G u can play music and open an application in front of it 🙂

The reason i think is quiet simple. Apple wants ppl to ditch iphone 3G and get a new iphone4. I dont kno for sure. but i am guessing AT&T must have given an offer when iphone4 came out for iphone 3g users. I am just guessing 🙂



iOS and its fake multitasking

•December 11, 2010 • 9 Comments


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.


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)

Setting Up

•November 10, 2010 • Leave a Comment

Just finished setting up mu android dev env @ my laptop. This week i complete 1 yr in PEI and OOI 🙂 TIme goes fast 🙂

Pumped up

•November 9, 2010 • Leave a Comment

Just paid 25$ for the google android development program. Thinking of publishing at least one application by the end of this month. Lets see where i go from here.

One big boring cycle

•June 30, 2010 • Leave a Comment

Its the time when life becomes one big boring cycle. Weekdays r spent at office and by watching random movies. Weekends run out fast cos of cricket and other stuff like cooking , laundry and cleaning the house. Cant believe that it has been 10 months in canada. It went so fast. Will be going to vancouver next month fr ma vacation. Working in android now 🙂 Got a new treadmill benn using it fr sometime now. Have lost around 6 kgs after coming to charlottetown 🙂


Bang !!!!!

•May 12, 2010 • Leave a Comment

Think am like a comet, updating my blog once in 6 months !!! Its been 6 months since i joined this company and 8 months since i landed in Canada. Am happy i could hold this long 🙂 . I was able to manage the winter here(PEI) which is supposed to be one of the harshest in canada. Now its summer time, its kinda getting warm here. Got a new Treadmill,Flat Screen Tv and a new Laptop and paid fr them too 😀 . Started playing cricket during weekends. Working in my thir app in ma office. This one is fr iPad.

Sudden mood out 😐


Life in Charlottetown

•November 30, 2009 • Leave a Comment

Two weeks in a new place and new job :).Job is cool . Its getting cold here 😦 . Will be getting first snow this week . Full city is decorated fr christmas. It looks beautiful in the night :). Enjoying my long walks in the cold winds. I never knew that winds can give this kinda scary sounds till i came here :(. I can hear them even now :(. Its ok all te time but not just when am sleeping. Cooked ckn tikka masala, Butter ckn , and Madras ckn curry . Have lots of laundry to do tomorrow. My basement is also scary. Its an old old building. ITs more than 150+ yrs old 😦 . There’s gotta be 100 yr old ghosts here :|. Gotta get a camera soon 🙂 . Got my first paycheck 🙂 .