XMPP core data storage object is blocking main thread

259 views
Skip to first unread message

John Bake

unread,
Apr 10, 2014, 5:38:29 AM4/10/14
to xmppfr...@googlegroups.com

I am using XMPP for an iOS chat application. However, I have noticed that when the app processes the roster and the presence from the server the application's UI freezes momentarily and therefore the user cannot interact with it.

By default the xmppStream and xmppRoster modules are allocated in the main queue and so I tried to change that to a custom queue, but I get a run time error basically saying that I cannot use the NSManagedObject outside the main thread.

The roster in my app is fetched using an NSFetchedResults controller and so I also tried to put the fetch request on a background thread using GCD but still no difference. I don't really know what part of the code to post or what would be useful. Any suggestions on how to possibly fix that or pointers to tutorials would be extremely useful.

I have not managed to find the exact block of code that does the lengthy processing it might be delays from different part of the code as the app processes the roster and presence.

shashank agarwal

unread,
May 9, 2017, 3:52:39 AM5/9/17
to XMPPFramework
Did you find a solution to this? I am facing the same issue.

kua...@xun.global

unread,
Jul 25, 2018, 4:04:14 AM7/25/18
to XMPPFramework
I am facing the same issue, do you have the solution for this? can share?

kua...@xun.global

unread,
Jul 25, 2018, 4:10:03 AM7/25/18
to XMPPFramework
Do you have the solution for this?

Reply all
Reply to author
Forward
0 new messages