Prevent app to crash when I open multitask - iphone

When my app is launched, and I double tap on the home button to display the bottom bar containing all the running application (multitasking), My App crashes, and I have no idea where it can come from !!
Any help please ?

Ok, I found it, actually I had nothing in the stack nor in the console log, except a "Program ended with exit code: 255", but that's I quit the application in the applicationWillResignActive, using exit(-1). Thanks anyway

Related

ios app dosnt work when testing on a test device

When I build the application to the testing phone everything works fine. If i then press the home button go back to the main screen then run the app , again everything works fine.
However if I quit the app to the home screen then close the application from running in the background and then try to run the app again from the main icon, it wont run it just goes to black screen and stops the phone from working or itll load the main view and none of the buttons work.. the only way to fix the phone so its usable again is to lock it and turn the device on again..
has anyone suffered this same issue before?
Sometimes the bootstrap server seems to get confused when you hit the home button and return to the app. If you are testing multi-tasking/background behavior, try the following process:
Build and run from Xcode.
Disconnect your device (your app will quit).
Now, truly quit the app by double tapping the home button and holding down on the app icon.
Finally, reopen the app and test for multi-tasking/backgrounding behavior (your won't get console messages however).

SA_OAuthTwitterEngine login keyboard doesn't show after first launch

I'm using the SA_OAuthTwitterEngine to integrate Twitter into on of my iPhone apps. Loggin in and sending tweets are working fine. But, when I completely terminate my app so it will start up from the beginning, I can't login again using the SA_OAuthTwitterController because the keyboard will not show up. The input field also doesn't respond to the Mac keyboard when using the simulator.
I've searched for similar problems, but they don't help me out. I've found a lot of similar problems, where calling makeKeyAndVisible for the app delegate window solved it. This doesn't work for me. If I set the modalview's alpha to .2, I also don't see the keyboard behind the view controller.
Weirdest thing is that everything works after a fresh reinstall for as many times as I want, but after I've terminated the app, the keyboard doesn't show op anymore.
Can anyone point me in the right direction?
Thanks in advance!

My app not geting terminated after pressing the home button

i am developing a ebook reader and i am facing the following issue. if i close the app and reopen , then it opens exactly in the same state as it used to be before closing. I suspect this may lead to a lot memory leaks. Is this the right way for the app to function? and will this behavior cause any memory leaks?? can anyone help me with this... I dint know what title to put on top.. Please apologize me if the title was misleading.. thank you.
This is the expected behavior. After the introduction of iOS4, applications will keep their state between launches. Applications get terminated when the system is running low on memory, as the system terminates applications not recently used to free memory. This will not lead to memory leaks. For users running iOS3 pressing Home will terminate the application.
See Understanding an Application’s States and Transitions and Multitasking for more information.
right appropriate code in delegate file
-(void)applicationDidEnterBackground:(UIApplication *)application
{//exit(0);
}
if nothing works write exit(0) in this method.
You can add the BOOL key: "Application does not run in background" to your info.plist and set it to YES. Then your app should be terminated when you press the home button.

What does double-tapping on the home button exactly do?

What does double-tapping on the home button exactly do?
Does it list the applications running in background, OR
Does it list recently used applications?
I've implemented the "Application does not run in background" in my Info.plist file. In spite of this my application shows on double tapping the home button !! Yes I have tried a clean build.
It shows all recently-used apps, not just the multi-tasking ones. If you try to tap your app now, it will start exactly like it was first launched, displaying the launch image first before initializing (calling application:didFinishLaunchingWithOptions: and sending the relevant notifications).

When i kill the application in multitasking bar,and run the program it's goes to same state where i was closing the app

Today i updated my 3GS i-phone to install my application to see it's functioning well in OS4,when i'm running the application and tap the home button it's goes to multitasking bar,then again i get the application from there it's goes to previous state where i was.i think the behavior is OK. but problem comes when i kill the application in multitasking bar and run it it's come to same state,simply it's ignore the login screen.
My question is when i kill the application i want to get my login screen, not the previous state, this application is working fine in 3GS,can some one please help me to fix this issue?
Thanks
Sam.
Sam,
If you don't want the OS to save state for you, you should place the key UIApplicationExitsOnSuspend in your info.plist file.
More information here: http://developer.apple.com/iphone/library/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW23
This will kill the app when the home button is pressed, instead of suspending it into the background (which is what iOS4 does for multi-tasking).