Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Background URLSessions support

Aperta
#81 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
swift

Direzione di ricerca

Start by reading the existing OpenAI class and the app's AppDelegate, then review the linked URLSessionDelegate documentation and AWSS3TransferUtility example. The issue calls for background URLSession transfers managed through delegates rather than closures; done means calls can continue when the app is suspended and their original tasks can be completed when the app resumes.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Is your feature request related to a problem? Please describe.
If the app gets suspended or terminated, the URLSession cannot continue.

Describe the solution you'd like
Either the OpenAI class itself or some other class that would take the responsibility of making the calls would have to be a subclass of NSObject and implement the URLSessionDelegate protocol, then there would have to be a way to register these delegates, associate them with individual calls, and have a way for the AppDelegate to bring them to life and finish the original task even after the app was suspended.
https://developer.apple.com/documentation/foundation/urlsessiondelegate/1617185-urlsessiondidfinishevents

We can model this on the AWSS3TransferUtility:
https://github.com/aws-amplify/aws-sdk-ios/blob/main/AWSS3/AWSS3TransferUtility.m

Describe alternatives you've considered
Not sure if we have an alternative. The main issue is that the background sessions do not support closures so we have to use URLSession delegates.

Additional context
This is about robustness of the system - low connectivity and people leaving the app. Imagine you have to transcribe 1 GB audio file. Even if you split it to smaller parts, you still need to upload them somehow if the user goes to the background. I don't think real users will have the patience to look at a progress bar for 10 minutes or however long it will take.

Lingua principale
Swift
Stelle
2.9k
Fork
519
Merge medio
4g 9h
PR unite (30g)
13

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di MacPaw/OpenAI

Tutte le issue di MacPaw/OpenAI

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.