-
Notifications
You must be signed in to change notification settings - Fork 543
BackgroundAssets iOS xcode26.0 b4
Alex Soto edited this page Jul 22, 2025
·
1 revision
#BackgroundAssets.framework
diff -ruN /Applications/Xcode_26.0.0-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAAssetPackManager.h /Applications/Xcode_26.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAAssetPackManager.h
--- /Applications/Xcode_26.0.0-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAAssetPackManager.h 2025-06-28 03:56:31
+++ /Applications/Xcode_26.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAAssetPackManager.h 2025-07-16 00:39:57
@@ -36,9 +36,9 @@
- (void)getAllAssetPacksWithCompletionHandler:(void (^)(NSSet<BAAssetPack*>* _Nullable assetPacks, NSError* _Nullable error))completionHandler
NS_SWIFT_ASYNC_NAME(allAssetPacks());
-/// Gets the asset pack with the specified identifier.
+/// Gets the asset pack with the given identifier.
///
-/// If no asset pack with the specified identifier is found, then the block will receive an `NSError` object with ``BAManagedErrorCode/assetPackNotFound`` as its code for the `error` parameter. This method might attempt to get the latest asset-pack information from the server.
+/// If no asset pack with the given identifier is found, then the block will receive an `NSError` object with ``BAManagedErrorCode/BAManagedErrorCodeAssetPackNotFound`` as its code for the `error` parameter. This method might attempt to get the latest asset-pack information from the server.
/// - Parameters:
/// - assetPackIdentifier: The asset pack’s identifier.
/// - completionHandler: A block that receives the asset pack or an error if one occurs.
@@ -48,7 +48,7 @@
/// Gets the status of the asset pack with the specified identifier.
///
-/// If no asset pack with the specified identifier is found, then the block will receive an `NSError` object with ``BAManagedErrorCode/assetPackNotFound`` as its code for the `error` parameter. This method attempts to get the latest asset-pack information from the server. No updates or removals are automatically triggered.
+/// If no asset pack with the specified identifier is found, then the block will receive an `NSError` object with ``BAManagedErrorCode/BAManagedErrorCodeAssetPackNotFound`` as its code for the `error` parameter. This method attempts to get the latest asset-pack information from the server. No updates or removals are automatically triggered.
/// - Parameters:
/// - assetPackIdentifier: The asset pack’s identifier.
/// - completionHandler: A block that receives the status of the asset pack or an error if one occurs.
@@ -69,14 +69,14 @@
/// - Parameter completionHandler: A block that receives a set of identifiers of asset packs that are being updated and a set of identifiers of removed asset packs or an error if one occurs.
- (void)checkForUpdatesWithCompletionHandler:(nullable void (^)(NSSet<NSString*>* _Nullable updatingIdentifiers, NSSet<NSString*>* _Nullable removedIdentifiers, NSError* _Nullable error))completionHandler;
-/// Gets the contents of a file at the specified relative file path.
+/// Returns the contents of an asset file at the specified relative path.
///
/// All asset packs share the same namespace, so you can treat the overall collection of downloaded asset packs as if it were a single root directory that contains all of your subdirectories and asset files, regardless of the specific asset pack in which any particular file resides. If there’s a file-path collision across multiple asset packs, then it’s undefined from which asset pack the file will be read unless you explicitly limit the search to a particular asset pack by passing a non-`nil` identifier to the `assetPackIdentifier` parameter.
/// - Parameters:
/// - path: The relative file path.
/// - assetPackIdentifier: The identifier of the asset pack in which you want to search for the file or `nil` if you want to search in all asset packs.
/// - options: Options for how to read the contents of the file into a data object.
-/// - error: A pointer to an error that will be set if an error occurs. If no file is found at `path`, then `error` will point to an `NSError` object with ``BAManagedErrorCode/fileNotFound`` as its code.
+/// - error: A pointer to an error that will be set if an error occurs. If no file is found at `path`, then `error` will point to an `NSError` object with ``BAManagedErrorCode/BAManagedErrorCodeFileNotFound`` as its code.
/// - Returns: The file’s contents.
- (nullable NSData*)contentsAtPath:(NSString*)path
searchingInAssetPackWithIdentifier:(nullable NSString*)assetPackIdentifier
@@ -84,13 +84,13 @@
error:(NSError* _Nullable *)error
NS_SWIFT_NAME(contents(atPath:searchingInAssetPackWithID:options:));
-/// Opens a file descriptor for the specified relative file path.
+/// Opens and returns a file descriptor for the asset file at the specified relative path.
///
/// All asset packs share the same namespace, so you can treat the overall collection of downloaded asset packs as if it were a single root directory that contains all of your subdirectories and asset files, regardless of the specific asset pack in which any particular file resides. If there’s a file-path collision across multiple asset packs, then it’s undefined from which asset pack the file will be opened unless you explicitly limit the search to a particular asset pack by passing a non-`nil` identifier to the `assetPackIdentifier` parameter. A return value of `-1` indicates that an error occurred.
/// - Parameters:
/// - path: The relative file path.
/// - assetPackIdentifier: The identifier of the asset pack in which you want to search for the file or `nil` if you want to search in all asset packs.
-/// - error: A pointer to an error that will be set if an error occurs. If no file is found at `path`, then it will point to an `NSError` object with ``BAManagedErrorCode/fileNotFound`` as its code.
+/// - error: A pointer to an error that will be set if an error occurs. If no file is found at `path`, then it will point to an `NSError` object with ``BAManagedErrorCode/BAManagedErrorCodeFileNotFound`` as its code.
/// - Returns: A descriptor for the opened file.
/// - Important: It’s your responsibility to close the file descriptor when you’re done using it.
/// - Remark: Use this method if you need low-level access to the file descriptor. If you don’t, then use ``BAAssetPackManager/contentsAtPath:searchingInAssetPackWithIdentifier:options:error:`` instead.
@@ -99,7 +99,7 @@
error:(NSError* _Nullable *)error
NS_SWIFT_NAME(descriptor(forPath:searchingInAssetPackWithID:error:));
-/// Gets the URL for the specified relative file path.
+/// Returns a URL for the specified relative path.
///
/// All asset packs share the same namespace, so you can treat the overall collection of downloaded asset packs as if it were a single root directory that contains all of your subdirectories and asset files, regardless of the specific asset pack in which any particular file resides. Unlike ``BAAssetPackManager/contentsAtPath:searchingInAssetPackWithIdentifier:options:error:`` and ``BAAssetPackManager/fileDescriptorForPath:searchingInAssetPackWithIdentifier:error:``, this method supports retrieving entire directories—including packages—in which case it merges the corresponding slices of the shared logical directory from all downloaded asset packs that contain such slices. If there’s a file-path collision across multiple asset packs, then it’s undefined from which asset pack an individual file will be resolved.
/// - Parameters:
@@ -111,9 +111,9 @@
- (nullable NSURL*)URLForPath:(NSString*)path error:(NSError* _Nullable *)error
NS_SWIFT_NAME(url(forPath:));
-/// Removes the downloaded asset pack with the specified identifier.
+/// Removes the specified asset pack from the device.
/// - Parameters:
-/// - assetPackIdentifier: The identifier of the asset pack to remove.
+/// - assetPackIdentifier: The asset pack’s identifier.
/// - completionHandler: A block that receives an error if one occurs.
- (void)removeAssetPackWithIdentifier:(NSString*)assetPackIdentifier
completionHandler:(nullable void (^)(NSError* _Nullable error))completionHandler
diff -ruN /Applications/Xcode_26.0.0-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAAssetPackStatus.h /Applications/Xcode_26.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAAssetPackStatus.h
--- /Applications/Xcode_26.0.0-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAAssetPackStatus.h 2025-06-28 05:52:09
+++ /Applications/Xcode_26.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAAssetPackStatus.h 2025-07-16 00:54:52
@@ -6,9 +6,6 @@
//
/// The status of an asset pack.
-API_AVAILABLE(ios(26.0), macos(26.0), tvos(26.0), visionos(26.0))
-API_UNAVAILABLE(watchos)
-NS_REFINED_FOR_SWIFT
typedef NS_OPTIONS(NSUInteger, BAAssetPackStatus) {
/// A status value that indicates that the asset pack is available to download.
@@ -36,4 +33,4 @@
/// A status value that indicates that the system finished downloading the asset pack.
BAAssetPackStatusDownloaded = 1 << 6
-};
+} API_AVAILABLE(ios(26.0), macos(26.0), tvos(26.0), visionos(26.0)) API_UNAVAILABLE(watchos) NS_REFINED_FOR_SWIFT;
diff -ruN /Applications/Xcode_26.0.0-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BADownloaderExtension.h /Applications/Xcode_26.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BADownloaderExtension.h
--- /Applications/Xcode_26.0.0-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BADownloaderExtension.h 2025-06-28 05:52:09
+++ /Applications/Xcode_26.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BADownloaderExtension.h 2025-07-16 00:55:30
@@ -24,7 +24,7 @@
During the invocation of this method, `BADownloadManager` will prohibit the ability to schedule additional downloads
until this method exits scope. Therefore, all downloads needing to be scheduled should be returned here.
If a download fails, it can be rescheduled using `BADownloadManager` in any other method in this protocol.
- @param contentRequest The content request event that occured that caused this method to be invoked.
+ @param contentRequest The content request event that occurred that caused this method to be invoked.
@param manifestURL A file URL to the local manifest that was pre-downloaded and specified in your App's Info.plist under the `BAManifestURL`.
The file is read-only and will be deleted after this method returns. If you wish to keep it, you must copy it out.
@param extensionInfo Information about your extension that may be useful for making a decision about
@@ -59,7 +59,7 @@
- (void)backgroundDownload:(BADownload *)download finishedWithFileURL:(NSURL *)fileURL;
/// @brief This method may be called shortly before the extension is terminated.
-/// @discussion This method is invoked if all extension callbacks have returned or if the extension has run over it's alotted runtime.
+/// @discussion This method is invoked if all extension callbacks have returned or if the extension has run over its allotted runtime.
/// This callback provides a last chance to tidy up state before process termination.
/// @warning This method is advisory only, there will be instances where the extension is terminated before this method is invoked.
/// Do not rely on this method being invoked before the extension is terminated.
diff -ruN /Applications/Xcode_26.0.0-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAManagedAssetPackDownloadDelegate.h /Applications/Xcode_26.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAManagedAssetPackDownloadDelegate.h
--- /Applications/Xcode_26.0.0-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAManagedAssetPackDownloadDelegate.h 2025-06-28 05:52:09
+++ /Applications/Xcode_26.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAManagedAssetPackDownloadDelegate.h 2025-07-16 00:54:52
@@ -9,7 +9,7 @@
NS_HEADER_AUDIT_BEGIN(nullability, sendability)
-/// A type that can receive notifications about events that occur as an asset pack is downloaded.
+/// An object that handles status updates when downloading an asset pack.
API_AVAILABLE(ios(26.0), macos(26.0), tvos(26.0), visionos(26.0))
API_UNAVAILABLE(watchos)
NS_SWIFT_SENDABLE
@@ -18,26 +18,26 @@
@optional
-/// Notifies the receiver that an asset pack began or resumed being downloaded.
+/// Notifies the receiver that the download began or resumed after being paused.
/// - Parameter assetPack: The asset pack.
- (void)downloadOfAssetPackBegan:(BAAssetPack*)assetPack;
-/// Notifies the receiver that an asset pack is currently being downloaded.
+/// Notifies the receiver that the download paused.
+/// - Parameter assetPack: The asset pack.
+- (void)downloadOfAssetPackPaused:(BAAssetPack*)assetPack;
+
+/// Notifies the receiver that the download is in progress.
/// - Parameters:
/// - assetPack: The asset pack.
/// - progress: The download progress.
- (void)downloadOfAssetPack:(BAAssetPack*)assetPack
hasProgress:(NSProgress*)progress;
-/// Notifies the receiver that an asset pack paused being downloaded.
+/// Notifies the receiver that the download completed and that the asset pack is available locally.
/// - Parameter assetPack: The asset pack.
-- (void)downloadOfAssetPackPaused:(BAAssetPack*)assetPack;
-
-/// Notifies the receiver that an asset pack is now available locally.
-/// - Parameter assetPack: The asset pack.
- (void)downloadOfAssetPackFinished:(BAAssetPack*)assetPack;
-/// Notifies the receiver that an asset pack failed to be downloaded.
+/// Notifies the receiver that the download failed.
/// - Parameters:
/// - assetPack: The asset pack.
/// - error: The error that occurred.
diff -ruN /Applications/Xcode_26.0.0-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAManagedDownloaderExtension.h /Applications/Xcode_26.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAManagedDownloaderExtension.h
--- /Applications/Xcode_26.0.0-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAManagedDownloaderExtension.h 2025-06-28 05:52:09
+++ /Applications/Xcode_26.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAManagedDownloaderExtension.h 2025-07-16 00:54:52
@@ -7,32 +7,33 @@
#import <BackgroundAssets/BADownloadManager.h>
-/// A protocol to which a manged downloader extension must conform.
+/// An application extension that uses the system implementation to schedule asset-pack downloads automatically.
///
-/// The protocol provides default implementations for all of the inherited `BADownloaderExtension` requirements.
-/// - Warning: Don’t implement any of the inherited `BADownloaderExtension` requirements aside from, optionally, `-backgroundDownload:didReceiveChallenge:completionHandler:`.
+/// The protocol provides default implementations for all of the inherited ``BADownloaderExtension-zuvm`` requirements.
+/// - Warning: Don’t implement any of the inherited ``BADownloaderExtension-zuvm`` requirements aside from, optionally, ``BADownloaderExtension-zuvm/backgroundDownload:didReceiveChallenge:completionHandler:``.
///
-/// ## Adding an Objective-C Downloader Extension
-/// Xcode’s Background Download extension template generates Swift code when you select either the “Apple-hosted” or the “Self-hosted” option, but you can easily switch to Objective-C instead if you prefer. To do so, follow these steps:
-/// 1. Remove `DownloaderExtension.swift`.
+/// ## Creating an Objective-C Downloader Extension
+/// Xcode’s Background Download extension template generates Swift code when you select either the “Apple-Hosted, Managed” option or the “Self-Hosted, Managed” option, but you can easily switch to Objective-C instead if you prefer. To do so, follow these steps:
+/// 1. Remove `BackgroundDownloadHandler.swift`.
/// 2. Create `DownloaderExtension.h` with the following contents:
/// ### Apple Hosting
/// ```objc
-/// #import <BackgroundAssets/BackgroundAssets.h>
+/// #import <StoreKit/StoreKit.h>
///
-/// \@interface DownloaderExtension : NSObject <BAManagedDownloaderExtension>
+/// \@interface DownloaderExtension : NSObject <SKDownloaderExtension>
///
/// @end
/// ```
///
-/// ### Self-hosting
+/// ### Self Hosting
/// ```objc
-/// #import <StoreKit/StoreKit.h>
+/// #import <BackgroundAssets/BackgroundAssets.h>
///
-/// \@interface DownloaderExtension : NSObject <SKDownloaderExtension>
+/// \@interface DownloaderExtension : NSObject <BAManagedDownloaderExtension>
///
/// @end
/// ```
+///
/// (Remove any backslash characters that may be rendered in the above code snippets.)
///
/// 3. Create `DownloaderExtension.m` with the following contents:
@@ -60,7 +61,7 @@
@protocol BAManagedDownloaderExtension <BADownloaderExtension>
@optional
-/// Determines whether a particular asset pack should be downloaded.
+/// Determines whether to download an asset pack.
///
/// By default, the system automatically downloads all applicable asset packs with either “essential” or “prefetch” download policies for the current installation event type. You can optionally implement this method to filter out unwanted asset packs at runtime.
/// - Parameter assetPack: An asset pack that’s being considered as a candidate to be downloaded.
diff -ruN /Applications/Xcode_26.0.0-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAManagedError.h /Applications/Xcode_26.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAManagedError.h
--- /Applications/Xcode_26.0.0-beta3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAManagedError.h 2025-06-28 05:52:09
+++ /Applications/Xcode_26.0.0-beta4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAManagedError.h 2025-07-16 00:54:52
@@ -10,26 +10,27 @@
NS_HEADER_AUDIT_BEGIN(nullability, sendability)
-/// The Managed Background Assets error domain.
+/// The error domain for managed asset packs.
BA_EXPORT NSErrorDomain const BAManagedErrorDomain API_AVAILABLE(ios(26.0), macos(26.0), tvos(26.0), visionos(26.0)) API_UNAVAILABLE(watchos) NS_REFINED_FOR_SWIFT;
/// The `-[NSError userInfo]` key for an asset pack’s identifier.
///
-/// This key is relevant when the error code is ``BAManagedErrorCode/assetPackNotFound``.
+/// This key is relevant when the error code is ``BAManagedErrorCode/BAManagedErrorCodeAssetPackNotFound``.
BA_EXPORT NSErrorUserInfoKey const BAAssetPackIdentifierErrorKey API_AVAILABLE(ios(26.0), macos(26.0), tvos(26.0), visionos(26.0)) API_UNAVAILABLE(watchos) NS_REFINED_FOR_SWIFT;
-/// A Managed Background Assets error code.
+/// An error code for a managed asset pack.
typedef NS_ENUM(NSInteger, BAManagedErrorCode) {
- /// An error code that indicates that an asset pack wasn’t found.
+ /// An error code that indicates the system can’t find an asset pack with the given identifier.
///
/// Refer to the value in `-[NSError userInfo]` for the key `BAAssetPackIdentifierErrorKey` for the asset pack’s identifier.
BAManagedErrorCodeAssetPackNotFound,
- /// An error code that indicates that a file wasn’t found.
+ /// An error code that indicates the system can’t find a file at the specified path.
///
/// Refer to the value in `-[NSError userInfo]` for the key `NSFilePathErrorKey` for the file path.
BAManagedErrorCodeFileNotFound
+
} API_AVAILABLE(ios(26.0), macos(26.0), tvos(26.0), visionos(26.0)) API_UNAVAILABLE(watchos) NS_REFINED_FOR_SWIFT;
NS_HEADER_AUDIT_END(nullability, sendability)