Skip to content

BackgroundAssets iOS xcode14.0 beta1

Manuel de la Pena edited this page Aug 5, 2022 · 3 revisions

#BackgroundAssets.framework https://github.com/xamarin/xamarin-macios/pull/15649

diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAApplicationExtensionInfo.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAApplicationExtensionInfo.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAApplicationExtensionInfo.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAApplicationExtensionInfo.h	2022-05-31 14:52:09.000000000 -0400
@@ -0,0 +1,30 @@
+//
+//  BAApplicationExtensionInfo.h
+//  BackgroundAssets
+//
+//  Copyright (c) 2022, Apple Inc.
+//  All rights reserved.
+//
+
+#import <BackgroundAssets/BackgroundAssets.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos)
+@interface BAApplicationExtensionInfo : NSObject <NSSecureCoding>
+
+/// @brief The application identifer that this code is being called to handle.
+@property (readonly) NSString               *applicationIdentifier;
+
+/// @brief The date the extension's periodic check was invoked.
+@property (readonly, nullable) NSDate       *lastPeriodicCheckTime;
+
+/// @brief The date the last time that appliction launched and checked in to check for downloads.
+@property (readonly, nullable) NSDate       *lastApplicationLaunchTime;
+
+/// @brief The download size is currently restricted. This is most likely because the application has not been launched yet.
+@property (readonly) BOOL                   downloadSizeRestricted;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BABase.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BABase.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BABase.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BABase.h	2022-05-21 09:04:07.000000000 -0400
@@ -0,0 +1,28 @@
+//
+//  BABase.h
+//  BackgroundAssets
+//
+//  Copyright (c) 2022, Apple Inc.
+//  All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+#ifndef BA_EXPORT
+    #ifdef __cplusplus
+        #define BA_EXPORT   extern "C" __attribute__((visibility ("default")))
+    #else
+        #define BA_EXPORT   extern __attribute__((visibility ("default")))
+    #endif
+#endif
+#ifndef BA_HIDDEN
+    #ifdef __cplusplus
+        #define BA_HIDDEN   "C" __attribute__((visibility("hidden")))
+    #else
+        #define BA_HIDDEN   __attribute__((visibility("hidden")))
+    #endif
+#endif
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BADownload.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BADownload.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BADownload.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BADownload.h	2022-05-31 14:52:09.000000000 -0400
@@ -0,0 +1,44 @@
+//
+//  BADownload.h
+//  BackgroundAssets
+//
+//  Copyright (c) 2022, Apple Inc.
+//  All rights reserved.
+//
+
+#import <BackgroundAssets/BackgroundAssets.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos)
+@interface BADownload : NSObject<NSCoding, NSSecureCoding, NSCopying>
+
+/// @brief The current state of the respresented download.
+@property (readonly, nonatomic) BADownloadState state
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+/// @brief A client defined identifier that uniquely identifies this asset.
+@property (readonly, nonatomic) NSString    *identifier
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+/// @brief A UUID that uniquely identifies the download object.
+@property (readonly, nonatomic) NSString  *uniqueIdentifier
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+/// @brief A client set priority to try to order downloads in order of importance
+@property (readonly) BADownloaderPriority priority
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+/// @brief When the download is in state "BADownloadStateDownloadFailed" this will the error the download failed with.
+@property (readonly, nullable) NSError *error
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+- (instancetype)init
+NS_UNAVAILABLE;
+
++ (instancetype)new
+NS_UNAVAILABLE;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BADownloadManager.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BADownloadManager.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BADownloadManager.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BADownloadManager.h	2022-05-31 14:52:09.000000000 -0400
@@ -0,0 +1,121 @@
+//
+//  BADownloader.h
+//  BackgroundAssets
+//
+//  Copyright (c) 2022, Apple Inc.
+//  All rights reserved.
+//
+
+#import <BackgroundAssets/BackgroundAssets.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos)
+@protocol BADownloadManagerDelegate <NSObject>
+
+@optional
+
+/// @brief A download has started.
+- (void)downloadDidBegin:(BADownload *)download;
+
+/// @brief A download has paused.
+- (void)downloadDidPause:(BADownload *)download;
+
+/// @brief A download has made progress in bytes / total so far / total expected.
+- (void)download:(BADownload *)download didWriteBytes:(int64_t)bytesWritten
+                                    totalBytesWritten:(int64_t)totalBytesWritten
+                            totalBytesExpectedToWrite:(int64_t)totalExpectedBytes;
+
+/// @brief A download has tried to start but gotten a challenge quest.
+- (void)download:(BADownload *)download didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge
+                                          completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * _Nullable credential))completionHandler;
+
+/// @brief A download has failed with a specific error.
+- (void)download:(BADownload *)download failedWithError:(NSError *)error;
+
+/// @brief Called when a download has been completed and the file has placed at it's destination path.
+/// @param fileURL A location to the file that has been downloaded.
+/// @discussion The caller should attempt to use the URL provided by the API so that the system will
+/// properly purge the file as storage fills up on the device. Only move this file if it is critical that it should
+/// never be purged. It is recommended to leave the file in /Library/Caches so that it stays purgeable.
+- (void)download:(BADownload *)download finishedWithFileURL:(NSURL *)fileURL;
+
+@end
+
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos)
+@interface BADownloadManager : NSObject
+
+- (instancetype)init
+NS_UNAVAILABLE;
++ (instancetype)new
+NS_UNAVAILABLE;
+
+/// @brief Gets the singleton downloader object.
+@property (class, readonly, strong) BADownloadManager *sharedManager
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos)
+NS_SWIFT_NAME(shared);
+
+/// @brief A object confroming to BADownloadManagerDelegate to get notified when actions occur.
+@property (weak) id<BADownloadManagerDelegate> delegate
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+/// @brief Allows access to the set of downloads that are staged / pending for you application identifier.
+/// @discussion Allows access to the set of downloads that your application identifier has staged /pending.
+/// @param completionHandler A block to recieve the currently scheduled downloads. The block is called on the same queue as all the other completion blocks in the class.
+- (void)fetchCurrentDownloadsWithCompletionHandler:(void(^)(NSArray<BADownload *> *downloads, NSError *_Nullable error))completionHandler
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos)
+NS_SWIFT_NAME(currentDownloads(completionHandler:))
+NS_SWIFT_ASYNC_NAME(currentDownloads());
+
+/// @brief Schedules a download to be done at some point in the future.
+/// @discussion Specifies a download to schedule at a priority to be downloaded some point in the future.
+/// @param download A BADownload object representing a URL to be downloaded.
+/// @param outError A NSError representing why the BADownload could not be scheduled.
+/// @return YES if @c download was scheduled. NO and @c outError set if the download could not be scheduled.
+- (BOOL)scheduleDownload:(BADownload *)download
+                   error:(NSError* _Nullable __autoreleasing *)outError
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+/// @brief Acquires exclusive access to the BADownloadManager across the app and application extension.
+/// @discussion Acquires exclusive access to the BADownloadManager across the app and application extension. This ensures that your extension and app
+/// do not perform operations at the same time. Both the extension and app must use this API to ensure exclusive access.
+/// @param performHandler A block that will be executed once exclusive control is acquired.
+/// If an error is non-nil then a problem occured acquiring exclusive access.
+- (void)performWithExclusiveControl:(void (^)(NSError *_Nullable error))performHandler
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos)
+NS_SWIFT_NAME(withExclusiveControl(_:))
+NS_SWIFT_DISABLE_ASYNC;
+
+/// @brief Acquires exclusive access to the BADownloadManager across the app and application extension.
+/// @discussion Acquires exclusive access to the BADownloadManager across the app and application extension. This ensures that your extension and app
+/// do not perform operations at the same time. Both the extension and app must use this API to ensure exclusive access.
+/// @param date A date by which you want exclusive control acquired. If you pass +[NSDate date], control will attempt to be acquired and if it can not be, it will fail instantly.
+/// @param performHandler A block that will be executed once exclusive control is acquired.
+/// If an error is non-nil then a problem occured acquiring exclusive access.
+- (void)performWithExclusiveControlBeforeDate:(NSDate *)date
+                                   completion:(void (^)(BOOL acquiredLock, NSError *_Nullable error))performHandler
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos)
+NS_SWIFT_NAME(withExclusiveControl(beforeDate:_:))
+NS_SWIFT_DISABLE_ASYNC;
+
+/// @brief Attempts to schedule a BADownload in foreground mode.
+/// @discussion Attempts to schedule a BADownload in foreground mode. This download will start (if it has not been started) immediately regrardlesss of battery or
+/// network status. The download will remain in this foreground until the download manager is disconnected. This API only functions if the download manager is created in
+/// the application and not the download extension. If this API is called from the download extension, NO will be returned along with a NSError with the settings
+/// BAErrorDomain : BAErrorCodeCallFromExtensionNotAllowed. If this API is called from a app while it is in the background, NO will be returned along with a NSError
+/// with the settings BAErrorDomain : BAErrorCodeCallFromInactiveProcessNotAllowed.
+- (BOOL)startForegroundDownload:(BADownload *)download
+                          error:(NSError* _Nullable __autoreleasing *)outError
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+/// @brief Cancels a download.
+/// @discussion Attempts to cancel a BADownload. If the download has not been schduled or has already completed, NO is returned along with a NSError set
+/// to BAErrorDomain : BAErrorCodeDownloadNotScheduled.
+/// @return YES if the download is canceled. NO if the download could not be canceled, @c error will be set with a reason why.
+- (BOOL)cancelDownload:(BADownload *)download
+                 error:(NSError **)error
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BADownloaderExtension.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BADownloaderExtension.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BADownloaderExtension.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BADownloaderExtension.h	2022-05-31 14:52:09.000000000 -0400
@@ -0,0 +1,61 @@
+//
+//  BADownloaderExtension.h
+//  BackgroundAssets
+//
+//  Copyright (c) 2022, Apple Inc.
+//  All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <BackgroundAssets/BackgroundAssets.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos)
+@protocol BADownloaderExtension <NSObject>
+
+@optional
+
+/// @brief This method is invoked when a containing application was installled.
+- (void)applicationDidInstallWithMetadata:(BAApplicationExtensionInfo *)metadata
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos)
+NS_SWIFT_NAME(applicationDidInstall(metadata:));
+
+/// @brief This method is invoked when the containing application has been updated.
+- (void)applicationDidUpdateWithMetadata:(BAApplicationExtensionInfo *)metadata
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos)
+NS_SWIFT_NAME(applicationDidUpdate(metadata:));
+
+/// @brief This method is invoked when a periodic timer invokes the plugin.
+- (void)checkForUpdatesWithMetadata:(BAApplicationExtensionInfo *)metadata
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos)
+NS_SWIFT_NAME(checkForUpdates(metadata:));
+
+/// @brief A download is ready but needs to know if its permitted
+- (void)receivedAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
+                               download:(BADownload *)download
+                      completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential * _Nullable))completionHandler
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+/// @brief This method is called when a download, or multiple downloads fail but there is no currently BADownloadManager to handle the completion event.
+/// @param failedDownload The download object that has failed.
+- (void)backgroundDownloadDidFail:(BADownload *)failedDownload
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+/// @brief This method is called when a download has finished but there is no currently BADownloadManager to handle the completion event.
+/// @param finishedDownload Download that has completed successfully.
+/// @param fileURL A location to the file that has been downloaded. The caller must move or copy this file before this method exits scope or the file will be destroyed.
+- (void)backgroundDownloadDidFinish:(BADownload *)finishedDownload
+                            fileURL:(NSURL *)fileURL
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+/// @brief This method will be called shortly before the extension is terminated.
+/// @discussion This method is called asyncronously from the other methods in the protocol. This method is invoked if all applicable
+/// callbacks have been called and returned. This method is also invoked if the extension has run over it's alotted runtime and is now about to
+/// be killed. This gives users a last changes to tidy up their state before process termination.
+- (void)extensionWillTerminate
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BATypes.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BATypes.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BATypes.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BATypes.h	2022-05-31 14:52:09.000000000 -0400
@@ -0,0 +1,56 @@
+//
+//  BATypes.h
+//  BackgroundAssets
+//
+//  Copyright (c) 2022, Apple Inc.
+//  All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <BackgroundAssets/BackgroundAssets.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/// @typedef Download state
+typedef NS_ENUM(NSInteger, BADownloadState) {
+    BADownloadStateFailed = -1,
+    BADownloadStateCreated = 0,
+    BADownloadStateWaiting,
+    BADownloadStateDownloading,
+    BADownloadStateFinished,
+};
+
+
+/// @brief A downloads priority
+/// @discussion A priority to which the a given download or group of downloads. This is range from NSIntegerMin to NSIntegerMax. The priority only applies to how downloads are ordered for your
+/// application. Higher priority items will be enqued for download before lower priority items regardless of order in which they are scheduled.
+typedef NSInteger BADownloaderPriority NS_TYPED_EXTENSIBLE_ENUM;
+
+/// @brief A value that represents the lowest priority for a download.
+FOUNDATION_EXPORT const BADownloaderPriority BADownloaderPriorityMin
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+/// @brief A value that represents average priority for a download.
+FOUNDATION_EXPORT const BADownloaderPriority BADownloaderPriorityDefault
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+/// @brief A value that represents the highest priority for a download.
+FOUNDATION_EXPORT const BADownloaderPriority BADownloaderPriorityMax
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+/// @brief A type that defines keys for the meta info dictionary passed to the extnesion.
+typedef NSString *BADownloaderExtensionMetadataKey NS_TYPED_ENUM;
+
+/// @brief A key that will contain a NSString * in notification info dictionary.
+FOUNDATION_EXPORT BADownloaderExtensionMetadataKey const BADownloaderExtensionMetadataKeyApplicationIdentifier API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+/// @brief A key that contains the name of the app in the localization in which it was purchased.
+FOUNDATION_EXPORT BADownloaderExtensionMetadataKey const BADownloaderExtensionMetadataKeyLocalizedApplicationName API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+/// @brief A key that will contain a URL to the location where the downloaded data should be.
+FOUNDATION_EXPORT BADownloaderExtensionMetadataKey const BADownloaderExtensionMetadataKeyApplicationCacheLocationURL API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+/// @brief A key that will contain a URL to the location where the application bundle should be.
+FOUNDATION_EXPORT BADownloaderExtensionMetadataKey const BADownloaderExtensionMetadataKeyApplicationLocationURL API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BATypesDeprecated.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BATypesDeprecated.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BATypesDeprecated.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BATypesDeprecated.h	2022-05-31 14:52:09.000000000 -0400
@@ -0,0 +1,30 @@
+//
+//  BATypesDeprecated.h
+//  BackgroundAssets
+//
+//  Copyright (c) 2022, Apple Inc.
+//  All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <BackgroundAssets/BackgroundAssets.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+FOUNDATION_EXPORT NSString *kBADownloaderInfoDictionaryApplicationIdentifierKey
+API_DEPRECATED_WITH_REPLACEMENT("BADownloaderExtensionMetadataKeyApplicationIdentifier", macos(13.0, 13.0), ios(16.0, 16.0))
+API_UNAVAILABLE(tvos, watchos);
+
+FOUNDATION_EXPORT NSString *kBADownloaderInfoDictionaryLocalizedApplicationNameKey
+API_DEPRECATED_WITH_REPLACEMENT("BADownloaderExtensionMetadataKeyLocalizedApplicationName", macos(13.0, 13.0), ios(16.0, 16.0))
+API_UNAVAILABLE(tvos, watchos);
+
+FOUNDATION_EXPORT NSString *kBADownloaderInfoDictionaryApplicationCacheLocationURLKey
+API_DEPRECATED_WITH_REPLACEMENT("BADownloaderExtensionMetadataKeyApplicationCacheLocationURL", macos(13.0, 13.0), ios(16.0, 16.0))
+API_UNAVAILABLE(tvos, watchos);
+
+FOUNDATION_EXPORT NSString *kBADownloaderInfoDictionaryApplicationLocationURLKey
+API_DEPRECATED_WITH_REPLACEMENT("BADownloaderExtensionMetadataKeyApplicationLocationURL", macos(13.0, 13.0), ios(16.0, 16.0))
+API_UNAVAILABLE(tvos, watchos);
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAURLDownload.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAURLDownload.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAURLDownload.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BAURLDownload.h	2022-05-31 14:52:09.000000000 -0400
@@ -0,0 +1,45 @@
+//
+//  BAURLDownload.h
+//  BackgroundAssets
+//
+//  Copyright (c) 2022, Apple Inc.
+//  All rights reserved.
+//
+
+#import <BackgroundAssets/BackgroundAssets.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos)
+@interface BAURLDownload : BADownload
+
++ (instancetype)new NS_UNAVAILABLE;
+- (instancetype)init NS_UNAVAILABLE;
+
+
+/// @brief Inits a download object to represent the download of a asset at a url represented in @c request
+/// @discussion Inits a download object to represent a download of a asset at a url wrapped in @c request. This URL most be of the scheme https.
+/// The download object then holds onto the state and callbacks for managing the states of download while the service handles.
+/// @param request The request to use to start the download.
+/// @param applicationGroupIdentifier The identifier of the application group that should used to store the finished download.
+- (instancetype)initWithIdentifier:(NSString * )identifier
+                           request:(NSURLRequest *)request
+        applicationGroupIdentifier:(NSString *)applicationGroupIdentifier
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+/// @brief Inits a download object to represent the download of a asset at a url represented in @c request
+/// @discussion Inits a download object to represent a download of a asset at a url wrapped in @c request. This URL most be of the scheme https.
+/// The download object then holds onto the state and callbacks for managing the states of download while the service handles.
+/// @param request The request to use to start the download.
+/// @param applicationGroupIdentifier The identifier of the application group that should used to store the finished download.
+/// @param priority A unsigned integer priority between BADownloaderPriorityMin - BADownloaderPriorityMax which is used to order the downloads for this process.
+- (instancetype)initWithIdentifier:(NSString * )identifier
+                           request:(NSURLRequest *)request
+        applicationGroupIdentifier:(NSString *)applicationGroupIdentifier
+                          priority:(BADownloaderPriority)priority
+NS_DESIGNATED_INITIALIZER
+API_AVAILABLE(macos(13.0), ios(16.0)) API_UNAVAILABLE(tvos, watchos);
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BackgroundAssets.apinotes /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BackgroundAssets.apinotes
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BackgroundAssets.apinotes	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BackgroundAssets.apinotes	2022-05-21 09:02:46.000000000 -0400
@@ -0,0 +1,2 @@
+---
+Name: BackgroundAssets
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BackgroundAssets.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BackgroundAssets.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BackgroundAssets.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/BackgroundAssets.framework/Headers/BackgroundAssets.h	2022-05-21 09:04:07.000000000 -0400
@@ -0,0 +1,24 @@
+//
+//  BackgroundAssets.h
+//  BackgroundAssets
+//
+// Copyright (c) 2022, Apple Inc.
+// All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#ifndef __BA_FRAMEWORK_INDIRECT__
+#define __BA_FRAMEWORK_INDIRECT__
+#endif
+
+#import <BackgroundAssets/BABase.h>
+#import <BackgroundAssets/BATypes.h>
+#import <BackgroundAssets/BATypesDeprecated.h>
+#import <BackgroundAssets/BADownload.h>
+#import <BackgroundAssets/BAApplicationExtensionInfo.h>
+#import <BackgroundAssets/BADownloaderExtension.h>
+#import <BackgroundAssets/BADownloadManager.h>
+#import <BackgroundAssets/BAURLDownload.h>
+
+#undef __BA_FRAMEWORK_INDIRECT__
Clone this wiki locally