My iOS app freezes but no error appears My iOS app freezes but no error appears multithreading multithreading

My iOS app freezes but no error appears


Launch your app and wait for it to freeze. Then press the "pause" button in Xcode. The left pane should show you what method is currently running.


Generally, it is highly recommended to perform on the main thread all animations method and interface manipulation, and to put in background tasks like download data from your server, etc...

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{    //here everything you want to perform in background    dispatch_async(dispatch_get_main_queue(), ^{         //call back to main queue to update user interface    });});

Source : http://www.raywenderlich.com/31166/25-ios-app-performance-tips-tricks


Set a break point from where the freeze occurs and find which line cause that.

Chances may be,Loading of large data,disable the controls,overload in main thread,Just find out where that occurs using breakpoints and rectify based on that.