Class BGTaskSchedulerErrorCode


  • public final class BGTaskSchedulerErrorCode
    extends java.lang.Object
    An enumeration of the task scheduling errors. API-Since: 13.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static long NotPermitted
      A task scheduling error indicating the app isn’t permitted to schedule the task.
      static long TooManyPendingTaskRequests
      A task scheduling error indicating that there are too many pending tasks of the type requested.
      static long Unavailable
      A task scheduling error indicating that the app or extension can’t schedule background work.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • Unavailable

        public static final long Unavailable
        A task scheduling error indicating that the app or extension can’t schedule background work. This error usually occurs for one of following reasons: - The user has disabled background refresh in settings. - The app is running on Simulator which doesn’t support background processing. - The keyboard extension either hasn’t set to `YES` in [The Info.plist File](https://developer.apple.com/library/archive/documentation/Carbon/Conceptual/ProvidingUserAssitAppleHelp/authoring_help/authoring_help_book.html#//apple_ref/doc/uid/TP30000903-CH206-SW22), or the user hasn’t granted open access. - The extension type isn’t able to schedule background tasks. API-Since: 13.0
        See Also:
        Constant Field Values
      • TooManyPendingTaskRequests

        public static final long TooManyPendingTaskRequests
        A task scheduling error indicating that there are too many pending tasks of the type requested. Try canceling some existing task requests and then resubmit the request that failed. API-Since: 13.0
        See Also:
        Constant Field Values
      • NotPermitted

        public static final long NotPermitted
        A task scheduling error indicating the app isn’t permitted to schedule the task. There are two causes for this error: - The app doesn’t set the appropriate mode in the array. - The task identifier of the submitted task wasn’t in the array in [the Info.plist File](https://developer.apple.com/library/archive/documentation/Carbon/Conceptual/ProvidingUserAssitAppleHelp/authoring_help/authoring_help_book.html#//apple_ref/doc/uid/TP30000903-CH206-SW22). API-Since: 13.0
        See Also:
        Constant Field Values