It sounds like you've blocked the main thread somehow. To debug, run the app in the debugger and when the app freezes, hit the pause button above the log area at the bottom of Xcode. Then on the left side, you'll be able to see exactly what each thread is doing, and you can see where it's getting stuck.
Probably either a long loop on the main thread or a sync deadlock.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…