That blocks the main (UI) thread connecting and downloading messages, which can easily take longer than the time allowed to launch your app (about 20 seconds, I think).
It looks like MailCore does not have an asynchronous API, so you'll have to use it in the background yourself. I recommend using dispatch queues (dispatch_async()
is reasonably straightforward to use correctly provided you only use weak references to UIKit classes) or NSOperationQueue
to make things run in the background.
The usual concurrency warnings apply.