Menu

iPhone app hangs and Android ANRs: causes and fixes
📰

iPhone app hangs and Android ANRs: causes and fixes

DEV Community: ios·Shahid Hussain·4 days ago
#Yd4dowG0
#devtoios#devto#dev#thread#hang
Long article (624 words) — no AI summary yet.
Reading 0:00
15s threshold

A hang is the app freezing while someone waits: taps do nothing and scrolling stops. iPhone calls it a hang. Android

calls the long version an ANR, Application Not Responding, and offers to close the app. Both have one cause: the main

thread, which draws the screen and handles touches, is busy or blocked. Here's how to find hangs and ANRs and remove

them for good.

What counts

iPhone: Apple's tools report a hang when the main thread doesn't respond for more than 250 milliseconds ( Apple ). Xcode Organizer's Hangs report and the Hangs instrument both use that threshold.

Android: the system raises an ANR when the app doesn't respond to an input event within about five seconds, or when a broadcast receiver or service runs too long.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.