iOS4 multitasking, is it working now?

Previous topic - Next topic


Hello There,

Can somebody confirm that iOS4 multitasking is now working with GLBasic V8 using AUTOPAUSE feature? Sorry for bothering as I don't have any capable device, I can't test it on my own.

Thanks in advance...



It does appear to be working but other issues seem to have cropped up but we have heard nothing from Gernot yet.




Gernot is in holidays 2 weeks.
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Kitty Hello

The current update seems to work for me. Only hting is, when you get a low mem message, the app quits. I'll change that in the next update so it oly quits if there's less than 2MB free. (calling GLB_ON_QUIT, though)


Thanks for all the answers...

The low memory problem is something that I can live with but supporting multitasking (fast app switch) is essential so I'll still prefer upgrading in the current state.



Is that not how its supposed to work? iOS quits any app fully if the memory usage is getting too much for the machine. I think it checks for whatever is using the most memory first.


Kitty Hello

iOS 4.0 gave you low memory warnings on a 3G instantly when you started. Maybe 4.1 fixed that. I decided _not_ to do anything then.


3G does not have multitask due to low memory and low processor, so it is disabled.


*small kick*

Question: how can I test if my program is multitasking-proof on my ipod? I've written a cool game in GLBasic and it seems to run fine on my ipod (ios 4.1). But before I sumbit it to itunes I want to know that it won't crash when it runs on an iphone and then switches to incoming call or something.

In my GLBasic program I haven't set AUTOPAUSE to TRUE or FALSE, so I'm guessing it's then set to FALSE by default? What happens then when the user presses the HOME button on the iPod? The help file isn't very clear on this.

When I explicitly set AUTOPAUSE FALSE the program seems to just quit when I press home, and it calls GLB_ON_QUIT which is good. If I set AUTOPAUSE TRUE is seem to do the same thing..? Or are there multiple instances of my program running when I start and then quit? How can I see all running programs?


I have this on my program:

Code (glbasic) Select

ALLOWESCAPE FALSE //not sure if this is necesary on the iPhone, but here it is
ALLOWESCAPE TRUE //I want ESC working on the PC

IF pausao=1
UNTIL pausao=0
DRAWRECT 192,142,130,30,rrgb
ALPHAMODE -1;PRINT "P A U S E D",200,150


until "always"



It works on the iPhone AND in the PC if I press outside the app window


Hopefully Gernot will find a way to get it working on Mac & Linux...


Okay I've found something :) if you don't want your iphone program to run in the background you can add UIApplicationExitsOnSuspend to your projects .plist file.

To do this, in the xcode project file double click the .plist file, then click on the key value of the last item. Now click on the plus button (+) to add an item, and choose "Application does not run in background" from the key-dropdownlist and check the checkbox.

I personally don't see the use of multi-tasking, at least not for games. I guess it might be usefull for some utilities, like a gps tracking program or something like that.


Well, in most of my games, I can resume in the exact point I left, without waiting for loading it again. On iPhone4 at least, it is a very nice feature.

Kitty Hello

with allowescape true (default) the home button calls GLB_ON_QUIT and done. With allowescape false, you can enable multitasking on iOS.