次の懸念があります..
私のアプリケーションは、初回起動時に 6 MB のデータをダウンロードします。そのプロセス中に、UIView
進行中のダウンロードに関する情報が表示されますが、通常、ユーザーとのやり取りはありません。
そのため、メインの UI スレッドですべてのデータのダウンロードを を使用してdispatch_async
行いますが、これが最善の解決策であるかどうか、アプリケーションを送信するときに Apple が何を言うかはわかりません。
これでよろしいですか?
発送コードを更新する
//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
}