BGTaskScheduler.Error.Code.unavailable
A task scheduling error that indicates the app or extension can’t schedule background work.
Declaration
case unavailableDiscussion
This error usually occurs for one of three reasons:
A person disabled background refresh in settings.
The app runs on Simulator which doesn’t support background processing.
The extension either didn’t set RequestsOpenAccess to
YESin The Info.plist File, or a person didn’t grant open access.