Pick the fix
A refresh task runs once and never again. Most likely fix?
Hint 1 of 1
How many times does one request run?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Submit a new BGAppRefreshTaskRequest inside the handler, and call setTaskCompleted when done
Correct. Each request runs once, so you schedule the next one.
Why not the others?
- B Set earliestBeginDate to now. It's a minimum time, not a guarantee, and doesn't create a new request.
- C Register the identifier again in viewDidLoad. Registration happens once at launch.
- D Use a repeating Timer. Timers don't run while the app is suspended.