IOS 5 Hangs on ASIHTTPRequests

So, I have an application that runs on iOS 3.2 - 4.x. It uses ASIHTTPRequest to call all REST API calls. Since my team and I upgraded our three iPhone 4s to iOS 5, the app will hang and show the ActivityIndicator indefinitely. I looked at the server logs and the requests did not get to the server.

However, if I press the iPhone home button, then open the application again, the request will pass, and I will receive the data, as usual. For some reason, queries never run until I open the application.

Another weird tidbit, the app runs on Xcode 4.2 and the iPhone simulator. The app also works on iPad2 with iOS 5 (app - for iPhone only).

Will this be an ASIHTTPRequest problem? Not too sure how to identify the problem, since there is no failure and only happens on the phone.

Any insight would be greatly appreciated! Thanks.

+6
source share
2 answers

Of course, I cannot be sure without the details and code examples, but a few things about your description offer one possibility, at least to recreate the problem. The fact that it works in the simulator and works after closing the application and reopening it makes me think that your application may receive a memory warning at some point before you experience it. During the cleanup that occurs as a result of this memory warning, it is possible that something is unloaded that does not receive proper reinitialization until you return to the application from the main screen. You can test this by simulating a memory warning while running in the Xcode 4.2 simulator, although you may need to find out exactly where the memory warning occurs to duplicate the problem.

0
source

I am new to this, so it was probably a good prerequisite, but my problems were resolved when I disabled ARC and created a project. see if that helps.

0
source

Source: https://habr.com/ru/post/899492/


All Articles