Note that there are some explanatory texts on larger screens.

plurals
  1. PONetwork communication in main UI thread
    primarykey
    data
    text
    <p>I have following concern..</p> <p>My application downloads 6 MB of data when it is started for the first time. During that process <code>UIView</code> with information about ongoing download is presented, and generally there is no interaction with user.</p> <p>Because of that I do all downloading of data in main UI Thread, using <code>dispatch_async</code>, but now I don't know if this is the best solution and what will Apple say when I will submit my application.</p> <p>Could you please guide my if this is Ok or not ? </p> <p><strong>Update</strong><br> Dispatch code</p> <pre><code>//Called at the end of [UIViewController viewDidLoad] -(void)splashScreenAppeared { myTabBarController_.loadingLabel.text = NSLocalizedString(@"Checking for updates",@"launch progress"); dispatch_queue_t d_queue = dispatch_get_main_queue(); [self launchActionCheckIfDataIsStored:d_queue]; } //... -(void)launchActionCheckIfDataIsStored:(dispatch_queue_t)queue { dispatch_async(queue, ^ { //If there is no data stored in core data then download xml data files and images if (![self isAnyDataStoredInCoreData]) { launchNoDataStored_ = YES; [self launchDownloadData:queue]; } else { launchNoDataStored_ = NO; [self launchCheckNewVersion:queue]; } }); } //... -(void)launchDownloadData:(dispatch_queue_t)queue { myTabBarController_.loadingLabel.text = NSLocalizedString(@"Downloading catalog data",@"launch progress"); dispatch_async(queue, ^ { [self loadMenuData]; if (seriousError_) { [self launchSeriousError:queue]; return; } myTabBarController_.loadingLabel.text = NSLocalizedString(@"Downloading products details",@"launch progress"); dispatch_async(queue, ^ { [self loadProductsData]; if (seriousError_) { [self launchSeriousError:queue]; return; } //... //And so on with other parts of download } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload