Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

367
Visualizações
AWS S3 multipart upload too slow in background - iOS

I am using AWS S3TransferUtility's uploadUsingMultipart(fileURL, bucket, ...) function in my iOS app to upload video files to an S3 bucket. The uploads happen very fast whenever the app is in foreground. But as soon as the app goes in the background, the upload process is very slow and is taking too much time to complete.

For example, I tested using a 100 MB file on an internet connection with upload speed 10 Mbps and it took 35 seconds to upload using multipart when the app was in the foreground but it took 14 minutes 40 seconds to upload the same file using multipart when the app was in the background.

Is there a way to speed up the upload process in the background ?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Since the answer is long, am updating as a answer.

As per the Apple’s documentation on Background Execution, it says:

Suppose if you are running a process and in between you press the home button and your app goes to the background, then your app should get some time to finish what it was doing or at least in most cases it should be able to save any important data. This is where you are requesting the os for the background execution.

Normally the OS will give upto 3 minutes(180 seconds) to complete the task . This is just a general observation. The time can be greater than or less than 3 minutes.This is not given in the official documentation.

If you don’t call endBackgroundTask() after a period of time in the background, your app will be terminated. you will end up in losing the upload.

Idea:

  1. If your task not being finished in the allocated time (3 minutes), you can post some local notification to the user states "open you application to resume the upload"
  2. you can upload by batches (dropbox uses chunkers to upload or update the data)
  3. if you take a look at whatsapp, google photos. it will alert you when you going to background while uploading.
  4. Before uploading, check if the data is huge then alert user. if the accept it the upload it.
  5. Have option to upload only on wifi

WARNINIG: There is no way of doing the infinite or long running task in the background

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda