Skip to content

BackgroundTasks iOS xcode26.0 b2

Alex Soto edited this page Jun 24, 2025 · 1 revision

#BackgroundTasks.framework

diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundTasks.framework/Headers/BGTask.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundTasks.framework/Headers/BGTask.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundTasks.framework/Headers/BGTask.h	2025-05-29 02:28:43
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundTasks.framework/Headers/BGTask.h	2025-06-17 00:11:14
@@ -13,7 +13,7 @@
 
 /// An abstract class representing a task that’s run while the app is in the
 /// background.
-BG_EXTERN API_AVAILABLE(ios(13.0), tvos(13.0)) API_UNAVAILABLE(macos)
+BG_EXTERN API_AVAILABLE(ios(13.0), tvos(13.0)) API_UNAVAILABLE(macos) API_UNAVAILABLE(watchos)
 @interface BGTask : NSObject
 
 /// The string identifier of the task.
@@ -82,7 +82,7 @@
 /// Processing tasks run only when the device is idle. The system terminates any
 /// background processing tasks running when the user starts using the device.
 /// Background refresh tasks are not affected.
-BG_EXTERN API_AVAILABLE(ios(13.0), tvos(13.0)) API_UNAVAILABLE(macos)
+BG_EXTERN API_AVAILABLE(ios(13.0), tvos(13.0)) API_UNAVAILABLE(macos) API_UNAVAILABLE(watchos)
 @interface BGProcessingTask : BGTask
 
 @end
@@ -94,7 +94,7 @@
 /// Health research tasks may only be used by applications entitled to perform
 /// studies and user's have opted in to the relevant study. These apps must have the
 /// `com.apple.developer.backgroundtasks.healthresearch` entitlement.
-BG_EXTERN API_AVAILABLE(ios(17.0), tvos(32.0)) API_UNAVAILABLE(macos, tvos)
+BG_EXTERN API_AVAILABLE(ios(17.0), tvos(32.0)) API_UNAVAILABLE(macos, tvos) API_UNAVAILABLE(watchos)
 @interface BGHealthResearchTask : BGProcessingTask
 
 @end
@@ -111,7 +111,7 @@
 /// <doc://com.apple.documentation/documentation/bundleresources/information_property_list/uibackgroundmodes>
 /// capability. For information on setting this capability, see
 /// ``BGTaskScheduler``.
-BG_EXTERN API_AVAILABLE(ios(13.0), tvos(13.0)) API_UNAVAILABLE(macos)
+BG_EXTERN API_AVAILABLE(ios(13.0), tvos(13.0)) API_UNAVAILABLE(macos) API_UNAVAILABLE(watchos)
 @interface BGAppRefreshTask : BGTask
 
 @end
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundTasks.framework/Headers/BGTaskRequest.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundTasks.framework/Headers/BGTaskRequest.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundTasks.framework/Headers/BGTaskRequest.h	2025-05-29 01:12:50
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundTasks.framework/Headers/BGTaskRequest.h	2025-06-17 00:45:59
@@ -10,25 +10,14 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-/*!
- @abstract An abstract class that represents a request for the app to be launched in the background to perform work.
- @discussion Do not instantiate instances of this class directly. Instead, use one of its concrete subclasses.
- */
-BG_EXTERN API_AVAILABLE(ios(13.0), tvos(13.0)) API_UNAVAILABLE(macos)
-/// An abstract class for representing task requests.
+/// An abstract class that represents a request for the app to be launched in the background to perform work.
+/// Do not instantiate instances of this class directly. Instead, use one of its concrete subclasses.
+BG_EXTERN API_AVAILABLE(ios(13.0), tvos(13.0)) API_UNAVAILABLE(macos) API_UNAVAILABLE(watchos)
 @interface BGTaskRequest : NSObject <NSCopying>
-/*!
- @abstract The identifier associated with this request.
- */
 
 /// The identifier of the task associated with the request.
 @property (readonly, copy) NSString *identifier;
 
-/*!
- @abstract The earliest date at which the task may run.
- @discussion Setting this property does not guarantee that the task will begin at the specified date, but only that it will not begin sooner. If not specified, no start delay is used.
- */
-
 /// The earliest date and time at which to run the task.
 ///
 /// Specify `nil` for no start delay.
@@ -44,13 +33,12 @@
 
 #pragma mark -
 
-/*!
- @abstract A request to briefly launch your app to keep its contents up to date.
- @discussion Schedule a refresh task request to ask that the system launch your app briefly so that you can download data and keep your app's contents up-to-date. The system will fulfill this request intelligently based on system conditions and app usage.
- */
-
 /// A request to launch your app in the background to execute a short refresh task.
-BG_EXTERN API_AVAILABLE(ios(13.0), tvos(13.0)) API_UNAVAILABLE(macos)
+///
+/// Schedule a refresh task request to ask that the system launch your app briefly so that you can download data and
+/// keep your app's contents up-to-date. The system will fulfill this request intelligently based on system conditions
+/// and app usage.
+BG_EXTERN API_AVAILABLE(ios(13.0), tvos(13.0)) API_UNAVAILABLE(macos) API_UNAVAILABLE(watchos)
 @interface BGAppRefreshTaskRequest : BGTaskRequest
 
 /// Return a new refresh task request for the specified identifier.
@@ -63,14 +51,13 @@
 
 #pragma mark -
 
-/*!
- @abstract A request to launch your app to perform deferrable processing tasks.
- @discussion Schedule a processing task request to ask that the system launch your app when conditions are favorable for battery life to handle deferrable, longer-running processing, such as syncing, database maintenance, or similar tasks. The system will attempt to fulfill this request to the best of its ability within the next two days as long as the user has used your app within the past week.
- */
-
-/// A request to launch your app in the background to execute a processing task
-/// that can take minutes to complete.
-BG_EXTERN API_AVAILABLE(ios(13.0), tvos(13.0)) API_UNAVAILABLE(macos)
+/// A request to launch your app in the background to execute a processing task that can take minutes to complete.
+///
+/// Schedule a processing task request to ask that the system launch your app when conditions are favorable for battery
+/// life to handle deferrable, longer-running processing, such as syncing, database maintenance, or similar tasks. The
+/// system will attempt to fulfill this request to the best of its ability within the next two days as long as the user
+/// has used your app within the past week.
+BG_EXTERN API_AVAILABLE(ios(13.0), tvos(13.0)) API_UNAVAILABLE(macos) API_UNAVAILABLE(watchos)
 @interface BGProcessingTaskRequest : BGTaskRequest
 
 /// Return a new processing task request for the specified identifier.
@@ -79,40 +66,37 @@
 ///     - identifier: The string identifier of the processing task associated with the request.
 - (instancetype)initWithIdentifier:(NSString *)identifier;
 
-/*!
- @abstract Whether the background task represented by this request requires network connectivity.
- @discussion If this property is set to YES, the system will only launch your app to fulfill this request when the device has a network connection. If this is set to NO, your app may not have network access.
- The default value is NO.
- */
-
 /// A Boolean specifying if the processing task requires network connectivity.
+///
+/// If this property is set to YES, the system will only launch your app to fulfill this request when the device has a
+/// network connection. If this is set to NO, your app may not have network access.
+/// - Note: The default value is `NO`.
 @property (assign) BOOL requiresNetworkConnectivity;
 
-/*!
- @abstract Whether the background task represented by this request should only be done while the device is connected to external power.
- @discussion If this property is set to YES, the system will launch your app to fulfill this request only while the device is connected to external power. Setting this to YES will also disable the CPU Monitor feature.
- Specify YES if this task is resource intensive to minimize impact to battery life. Please note that, even if this value is NO, the system will not necessarily schedule this task while the device is on battery power, depending on the type of device and system conditions.
- The default value is NO.
- */
-
-/// A Boolean specifying if the processing task requires a device connected to power.
+/// Whether the background task represented by this request should only be done while the device is connected to
+/// external power.
+///
+/// If this property is set to `YES`, the system will launch your app to fulfill this request only while the device is
+/// connected to external power. Setting this to `YES` will also disable the CPU Monitor feature. Specify `YES` if this
+/// task is resource intensive to minimize impact to battery life. Please note that, even if this value is `NO`, the
+/// system will not necessarily schedule this task while the device is on battery power, depending on the type of
+/// device and system conditions.
+/// - Note: The default value is `NO`.
 @property (assign) BOOL requiresExternalPower;
 
 @end
 
 #pragma mark -
 
-/// A request to launch your app in the background to execute a health research task for studies a user has opted into and
-/// that can take minutes to complete.
-BG_EXTERN API_AVAILABLE(ios(17.0), tvos(17.0)) API_UNAVAILABLE(macos)
+/// A request to launch your app in the background to execute a health research task for studies a user has opted into
+/// and that can take minutes to complete.
+BG_EXTERN API_AVAILABLE(ios(17.0), tvos(17.0)) API_UNAVAILABLE(macos) API_UNAVAILABLE(watchos)
 @interface BGHealthResearchTaskRequest : BGProcessingTaskRequest
-/*!
- @abstract What file protection state is required to access data relevant to this task.
- @discussion Update this property to indicate what type of data needs to be accessible when the task is run.
- The default value is `NSFileProtectionCompleeUntilFirstUserAuthentication`.
- */
 
 /// A String indicating file protection availability required for processing.
