Does the iPhone timeout if a function takes too long to execute?
cocoa, iphone
Solution
iPhone imposes a timeout for application launch. So if you perform an extensive processing in applicationDidFinishLaunching: for instance, the application will be terminated and a crash log will be produced. Unfortunately I've found no mention of it in the official documentation.
After the launch process has completed, I'm not aware of any timeouts that limit function execution time. I've tried it on the device with putting sleep for 30 seconds in the main thread and it works fine.
Problem
I have a function in which I get en external resource from the web using cocoa's Url object. And it works fine on the simulator, but occasionally fails on the device itself (it's a google query so the resource obviously does exist). Which leads me to believe that there is some internal timeout barrier on the hardware, but haven't read that such a barrier exists or not. Anyone else encountered similar issues? Or knows if the timeout is documented or can be changed?