Is there a way to tell iOS that I do not want my app to stay in the background? In other word, can I tell my app to quit itself whenever getting into the background?
I am using ABPeoplePickerNavigationController
in one of the tabs in my UITbarController. However, it crashes with a EXC_BAD_ACCESS whenever it reaches [ABMembersViewController applicationDidResume]
.
Here comes the stack trace:
0x00cc5994 <+0034> mov 0x8(%eax),%eax
0x00cc5991 <+0031> mov 0x8(%ebp),%eax
0x00cc598d <+0027> mov %eax,0x4(%esp)
0x00cc5987 <+0021> mov 0x4e082(%ebx),%eax
0x00cc597f <+0013> movl $0x0,0x8(%esp)
0x00cc597e <+0012> pop %ebx
ABCGetGroupCount
-[ABAccountsAndGroupDataSource hasMultipleAccountsOrGroups]
-[ABMembersViewController updateNavigationButtonsInSearchMode:animated:]
-[ABMembersViewController updateNavigationButtonsAnimated:]
-[ABMembersViewController applicationDidResume]
So, in order to work around it, I figure that if I am able to force the app to terminate itself, I can beautifully prevent the program to go through this part of the code.