アプリケーションがバックグラウンドになっても継続するはずのファイルをアップロードしたい。
現在、DBからファイルを取得し、NSOperationを介してキューに追加してから、アップロード手順を開始しています。
アプリがバックグラウンドまたはフォアグラウンドになった場合でも、すべてのファイルをアップロードする必要があります。以下は、単一のタスクのコードです。多くのファイルをアップロードするためにどのように機能させることができるかについて、誰かが私にヒントを与えることができます。
UIApplication* application = [UIApplication sharedApplication];
bgTask = [application beginBackgroundTaskWithExpirationHandler:^{
// Clean up any unfinished task business by marking where you
// stopped or ending the task outright.
[application endBackgroundTask: bgTask];
bgTask = UIBackgroundTaskInvalid;
}];