+///
+/// Update this property to indicate what type of data needs to be accessible when the task is run. The default value
+/// is `NSFileProtectionCompleteUntilFirstUserAuthentication`
 @property (assign) NSFileProtectionType protectionTypeOfRequiredData;
 
 @end
@@ -141,7 +125,7 @@
     /// execution is not supported on all devices. Additionally, if a device is experiencing heavy GPU contention
     /// backgrounded workloads are not guaranteed runtime.
     ///
-    /// - Important: Applications must have the `com.apple.developer.background-tasks.continued-processing.gpu` entitlement to submit a task request with this resource.
+    /// - Important: Applications must have the `com.apple.developer.background-tasks.continued-processing.gpu`  entitlement to submit a task request with this resource.
     BGContinuedProcessingTaskRequestResourcesGPU NS_SWIFT_NAME(gpu) = (1 << 0),
 } NS_SWIFT_NAME(BGContinuedProcessingTaskRequest.Resources) API_AVAILABLE(ios(26.0)) API_UNAVAILABLE(macos, tvos, visionos, watchos, macCatalyst);
 
@@ -177,11 +161,10 @@
 /// currently foregrounded app. Please note that ``BGTaskRequest/earliestBeginDate`` will be outright ignored by the
 /// scheduler in favor of `NSDate.now`.
 ///
-/// The identifier must leverage a base wildcard notation, where the prefix of the identifier must at least contain the
-/// bundle ID of the submitting application, followed by optional semantic context, and finally ending with `.*`. An
-/// example: `<MainBundle>.<SemanticContext>.*` which would transform to
-/// `com.foo.MyApplication.continuedProcessingTask.*`. Thus, a submitted identifier would be of the form
-/// `com.foo.MyApplication.continuedProcessingTask.HD830D`.
+/// The identifier ought to use wildcard notation, where the prefix of the identifier must at least contain the bundle
+/// ID of the submitting application, followed by optional semantic context, and finally ending with `.*`. An example:
+/// `<MainBundle>.<SemanticContext>.*` which would transform to `com.foo.MyApplication.continuedProcessingTask.*`. Thus,
+/// a submitted identifier would be of the form `com.foo.MyApplication.continuedProcessingTask.HD830D`.
 ///
 /// - Parameters:
 ///   - identifier: The task identifier.
diff -ruN /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundTasks.framework/Headers/BGTaskScheduler.h /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundTasks.framework/Headers/BGTaskScheduler.h
--- /Applications/Xcode_26.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundTasks.framework/Headers/BGTaskScheduler.h	2025-05-29 02:28:43
+++ /Applications/Xcode_26.0.0-beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundTasks.framework/Headers/BGTaskScheduler.h	2025-06-17 01:25:06
@@ -17,7 +17,7 @@
 NS_ASSUME_NONNULL_BEGIN
 
 /// The background tasks error domain as a string.
-BG_EXTERN API_AVAILABLE(ios(13.0), tvos(13.0)) API_UNAVAILABLE(macos)
+BG_EXTERN API_AVAILABLE(ios(13.0), tvos(13.0)) API_UNAVAILABLE(macos) API_UNAVAILABLE(watchos)
 NSErrorDomain const BGTaskSchedulerErrorDomain;
 
 /// An enumeration of the task scheduling errors.
@@ -53,14 +53,14 @@
     /// submitting a ``BGContinuedProcessingTaskRequest``. Task requests that are successfully ran will not be
     /// associated with any error code.
     BGTaskSchedulerErrorCodeImmediateRunIneligible = 4,
-} API_AVAILABLE(ios(13.0), tvos(13.0)) API_UNAVAILABLE(macos);
+} API_AVAILABLE(ios(13.0), tvos(13.0)) API_UNAVAILABLE(macos) API_UNAVAILABLE(watchos);
 
 /// A class for scheduling task requests that launch your app in the background.
 ///
 /// Background tasks give your app a way to run code while the app is suspended.
 /// To learn how to register, schedule, and run a background task, see
 /// <doc://com.apple.documentation/documentation/uikit/app_and_environment/scenes/preparing_your_ui_to_run_in_the_background/using_background_tasks_to_update_your_app>.
-BG_EXTERN API_AVAILABLE(ios(13.0), tvos(13.0)) API_UNAVAILABLE(macos)
+BG_EXTERN API_AVAILABLE(ios(13.0), tvos(13.0)) API_UNAVAILABLE(macos) API_UNAVAILABLE(watchos)
 @interface BGTaskScheduler : NSObject
 - (instancetype)init NS_UNAVAILABLE; //Use the shared scheduler object instead
 + (instancetype)new NS_UNAVAILABLE; //Use the shared scheduler object instead
Clone this wiki locally