I developed an app using Titanium 1.7.3 and Xcode 5, and I noticed that when I resume an app running in background on iOS5 there is about a 5 second delay before the app responds to touch or click events.
Has anyone experienced this behavior?
7 Answers
Is it possible to display a splash screen when the app resumes until the UI becomes active? Using the pause/resume event listeners to display a splash window is ineffective because they are also delayed when the app resumes.
I solved the problem by turning off analytics in the tiapp.xml file. Can anyone explain why this happens when analytics is turned on?
Open the tiapp.xml file and change the line
<analytics>true</analytics>
to
<analytics>false</analytics>
I have seen this in a number of apps both titanium made and not... thats not saying titanium does not have an issue here, but rather that I think the core of the issue might be iOS5. If you can get more of a use case, that might help track down if their is an issue on the titanium side.
Yea I get this all the time.. frustrating, because then people start clicking and clicking and clicking and sometimes an uncaught exception occurs and the app falls over. Great huh.
I'll give you an example of how the scenario looks at the moment.
- app.js
- New Window -> Login
- New Window -> Split Window
- Master Window -> Contains 1 Image (320x90) and 4-7 Labels
- Detail Window -> Contains one image 704x704
- (Click on Label in Master View -> New Window Opens)
- New Modal Window -> Contains Images (representing gallery)
- Close Modal Window
- --- Delay of a few seconds ---
- (Put app, on an iPad, not in the simulator, into the background, leave a while and come back, and you experience this delay).
That's effectively a perfect scenario to replicate this, as that's, element by element, one of the apps that produces this (but effectively all apps seem to experience this, and they all use different sources!).
I haven't bothered because it would be a fairly inconclusive test seeing as eliminating the kitchen sink won't prove it's the code or the framework or the iOS. Too many variables to make an accurate analysis.
Your Answer
Think you can help? Login to answer this question!