Documentation
¶
Overview ¶
Package backgroundassets provides a fluent Go API over the macOS BackgroundAssets framework.
Construction ¶
New… functions create objects; each With… method sets one property and returns its receiver, so configuration calls chain. A <Type>FromID constructor adopts an Objective-C object obtained elsewhere.
Lifecycle ¶
A wrapper releases its Objective-C object automatically once the garbage collector finds it unreachable. Call Release to relinquish the reference deterministically (for objects holding scarce resources); Release is idempotent, and afterwards the wrapper's methods are no-ops returning zero values.
Errors ¶
Failing calls return errors carrying the Objective-C error domain and code. Match them against this package's Err… sentinel values with errors.Is, or inspect domain, code, and Apple's prose via errors.As with *errkit.Error.
Delegates ¶
A …Delegate interface is implemented by a plain Go value and installed with the matching With… setter; the package builds the Objective-C delegate object behind the scenes. Optional protocol methods are separate one-method …Handler interfaces — implement the ones you need on the same value and the framework calls them too.
Types ¶
Each base type below lists the concrete types you construct and pass where the base is accepted:
- Download: URLDownload
Index ¶
- Variables
- func BAAssetPackIdentifierErrorKey() obj.Object
- func BADownloaderPriorityDefault() int
- func BADownloaderPriorityMax() int
- func BADownloaderPriorityMin() int
- func BAErrorDomain() obj.Object
- func BAFailuresErrorKey() obj.Object
- func BAManagedErrorDomain() obj.Object
- func BASuccessesErrorKey() obj.Object
- type AppExtensionInfo
- func (aei *AppExtensionInfo) Description() string
- func (aei *AppExtensionInfo) IsEqual(other obj.Object) bool
- func (aei *AppExtensionInfo) IsKind(className string) bool
- func (aei *AppExtensionInfo) RestrictedDownloadSizeRemaining() *foundation.Number
- func (aei *AppExtensionInfo) RestrictedEssentialDownloadSizeRemaining() *foundation.Number
- func (aei *AppExtensionInfo) String() string
- type AssetPack
- func (ap *AssetPack) Description() string
- func (ap *AssetPack) Download() *Download
- func (ap *AssetPack) DownloadForContentRequest(contentRequest ContentRequest) *Download
- func (ap *AssetPack) DownloadSize() int
- func (ap *AssetPack) Identifier() string
- func (ap *AssetPack) IsEqual(other obj.Object) bool
- func (ap *AssetPack) IsKind(className string) bool
- func (ap *AssetPack) Language() string
- func (ap *AssetPack) String() string
- func (ap *AssetPack) UserInfo() []byte
- type AssetPackManager
- func (apm *AssetPackManager) AssetPackIsAvailableLocallyWithIdentifier(assetPackIdentifier string) bool
- func (apm *AssetPackManager) CheckForUpdatesWithCompletionHandler(completionHandler func(obj.Object, obj.Object, unsafe.Pointer))
- func (apm *AssetPackManager) Description() string
- func (apm *AssetPackManager) EnsureLocalAvailabilityOfAssetPack(ctx context.Context, assetPack *AssetPack) error
- func (apm *AssetPackManager) EnsureLocalAvailabilityOfAssetPackRequireLatestVersion(ctx context.Context, assetPack *AssetPack, shouldUpdate bool) error
- func (apm *AssetPackManager) EnsureLocalAvailabilityOfAssetPacks(ctx context.Context, assetPacks []*AssetPack) error
- func (apm *AssetPackManager) EnsureLocalAvailabilityOfAssetPacksRequireLatestVersions(ctx context.Context, assetPacks []*AssetPack, shouldUpdate bool) error
- func (apm *AssetPackManager) FileDescriptorForPathAsLocalizedForLanguage(path string, languageIdentifier string) (result int, err error)
- func (apm *AssetPackManager) FileDescriptorForPathSearchingInAssetPackWithIdentifier(path string, assetPackIdentifier string) (result int, err error)
- func (apm *AssetPackManager) GetAllAssetPacks(ctx context.Context) (result obj.Object, err error)
- func (apm *AssetPackManager) GetAssetPackWithIdentifier(ctx context.Context, assetPackIdentifier string) (result *AssetPack, err error)
- func (apm *AssetPackManager) GetLocalStatusOfAssetPackWithIdentifierCompletionHandler(assetPackIdentifier string, completionHandler func(AssetPackStatus))
- func (apm *AssetPackManager) GetLocallyAvailableLanguages(ctx context.Context) (result obj.Object, err error)
- func (apm *AssetPackManager) GetManifest(ctx context.Context) (result *AssetPackManifest, err error)
- func (apm *AssetPackManager) GetStatusOfAssetPackWithIdentifierCompletionHandler(assetPackIdentifier string, ...)
- func (apm *AssetPackManager) GetStatusRelativeToAssetPackCompletionHandler(assetPack *AssetPack, completionHandler func(AssetPackStatus, unsafe.Pointer))
- func (apm *AssetPackManager) IsEqual(other obj.Object) bool
- func (apm *AssetPackManager) IsKind(className string) bool
- func (apm *AssetPackManager) ReconcilePreferredLanguages(ctx context.Context) error
- func (apm *AssetPackManager) RemoveAssetPackWithIdentifier(ctx context.Context, assetPackIdentifier string) error
- func (apm *AssetPackManager) ResolvedLanguage() string
- func (apm *AssetPackManager) String() string
- func (apm *AssetPackManager) URLForPath(path string) (result string, err error)
- func (apm *AssetPackManager) URLForPathAsLocalizedForLanguage(path string, languageIdentifier string) (result string, err error)
- func (apm *AssetPackManager) WithDelegate(delegate ManagedAssetPackDownloadDelegate) *AssetPackManager
- func (apm *AssetPackManager) WithResolvedLanguage(resolvedLanguage string) *AssetPackManager
- type AssetPackManifest
- func AssetPackManifestFromID(id objc.ID) *AssetPackManifest
- func NewAssetPackManifestFromDataApplicationGroupIdentifier(data []byte, applicationGroupIdentifier string) (result *AssetPackManifest, err error)
- func NewAssetPackManifestWithContentsOfURLApplicationGroupIdentifier(url string, applicationGroupIdentifier string) (result *AssetPackManifest, err error)
- func (apm *AssetPackManifest) AllDownloads() []*Download
- func (apm *AssetPackManifest) AllDownloadsForContentRequest(contentRequest ContentRequest) []*Download
- func (apm *AssetPackManifest) AssetPackWithIdentifier(assetPackIdentifier string) *AssetPack
- func (apm *AssetPackManifest) AssetPacks() []*AssetPack
- func (apm *AssetPackManifest) AvailableLanguages() []string
- func (apm *AssetPackManifest) Description() string
- func (apm *AssetPackManifest) IsEqual(other obj.Object) bool
- func (apm *AssetPackManifest) IsKind(className string) bool
- func (apm *AssetPackManifest) LocalizedAssetPacks() []*AssetPack
- func (apm *AssetPackManifest) LocalizedAssetPacksForLanguage(languageIdentifier string) []*AssetPack
- func (apm *AssetPackManifest) PrimaryLanguage() string
- func (apm *AssetPackManifest) ResolvedLanguage() string
- func (apm *AssetPackManifest) String() string
- type AssetPackStatus
- type Clockid
- type ContentRequest
- type DispatchAutoreleaseFrequency
- type DispatchBlockFlags
- type Download
- func (d *Download) CopyAsNonEssential() *Download
- func (d *Download) Description() string
- func (d *Download) Identifier() string
- func (d *Download) IsEqual(other obj.Object) bool
- func (d *Download) IsEssential() bool
- func (d *Download) IsKind(className string) bool
- func (d *Download) Priority() int
- func (d *Download) State() DownloadState
- func (d *Download) String() string
- func (d *Download) UniqueIdentifier() string
- type DownloadManager
- func (dm *DownloadManager) CancelDownload(download *Download) error
- func (dm *DownloadManager) Description() string
- func (dm *DownloadManager) FetchCurrentDownloads() (result []*Download, err error)
- func (dm *DownloadManager) IsEqual(other obj.Object) bool
- func (dm *DownloadManager) IsKind(className string) bool
- func (dm *DownloadManager) PerformWithExclusiveControl(performHandler func(bool, unsafe.Pointer))
- func (dm *DownloadManager) PerformWithExclusiveControlBeforeDatePerformHandler(date time.Time, performHandler func(bool, unsafe.Pointer))
- func (dm *DownloadManager) ScheduleDownload(download *Download) error
- func (dm *DownloadManager) StartForegroundDownload(download *Download) error
- func (dm *DownloadManager) String() string
- func (dm *DownloadManager) WithDelegate(delegate DownloadManagerDelegate) *DownloadManager
- type DownloadManagerDelegate
- type DownloadManagerDelegateDownloadDidBeginHandler
- type DownloadManagerDelegateDownloadDidPauseHandler
- type DownloadManagerDelegateDownloadDidWriteBytesTotalBytesWrittenTotalBytesExpectedToWriteHandler
- type DownloadManagerDelegateDownloadFailedWithErrorHandler
- type DownloadManagerDelegateDownloadFinishedWithFileURLHandler
- type DownloadProvider
- type DownloadState
- type DownloaderExtension
- type EntryID
- type ErrorCode
- type FilesecProperty
- type Flag
- type Idtype
- type IpcInfoObjectType
- type LaunchDataType
- type MDLabelDomain
- type MDQueryOptionFlags
- type MDQuerySortOptionFlags
- type MachVMRangeFlags
- type MachVMRangeFlavor
- type MachVMRangeTag
- type ManagedAssetPackDownloadDelegate
- type ManagedAssetPackDownloadDelegateDownloadOfAssetPackBeganHandler
- type ManagedAssetPackDownloadDelegateDownloadOfAssetPackFailedWithErrorHandler
- type ManagedAssetPackDownloadDelegateDownloadOfAssetPackFinishedHandler
- type ManagedAssetPackDownloadDelegateDownloadOfAssetPackHasProgressHandler
- type ManagedAssetPackDownloadDelegateDownloadOfAssetPackPausedHandler
- type ManagedDownloaderExtension
- type ManagedErrorCode
- type MpoFlags
- type OSClockid
- type Perm
- type PtrauthKey
- type QosClass
- type Tag
- type TaskSharedRegionStubs
- type Type
- type URLDownload
- func NewURLDownloadWithIdentifierRequestApplicationGroupIdentifier(identifier string, request obj.Object, applicationGroupIdentifier string) *URLDownload
- func NewURLDownloadWithIdentifierRequestApplicationGroupIdentifierPriority(identifier string, request obj.Object, applicationGroupIdentifier string, ...) *URLDownload
- func NewURLDownloadWithIdentifierRequestEssentialFileSizeApplicationGroupIdentifierPriority(identifier string, request obj.Object, essential bool, fileSize int, ...) *URLDownload
- func NewURLDownloadWithIdentifierRequestFileSizeApplicationGroupIdentifier(identifier string, request obj.Object, fileSize int, ...) *URLDownload
- func URLDownloadFromID(id objc.ID) *URLDownload
- type VirtualMemoryGuardExceptionCode
- type XpcListenerCreateFlags
- type XpcSessionCreateFlags
Constants ¶
This section is empty.
Variables ¶
var ErrCodeAssetPackNotFound = errkit.New("BAManagedErrorDomain", 0)
ErrCodeAssetPackNotFound matches the BackgroundAssets error BAManagedErrorCodeAssetPackNotFound.
var ErrCodeCallFromExtensionNotAllowed = errkit.New("BAErrorDomain", 50)
ErrCodeCallFromExtensionNotAllowed matches the BackgroundAssets error BAErrorCodeCallFromExtensionNotAllowed.
var ErrCodeCallFromInactiveProcessNotAllowed = errkit.New("BAErrorDomain", 51)
ErrCodeCallFromInactiveProcessNotAllowed matches the BackgroundAssets error BAErrorCodeCallFromInactiveProcessNotAllowed.
var ErrCodeCallerConnectionInvalid = errkit.New("BAErrorDomain", 56)
ErrCodeCallerConnectionInvalid matches the BackgroundAssets error BAErrorCodeCallerConnectionInvalid.
var ErrCodeCallerConnectionNotAccepted = errkit.New("BAErrorDomain", 55)
ErrCodeCallerConnectionNotAccepted matches the BackgroundAssets error BAErrorCodeCallerConnectionNotAccepted.
var ErrCodeDownloadAlreadyFailed = errkit.New("BAErrorDomain", 103)
ErrCodeDownloadAlreadyFailed matches the BackgroundAssets error BAErrorCodeDownloadAlreadyFailed.
var ErrCodeDownloadAlreadyScheduled = errkit.New("BAErrorDomain", 100)
ErrCodeDownloadAlreadyScheduled matches the BackgroundAssets error BAErrorCodeDownloadAlreadyScheduled.
var ErrCodeDownloadBackgroundActivityProhibited = errkit.New("BAErrorDomain", 111)
ErrCodeDownloadBackgroundActivityProhibited matches the BackgroundAssets error BAErrorCodeDownloadBackgroundActivityProhibited.
var ErrCodeDownloadDoesNotExist = errkit.New("BAErrorDomain", 113)
ErrCodeDownloadDoesNotExist matches the BackgroundAssets error BAErrorCodeDownloadDoesNotExist.
var ErrCodeDownloadEssentialDownloadNotPermitted = errkit.New("BAErrorDomain", 109)
ErrCodeDownloadEssentialDownloadNotPermitted matches the BackgroundAssets error BAErrorCodeDownloadEssentialDownloadNotPermitted.
var ErrCodeDownloadFailedToStart = errkit.New("BAErrorDomain", 102)
ErrCodeDownloadFailedToStart matches the BackgroundAssets error BAErrorCodeDownloadFailedToStart.
var ErrCodeDownloadInvalid = errkit.New("BAErrorDomain", 0)
ErrCodeDownloadInvalid matches the BackgroundAssets error BAErrorCodeDownloadInvalid.
var ErrCodeDownloadNotScheduled = errkit.New("BAErrorDomain", 101)
ErrCodeDownloadNotScheduled matches the BackgroundAssets error BAErrorCodeDownloadNotScheduled.
var ErrCodeDownloadWouldExceedAllowance = errkit.New("BAErrorDomain", 112)
ErrCodeDownloadWouldExceedAllowance matches the BackgroundAssets error BAErrorCodeDownloadWouldExceedAllowance.
var ErrCodeFileNotFound = errkit.New("BAManagedErrorDomain", 1)
ErrCodeFileNotFound matches the BackgroundAssets error BAManagedErrorCodeFileNotFound.
var ErrCodeLocalAvailabilityFailure = errkit.New("BAManagedErrorDomain", 2)
ErrCodeLocalAvailabilityFailure matches the BackgroundAssets error BAManagedErrorCodeLocalAvailabilityFailure.
var ErrCodeSessionDownloadAllowanceExceeded = errkit.New("BAErrorDomain", 204)
ErrCodeSessionDownloadAllowanceExceeded matches the BackgroundAssets error BAErrorCodeSessionDownloadAllowanceExceeded.
var ErrCodeSessionDownloadDisallowedByAllowance = errkit.New("BAErrorDomain", 203)
ErrCodeSessionDownloadDisallowedByAllowance matches the BackgroundAssets error BAErrorCodeSessionDownloadDisallowedByAllowance.
var ErrCodeSessionDownloadDisallowedByDomain = errkit.New("BAErrorDomain", 202)
ErrCodeSessionDownloadDisallowedByDomain matches the BackgroundAssets error BAErrorCodeSessionDownloadDisallowedByDomain.
var ErrCodeSessionDownloadNotPermittedBeforeAppLaunch = errkit.New("BAErrorDomain", 206)
ErrCodeSessionDownloadNotPermittedBeforeAppLaunch matches the BackgroundAssets error BAErrorCodeSessionDownloadNotPermittedBeforeAppLaunch.
Functions ¶
func BAAssetPackIdentifierErrorKey ¶
BAAssetPackIdentifierErrorKey returns the string constant BAAssetPackIdentifierErrorKey, for use as a dictionary key or argument.
func BADownloaderPriorityDefault ¶
func BADownloaderPriorityDefault() int
BADownloaderPriorityDefault returns the value of the constant BADownloaderPriorityDefault.
func BADownloaderPriorityMax ¶
func BADownloaderPriorityMax() int
BADownloaderPriorityMax returns the value of the constant BADownloaderPriorityMax.
func BADownloaderPriorityMin ¶
func BADownloaderPriorityMin() int
BADownloaderPriorityMin returns the value of the constant BADownloaderPriorityMin.
func BAErrorDomain ¶
BAErrorDomain returns the string constant BAErrorDomain, for use as a dictionary key or argument.
func BAFailuresErrorKey ¶
BAFailuresErrorKey returns the string constant BAFailuresErrorKey, for use as a dictionary key or argument.
func BAManagedErrorDomain ¶
BAManagedErrorDomain returns the string constant BAManagedErrorDomain, for use as a dictionary key or argument.
func BASuccessesErrorKey ¶
BASuccessesErrorKey returns the string constant BASuccessesErrorKey, for use as a dictionary key or argument.
Types ¶
type AppExtensionInfo ¶ added in v0.17.0
AppExtensionInfo is an idiomatic wrapper over the Objective-C class BAAppExtensionInfo.
func AppExtensionInfoFromID ¶ added in v0.17.0
func AppExtensionInfoFromID(id objc.ID) *AppExtensionInfo
AppExtensionInfoFromID adopts an existing Objective-C object as a AppExtensionInfo (nil for 0), retaining it and registering a release finalizer.
func NewAppExtensionInfo ¶ added in v0.17.0
func NewAppExtensionInfo() *AppExtensionInfo
NewAppExtensionInfo creates a new AppExtensionInfo.
func (*AppExtensionInfo) Description ¶ added in v0.17.0
func (aei *AppExtensionInfo) Description() string
Description returns the object's -description text.
func (*AppExtensionInfo) IsEqual ¶ added in v0.17.0
func (aei *AppExtensionInfo) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*AppExtensionInfo) IsKind ¶ added in v0.17.0
func (aei *AppExtensionInfo) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*AppExtensionInfo) RestrictedDownloadSizeRemaining ¶ added in v0.17.0
func (aei *AppExtensionInfo) RestrictedDownloadSizeRemaining() *foundation.Number
RestrictedDownloadSizeRemaining returns the number of bytes remaining that can be scheduled if the total download size is restricted. When a download is restricted, your extension can only schedule up to its `BADownloadAllowance` defined in your app's `Info.plist`. This result tells you the number of bytes remaining that can be scheduled before the application is launched. Once the application is launched, this restriction is removed.
func (*AppExtensionInfo) RestrictedEssentialDownloadSizeRemaining ¶ added in v0.17.0
func (aei *AppExtensionInfo) RestrictedEssentialDownloadSizeRemaining() *foundation.Number
RestrictedEssentialDownloadSizeRemaining returns the number of bytes remaining that can be scheduled if the total download size of optional assets is restricted. When a download is restricted, your extension can only schedule up to its `BAEssentialDownloadAllowance` defined in your app's `Info.plist`. This result tells you the number of bytes remaining that can be scheduled before the application is launched. Once the application is launched, this restriction is removed.
func (*AppExtensionInfo) String ¶ added in v0.17.0
func (aei *AppExtensionInfo) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type AssetPack ¶ added in v0.17.0
AssetPack is an idiomatic wrapper over the Objective-C class BAAssetPack.
An archive of assets that the system downloads together.
func AssetPackFromID ¶ added in v0.17.0
AssetPackFromID adopts an existing Objective-C object as a AssetPack (nil for 0), retaining it and registering a release finalizer.
func NewAssetPack ¶ added in v0.17.0
func NewAssetPack() *AssetPack
NewAssetPack creates a new AssetPack.
func (*AssetPack) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*AssetPack) Download ¶ added in v0.17.0
Download creates a download object for the asset pack that you schedule using a download manager.
func (*AssetPack) DownloadForContentRequest ¶ added in v0.17.0
func (ap *AssetPack) DownloadForContentRequest(contentRequest ContentRequest) *Download
DownloadForContentRequest creates a download object for the asset pack that you schedule using a download manager.
func (*AssetPack) DownloadSize ¶ added in v0.17.0
DownloadSize returns the size of the download file containing the asset pack in bytes. This is different than the installation size, which could be larger.
func (*AssetPack) Identifier ¶ added in v0.17.0
Identifier returns a unique identifier for the asset pack.
func (*AssetPack) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*AssetPack) IsKind ¶ added in v0.17.0
IsKind reports whether the object is an instance of the named class or a subclass.
func (*AssetPack) Language ¶
Language returns the language, represented as a BCP-47 identifier, for which this asset pack is localized. This property is `nil` if the asset pack isn’t localized and therefore isn’t language-specific.
type AssetPackManager ¶ added in v0.17.0
AssetPackManager is an idiomatic wrapper over the Objective-C class BAAssetPackManager.
A class that manages asset packs.
func AssetPackManagerFromID ¶ added in v0.17.0
func AssetPackManagerFromID(id objc.ID) *AssetPackManager
AssetPackManagerFromID adopts an existing Objective-C object as a AssetPackManager (nil for 0), retaining it and registering a release finalizer.
func NewAssetPackManager ¶ added in v0.17.0
func NewAssetPackManager() *AssetPackManager
NewAssetPackManager creates a new AssetPackManager.
func SharedManager ¶ added in v0.17.0
func SharedManager() *AssetPackManager
SharedManager returns the shared asset-pack manager.
func (*AssetPackManager) AssetPackIsAvailableLocallyWithIdentifier ¶ added in v0.17.0
func (apm *AssetPackManager) AssetPackIsAvailableLocallyWithIdentifier(assetPackIdentifier string) bool
AssetPackIsAvailableLocallyWithIdentifier checks whether the asset pack with the specified identifier is available locally.
func (*AssetPackManager) CheckForUpdatesWithCompletionHandler ¶ added in v0.18.0
func (apm *AssetPackManager) CheckForUpdatesWithCompletionHandler(completionHandler func(obj.Object, obj.Object, unsafe.Pointer))
CheckForUpdatesWithCompletionHandler gets the latest asset-pack information from the server, updates outdated asset packs, and removes obsolete asset packs.
func (*AssetPackManager) Description ¶ added in v0.17.0
func (apm *AssetPackManager) Description() string
Description returns the object's -description text.
func (*AssetPackManager) EnsureLocalAvailabilityOfAssetPack ¶ added in v0.17.0
func (apm *AssetPackManager) EnsureLocalAvailabilityOfAssetPack(ctx context.Context, assetPack *AssetPack) error
EnsureLocalAvailabilityOfAssetPack ensures that the specified asset pack is available locally, performing a download if necessary.
EnsureLocalAvailabilityOfAssetPack blocks until the operation completes or ctx is cancelled.
func (*AssetPackManager) EnsureLocalAvailabilityOfAssetPackRequireLatestVersion ¶ added in v0.17.0
func (apm *AssetPackManager) EnsureLocalAvailabilityOfAssetPackRequireLatestVersion(ctx context.Context, assetPack *AssetPack, shouldUpdate bool) error
EnsureLocalAvailabilityOfAssetPackRequireLatestVersion ensures that the specified asset pack is available locally, performing a download if necessary.
EnsureLocalAvailabilityOfAssetPackRequireLatestVersion blocks until the operation completes or ctx is cancelled.
func (*AssetPackManager) EnsureLocalAvailabilityOfAssetPacks ¶
func (apm *AssetPackManager) EnsureLocalAvailabilityOfAssetPacks(ctx context.Context, assetPacks []*AssetPack) error
EnsureLocalAvailabilityOfAssetPacks ensures that the specified asset packs are available locally.
EnsureLocalAvailabilityOfAssetPacks blocks until the operation completes or ctx is cancelled.
func (*AssetPackManager) EnsureLocalAvailabilityOfAssetPacksRequireLatestVersions ¶
func (apm *AssetPackManager) EnsureLocalAvailabilityOfAssetPacksRequireLatestVersions(ctx context.Context, assetPacks []*AssetPack, shouldUpdate bool) error
EnsureLocalAvailabilityOfAssetPacksRequireLatestVersions ensures that the specified asset packs are available locally, performing a batch download if necessary.
EnsureLocalAvailabilityOfAssetPacksRequireLatestVersions blocks until the operation completes or ctx is cancelled.
func (*AssetPackManager) FileDescriptorForPathAsLocalizedForLanguage ¶
func (apm *AssetPackManager) FileDescriptorForPathAsLocalizedForLanguage(path string, languageIdentifier string) (result int, err error)
FileDescriptorForPathAsLocalizedForLanguage opens and returns a file descriptor for a localized asset file at the specified relative path.
func (*AssetPackManager) FileDescriptorForPathSearchingInAssetPackWithIdentifier ¶ added in v0.17.0
func (apm *AssetPackManager) FileDescriptorForPathSearchingInAssetPackWithIdentifier(path string, assetPackIdentifier string) (result int, err error)
FileDescriptorForPathSearchingInAssetPackWithIdentifier opens and returns a file descriptor for the asset file at the specified relative path.
func (*AssetPackManager) GetAllAssetPacks ¶ added in v0.17.0
GetAllAssetPacks gets the asset packs that are available to download.
GetAllAssetPacks blocks until the operation completes or ctx is cancelled.
func (*AssetPackManager) GetAssetPackWithIdentifier ¶ added in v0.17.0
func (apm *AssetPackManager) GetAssetPackWithIdentifier(ctx context.Context, assetPackIdentifier string) (result *AssetPack, err error)
GetAssetPackWithIdentifier gets the asset pack with the given identifier.
GetAssetPackWithIdentifier blocks until the operation completes or ctx is cancelled.
func (*AssetPackManager) GetLocalStatusOfAssetPackWithIdentifierCompletionHandler ¶ added in v0.18.0
func (apm *AssetPackManager) GetLocalStatusOfAssetPackWithIdentifierCompletionHandler(assetPackIdentifier string, completionHandler func(AssetPackStatus))
GetLocalStatusOfAssetPackWithIdentifierCompletionHandler gets an asset pack’s local status.
func (*AssetPackManager) GetLocallyAvailableLanguages ¶
func (apm *AssetPackManager) GetLocallyAvailableLanguages(ctx context.Context) (result obj.Object, err error)
GetLocallyAvailableLanguages gets the languages used by asset packs that are localized and are available locally.
GetLocallyAvailableLanguages blocks until the operation completes or ctx is cancelled.
func (*AssetPackManager) GetManifest ¶
func (apm *AssetPackManager) GetManifest(ctx context.Context) (result *AssetPackManifest, err error)
GetManifest gets the manifest of asset packs that are available to download.
GetManifest blocks until the operation completes or ctx is cancelled.
func (*AssetPackManager) GetStatusOfAssetPackWithIdentifierCompletionHandler ¶ added in v0.18.0
func (apm *AssetPackManager) GetStatusOfAssetPackWithIdentifierCompletionHandler(assetPackIdentifier string, completionHandler func(AssetPackStatus, unsafe.Pointer))
GetStatusOfAssetPackWithIdentifierCompletionHandler gets an asset pack’s status.
func (*AssetPackManager) GetStatusRelativeToAssetPackCompletionHandler ¶ added in v0.18.0
func (apm *AssetPackManager) GetStatusRelativeToAssetPackCompletionHandler(assetPack *AssetPack, completionHandler func(AssetPackStatus, unsafe.Pointer))
GetStatusRelativeToAssetPackCompletionHandler gets the current status relative to a particular asset pack.
func (*AssetPackManager) IsEqual ¶ added in v0.17.0
func (apm *AssetPackManager) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*AssetPackManager) IsKind ¶ added in v0.17.0
func (apm *AssetPackManager) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*AssetPackManager) ReconcilePreferredLanguages ¶
func (apm *AssetPackManager) ReconcilePreferredLanguages(ctx context.Context) error
ReconcilePreferredLanguages reconciles the set of locally available asset packs with the current preferred languages.
ReconcilePreferredLanguages blocks until the operation completes or ctx is cancelled.
func (*AssetPackManager) RemoveAssetPackWithIdentifier ¶ added in v0.17.0
func (apm *AssetPackManager) RemoveAssetPackWithIdentifier(ctx context.Context, assetPackIdentifier string) error
RemoveAssetPackWithIdentifier removes the specified asset pack from the device.
RemoveAssetPackWithIdentifier blocks until the operation completes or ctx is cancelled.
func (*AssetPackManager) ResolvedLanguage ¶
func (apm *AssetPackManager) ResolvedLanguage() string
ResolvedLanguage returns the language asset packs that are localized for which the system automatically makes available locally, represented as a BCP-47 identifier. The user’s preferred languages inform the choice of resolved language, respecting any language that your application sets manually. This property may be `nil` if no localized asset packs are available. You can manually set this property to `nil` to revert to the user’s system-wide language preference. If the user recently changed their preferred language, then this property’s value could be temporarily out of sync with the set of asset packs that are available locally. Setting the language doesn’t immediately download or remove any asset packs; call “BAAssetPackManager/reconcilePreferredLanguagesWithCompletionHandler:“ to reconcile the set of downloaded asset packs with the new configuration. Setting a new resolved language also changes your application’s display language. - Note: Don’t set this property to a new value within your downloader extension.
func (*AssetPackManager) String ¶ added in v0.17.0
func (apm *AssetPackManager) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*AssetPackManager) URLForPath ¶ added in v0.17.0
func (apm *AssetPackManager) URLForPath(path string) (result string, err error)
URLForPath returns a URL for the specified relative path.
func (*AssetPackManager) URLForPathAsLocalizedForLanguage ¶
func (apm *AssetPackManager) URLForPathAsLocalizedForLanguage(path string, languageIdentifier string) (result string, err error)
URLForPathAsLocalizedForLanguage returns a URL for the specified relative path.
func (*AssetPackManager) WithDelegate ¶ added in v0.17.0
func (apm *AssetPackManager) WithDelegate(delegate ManagedAssetPackDownloadDelegate) *AssetPackManager
WithDelegate sets an object that receives notifications about events that occur as an asset pack is downloaded.
func (*AssetPackManager) WithResolvedLanguage ¶
func (apm *AssetPackManager) WithResolvedLanguage(resolvedLanguage string) *AssetPackManager
WithResolvedLanguage sets the language asset packs that are localized for which the system automatically makes available locally, represented as a BCP-47 identifier.
type AssetPackManifest ¶ added in v0.17.0
AssetPackManifest is an idiomatic wrapper over the Objective-C class BAAssetPackManifest.
A manifest of asset packs that are available to download.
func AssetPackManifestFromID ¶ added in v0.17.0
func AssetPackManifestFromID(id objc.ID) *AssetPackManifest
AssetPackManifestFromID adopts an existing Objective-C object as a AssetPackManifest (nil for 0), retaining it and registering a release finalizer.
func NewAssetPackManifestFromDataApplicationGroupIdentifier ¶ added in v0.17.0
func NewAssetPackManifestFromDataApplicationGroupIdentifier(data []byte, applicationGroupIdentifier string) (result *AssetPackManifest, err error)
NewAssetPackManifestFromDataApplicationGroupIdentifier initializes a representation of a manifest in memory from JSON-encoded data.
func NewAssetPackManifestWithContentsOfURLApplicationGroupIdentifier ¶ added in v0.17.0
func NewAssetPackManifestWithContentsOfURLApplicationGroupIdentifier(url string, applicationGroupIdentifier string) (result *AssetPackManifest, err error)
NewAssetPackManifestWithContentsOfURLApplicationGroupIdentifier initializes a representation of a manifest in memory given a URL to the manifest’s representation as a JSON file on disk.
func (*AssetPackManifest) AllDownloads ¶ added in v0.17.0
func (apm *AssetPackManifest) AllDownloads() []*Download
AllDownloads creates download objects for every asset pack in this manifest. The order of the returned elements is unspecified.
func (*AssetPackManifest) AllDownloadsForContentRequest ¶ added in v0.17.0
func (apm *AssetPackManifest) AllDownloadsForContentRequest(contentRequest ContentRequest) []*Download
AllDownloadsForContentRequest creates download objects for every asset pack in this manifest. The order of the returned elements is unspecified.
func (*AssetPackManifest) AssetPackWithIdentifier ¶
func (apm *AssetPackManifest) AssetPackWithIdentifier(assetPackIdentifier string) *AssetPack
AssetPackWithIdentifier returns the asset pack in this manifest with the given identifier.
func (*AssetPackManifest) AssetPacks ¶ added in v0.17.0
func (apm *AssetPackManifest) AssetPacks() []*AssetPack
AssetPacks returns the asset packs in this manifest that are available to download. The order of the returned elements is unspecified.
func (*AssetPackManifest) AvailableLanguages ¶
func (apm *AssetPackManifest) AvailableLanguages() []string
AvailableLanguages returns the languages, represented as their respective BCP-47 identifiers, for which asset packs in this manifest are localized.
AvailableLanguages returns the collection as a Go slice.
func (*AssetPackManifest) Description ¶ added in v0.17.0
func (apm *AssetPackManifest) Description() string
Description returns the object's -description text.
func (*AssetPackManifest) IsEqual ¶ added in v0.17.0
func (apm *AssetPackManifest) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*AssetPackManifest) IsKind ¶ added in v0.17.0
func (apm *AssetPackManifest) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*AssetPackManifest) LocalizedAssetPacks ¶
func (apm *AssetPackManifest) LocalizedAssetPacks() []*AssetPack
LocalizedAssetPacks returns the subset of asset packs in this manifest that best match the current preferred languages. The order of the returned elements is unspecified.
func (*AssetPackManifest) LocalizedAssetPacksForLanguage ¶
func (apm *AssetPackManifest) LocalizedAssetPacksForLanguage(languageIdentifier string) []*AssetPack
LocalizedAssetPacksForLanguage returns the subset of asset packs in this manifest that are available to download and that best match the specified language. The order of the returned elements is unspecified.
func (*AssetPackManifest) PrimaryLanguage ¶
func (apm *AssetPackManifest) PrimaryLanguage() string
PrimaryLanguage returns the application’s primary language, represented as a BCP-47 identifier, as configured in App Store Connect. If no available localized asset packs match the current preferred languages, the system falls back on the application’s primary language.
func (*AssetPackManifest) ResolvedLanguage ¶
func (apm *AssetPackManifest) ResolvedLanguage() string
ResolvedLanguage returns the language, represented as a BCP-47 identifier, asset packs in this manifest that are localized for which the system automatically makes available locally. The user’s preferred languages inform the choice of resolved language, respecting any language that your application sets manually by setting “BAAssetPackManager/resolvedLanguage“. This property may be `nil` if no localized asset packs are available. If the user recently changed their preferred language or if this manifest is outdated, this property’s value may be out of sync with the set of asset packs available locally.
func (*AssetPackManifest) String ¶ added in v0.17.0
func (apm *AssetPackManifest) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
type AssetPackStatus ¶ added in v0.17.0
type AssetPackStatus uint64
The status of an asset pack. Bitmask — values may be combined with |.
const ( // A status value that indicates that the asset pack is available to download. AssetPackStatusDownloadAvailable AssetPackStatus = 1 // A status value that indicates that an update to the asset pack is available to download. AssetPackStatusUpdateAvailable AssetPackStatus = 2 // A status value that indicates that the downloaded asset pack is up to date. AssetPackStatusUpToDate AssetPackStatus = 4 // A status value that indicates that the downloaded asset pack is out of date. AssetPackStatusOutOfDate AssetPackStatus = 8 // A status value that indicates that the asset pack is no longer available to download. AssetPackStatusObsolete AssetPackStatus = 16 // A status value that indicates that the system is currently downloading the asset pack. AssetPackStatusDownloading AssetPackStatus = 32 // A status value that indicates that the system finished downloading the asset pack. AssetPackStatusDownloaded AssetPackStatus = 64 )
func (AssetPackStatus) String ¶ added in v0.17.0
func (e AssetPackStatus) String() string
String returns the AssetPackStatus constant's name, or its numeric form when the value is not a known constant.
type ContentRequest ¶ added in v0.17.0
type ContentRequest int64
A type that indicates the purpose of a content download request.
const ( // A content request resulting from the installation of the app. ContentRequestInstall ContentRequest = 1 // A content request resulting from an update of the app. ContentRequestUpdate ContentRequest = 2 // A content request resulting from a system request for updated content within the app. ContentRequestPeriodic ContentRequest = 3 // A content request resulting from someone changing the app’s preferred language. ContentRequestLanguageChange ContentRequest = 4 )
func (ContentRequest) String ¶ added in v0.17.0
func (e ContentRequest) String() string
String returns the ContentRequest constant's name, or its numeric form when the value is not a known constant.
type DispatchAutoreleaseFrequency ¶ added in v0.17.0
type DispatchAutoreleaseFrequency uint64
const ( DispatchAutoreleaseFrequencyInherit DispatchAutoreleaseFrequency = 0 DispatchAutoreleaseFrequencyWorkItem DispatchAutoreleaseFrequency = 1 DispatchAutoreleaseFrequencyNever DispatchAutoreleaseFrequency = 2 )
func (DispatchAutoreleaseFrequency) String ¶ added in v0.17.0
func (e DispatchAutoreleaseFrequency) String() string
String returns the DispatchAutoreleaseFrequency constant's name, or its numeric form when the value is not a known constant.
type DispatchBlockFlags ¶ added in v0.17.0
type DispatchBlockFlags uint64
Bitmask — values may be combined with |.
const ( DispatchBlockFlagsBarrier DispatchBlockFlags = 1 DispatchBlockFlagsDetached DispatchBlockFlags = 2 DispatchBlockFlagsAssignCurrent DispatchBlockFlags = 4 DispatchBlockFlagsNoQosClass DispatchBlockFlags = 8 DispatchBlockFlagsInheritQosClass DispatchBlockFlags = 16 DispatchBlockFlagsEnforceQosClass DispatchBlockFlags = 32 )
func (DispatchBlockFlags) String ¶ added in v0.17.0
func (e DispatchBlockFlags) String() string
String returns the DispatchBlockFlags constant's name, or its numeric form when the value is not a known constant.
type Download ¶ added in v0.17.0
Download is an idiomatic wrapper over the Objective-C class BADownload.
Download is an abstract base — you do not construct it directly. Construct one of URLDownload and pass it where a Download is accepted.
An object that represents an in-progress or concluded asset download.
func DownloadFromID ¶ added in v0.17.0
DownloadFromID adopts an existing Objective-C object as a Download (nil for 0), retaining it and registering a release finalizer.
func (*Download) CopyAsNonEssential ¶ added in v0.17.0
CopyAsNonEssential returns copies an existing download ensuring that it has `isEssential == false`. This serves as a convenience method for constructing a non-essential representation of an existing download. It is important to note that essential downloads can only be enqueued by the app extension during a content request. If an essential download fails, `copyAsNonEssential` can be used to create a copy with `isEssential == false` that can be re-queued with `BADownloadManager`.
func (*Download) Description ¶ added in v0.17.0
Description returns the object's -description text.
func (*Download) Identifier ¶ added in v0.17.0
Identifier returns a client defined identifier that uniquely identifies this asset.
func (*Download) IsEqual ¶ added in v0.17.0
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*Download) IsEssential ¶ added in v0.17.0
IsEssential reports whether this download is essential. Essential downloads will occur while the app is being installed. Users cannot launch the app while these downloads are occurring. Essential downloads cannot be scheduled with `BADownloadManager`, they may only be scheduled from the extension with a `BAContentRequest` type of `Update` or `Install`. Essential downloads must have an accurate `fileSize` or they will fail.
func (*Download) IsKind ¶ added in v0.17.0
IsKind reports whether the object is an instance of the named class or a subclass.
func (*Download) Priority ¶ added in v0.17.0
Priority returns a client set priority to try to order downloads in order of importance
func (*Download) State ¶ added in v0.17.0
func (d *Download) State() DownloadState
State returns the current state of the respresented download.
func (*Download) String ¶ added in v0.17.0
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*Download) UniqueIdentifier ¶ added in v0.17.0
UniqueIdentifier returns a UUID that uniquely identifies the download object.
type DownloadManager ¶ added in v0.17.0
DownloadManager is an idiomatic wrapper over the Objective-C class BADownloadManager.
An object that manages the queue of scheduled asset downloads.
func BADownloadManagerSharedManager ¶
func BADownloadManagerSharedManager() *DownloadManager
BADownloadManagerSharedManager gets the singleton downloader object.
func DownloadManagerFromID ¶ added in v0.17.0
func DownloadManagerFromID(id objc.ID) *DownloadManager
DownloadManagerFromID adopts an existing Objective-C object as a DownloadManager (nil for 0), retaining it and registering a release finalizer.
func NewDownloadManager ¶ added in v0.17.0
func NewDownloadManager() *DownloadManager
NewDownloadManager creates a new DownloadManager.
func (*DownloadManager) CancelDownload ¶ added in v0.17.0
func (dm *DownloadManager) CancelDownload(download *Download) error
CancelDownload cancels an asset download.
func (*DownloadManager) Description ¶ added in v0.17.0
func (dm *DownloadManager) Description() string
Description returns the object's -description text.
func (*DownloadManager) FetchCurrentDownloads ¶ added in v0.17.0
func (dm *DownloadManager) FetchCurrentDownloads() (result []*Download, err error)
FetchCurrentDownloads returns fetches current downloads. Fetches the current list of scheduled or in-flight downloads queued by your application or extension.
FetchCurrentDownloads returns the collection as a Go slice.
func (*DownloadManager) IsEqual ¶ added in v0.17.0
func (dm *DownloadManager) IsEqual(other obj.Object) bool
IsEqual reports Objective-C equality (isEqual:) with another object.
func (*DownloadManager) IsKind ¶ added in v0.17.0
func (dm *DownloadManager) IsKind(className string) bool
IsKind reports whether the object is an instance of the named class or a subclass.
func (*DownloadManager) PerformWithExclusiveControl ¶ added in v0.18.0
func (dm *DownloadManager) PerformWithExclusiveControl(performHandler func(bool, unsafe.Pointer))
PerformWithExclusiveControl acquires exclusive access to the BADownloadManager across the app and application extension. 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.
func (*DownloadManager) PerformWithExclusiveControlBeforeDatePerformHandler ¶ added in v0.18.0
func (dm *DownloadManager) PerformWithExclusiveControlBeforeDatePerformHandler(date time.Time, performHandler func(bool, unsafe.Pointer))
PerformWithExclusiveControlBeforeDatePerformHandler acquires exclusive access to the BADownloadManager across the app and application extension. 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.
func (*DownloadManager) ScheduleDownload ¶ added in v0.17.0
func (dm *DownloadManager) ScheduleDownload(download *Download) error
ScheduleDownload schedules an asset download to execute in the background at a nonspecific time in the future.
func (*DownloadManager) StartForegroundDownload ¶ added in v0.17.0
func (dm *DownloadManager) StartForegroundDownload(download *Download) error
StartForegroundDownload schedules an asset download that executes immediately in the foreground.
func (*DownloadManager) String ¶ added in v0.17.0
func (dm *DownloadManager) String() string
String returns the object's -description text, so a wrapper prints usefully under fmt.
func (*DownloadManager) WithDelegate ¶ added in v0.17.0
func (dm *DownloadManager) WithDelegate(delegate DownloadManagerDelegate) *DownloadManager
WithDelegate sets the download manager’s delegate.
type DownloadManagerDelegate ¶ added in v0.17.0
type DownloadManagerDelegate interface {
}
DownloadManagerDelegate receives the callbacks of the Objective-C protocol BADownloadManagerDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (DownloadManagerDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type DownloadManagerDelegateDownloadDidBeginHandler ¶ added in v0.17.0
type DownloadManagerDelegateDownloadDidBeginHandler interface {
DownloadDidBegin(download *Download)
}
DownloadManagerDelegateDownloadDidBeginHandler is the optional BADownloadManagerDelegate method downloadDidBegin:. Implement it on a DownloadManagerDelegate value to receive that callback; a value without it is simply never sent one.
type DownloadManagerDelegateDownloadDidPauseHandler ¶ added in v0.17.0
type DownloadManagerDelegateDownloadDidPauseHandler interface {
DownloadDidPause(download *Download)
}
DownloadManagerDelegateDownloadDidPauseHandler is the optional BADownloadManagerDelegate method downloadDidPause:. Implement it on a DownloadManagerDelegate value to receive that callback; a value without it is simply never sent one.
type DownloadManagerDelegateDownloadDidWriteBytesTotalBytesWrittenTotalBytesExpectedToWriteHandler ¶ added in v0.17.0
type DownloadManagerDelegateDownloadDidWriteBytesTotalBytesWrittenTotalBytesExpectedToWriteHandler interface {
DownloadDidWriteBytesTotalBytesWrittenTotalBytesExpectedToWrite(download *Download, bytesWritten int64, totalBytesWritten int64, totalExpectedBytes int64)
}
DownloadManagerDelegateDownloadDidWriteBytesTotalBytesWrittenTotalBytesExpectedToWriteHandler is the optional BADownloadManagerDelegate method download:didWriteBytes:totalBytesWritten:totalBytesExpectedToWrite:. Implement it on a DownloadManagerDelegate value to receive that callback; a value without it is simply never sent one.
type DownloadManagerDelegateDownloadFailedWithErrorHandler ¶ added in v0.17.0
type DownloadManagerDelegateDownloadFailedWithErrorHandler interface {
DownloadFailedWithError(download *Download, err error)
}
DownloadManagerDelegateDownloadFailedWithErrorHandler is the optional BADownloadManagerDelegate method download:failedWithError:. Implement it on a DownloadManagerDelegate value to receive that callback; a value without it is simply never sent one.
type DownloadManagerDelegateDownloadFinishedWithFileURLHandler ¶ added in v0.17.0
type DownloadManagerDelegateDownloadFinishedWithFileURLHandler interface {
DownloadFinishedWithFileURL(download *Download, fileURL string)
}
DownloadManagerDelegateDownloadFinishedWithFileURLHandler is the optional BADownloadManagerDelegate method download:finishedWithFileURL:. Implement it on a DownloadManagerDelegate value to receive that callback; a value without it is simply never sent one.
type DownloadProvider ¶ added in v0.17.0
DownloadProvider is accepted wherever a BADownload (or one of its subclasses) is expected.
type DownloadState ¶ added in v0.17.0
type DownloadState int64
const ( DownloadStateFailed DownloadState = -1 DownloadStateCreated DownloadState = 0 DownloadStateWaiting DownloadState = 1 DownloadStateDownloading DownloadState = 2 DownloadStateFinished DownloadState = 3 )
func (DownloadState) String ¶ added in v0.17.0
func (e DownloadState) String() string
String returns the DownloadState constant's name, or its numeric form when the value is not a known constant.
type DownloaderExtension ¶ added in v0.17.0
type DownloaderExtension interface {
}
DownloaderExtension is the Go form of the Objective-C protocol BADownloaderExtension.
type ErrorCode ¶ added in v0.17.0
type ErrorCode int64
const ( ErrorCodeDownloadInvalid ErrorCode = 0 ErrorCodeCallFromExtensionNotAllowed ErrorCode = 50 ErrorCodeCallFromInactiveProcessNotAllowed ErrorCode = 51 ErrorCodeCallerConnectionNotAccepted ErrorCode = 55 ErrorCodeCallerConnectionInvalid ErrorCode = 56 ErrorCodeDownloadAlreadyScheduled ErrorCode = 100 ErrorCodeDownloadNotScheduled ErrorCode = 101 ErrorCodeDownloadFailedToStart ErrorCode = 102 ErrorCodeDownloadAlreadyFailed ErrorCode = 103 ErrorCodeDownloadEssentialDownloadNotPermitted ErrorCode = 109 ErrorCodeDownloadBackgroundActivityProhibited ErrorCode = 111 ErrorCodeDownloadWouldExceedAllowance ErrorCode = 112 ErrorCodeDownloadDoesNotExist ErrorCode = 113 ErrorCodeSessionDownloadDisallowedByDomain ErrorCode = 202 ErrorCodeSessionDownloadDisallowedByAllowance ErrorCode = 203 ErrorCodeSessionDownloadAllowanceExceeded ErrorCode = 204 ErrorCodeSessionDownloadNotPermittedBeforeAppLaunch ErrorCode = 206 )
type FilesecProperty ¶ added in v0.17.0
type FilesecProperty int32
const ( FilesecPropertyOwner FilesecProperty = 1 FilesecPropertyGroup FilesecProperty = 2 FilesecPropertyUUID FilesecProperty = 3 FilesecPropertyMode FilesecProperty = 4 FilesecPropertyACL FilesecProperty = 5 FilesecPropertyGrpuuid FilesecProperty = 6 FilesecPropertyACLRaw FilesecProperty = 100 FilesecPropertyACLAllocsize FilesecProperty = 101 )
func (FilesecProperty) String ¶ added in v0.17.0
func (e FilesecProperty) String() string
String returns the FilesecProperty constant's name, or its numeric form when the value is not a known constant.
type IpcInfoObjectType ¶ added in v0.17.0
type IpcInfoObjectType uint32
const ( IpcInfoObjectTypeNone IpcInfoObjectType = 0 IpcInfoObjectTypeThreadControl IpcInfoObjectType = 1 IpcInfoObjectTypeTaskControl IpcInfoObjectType = 2 IpcInfoObjectTypeHost IpcInfoObjectType = 3 IpcInfoObjectTypeHostPriv IpcInfoObjectType = 4 IpcInfoObjectTypeProcessor IpcInfoObjectType = 5 IpcInfoObjectTypeProcessorSet IpcInfoObjectType = 6 IpcInfoObjectTypeProcessorSetName IpcInfoObjectType = 7 IpcInfoObjectTypeTimer IpcInfoObjectType = 8 IpcInfoObjectTypePortSubstOnce IpcInfoObjectType = 9 IpcInfoObjectTypeMig IpcInfoObjectType = 10 IpcInfoObjectTypeMemoryObject IpcInfoObjectType = 11 IpcInfoObjectTypeXmmPager IpcInfoObjectType = 12 IpcInfoObjectTypeXmmKernel IpcInfoObjectType = 13 IpcInfoObjectTypeXmmReply IpcInfoObjectType = 14 IpcInfoObjectTypeUndReply IpcInfoObjectType = 15 IpcInfoObjectTypeHostNotify IpcInfoObjectType = 16 IpcInfoObjectTypeHostSecurity IpcInfoObjectType = 17 IpcInfoObjectTypeLedger IpcInfoObjectType = 18 IpcInfoObjectTypeMainDevice IpcInfoObjectType = 19 IpcInfoObjectTypeTaskName IpcInfoObjectType = 20 IpcInfoObjectTypeSubsystem IpcInfoObjectType = 21 IpcInfoObjectTypeIODoneQueue IpcInfoObjectType = 22 IpcInfoObjectTypeSemaphore IpcInfoObjectType = 23 IpcInfoObjectTypeLockSet IpcInfoObjectType = 24 IpcInfoObjectTypeClock IpcInfoObjectType = 25 IpcInfoObjectTypeClockCtrl IpcInfoObjectType = 26 IpcInfoObjectTypeIokitIdent IpcInfoObjectType = 27 IpcInfoObjectTypeNamedEntry IpcInfoObjectType = 28 IpcInfoObjectTypeIokitConnect IpcInfoObjectType = 29 IpcInfoObjectTypeIokitObject IpcInfoObjectType = 30 IpcInfoObjectTypeUpl IpcInfoObjectType = 31 IpcInfoObjectTypeMemObjControl IpcInfoObjectType = 32 IpcInfoObjectTypeAuSessionport IpcInfoObjectType = 33 IpcInfoObjectTypeFileport IpcInfoObjectType = 34 IpcInfoObjectTypeLabelh IpcInfoObjectType = 35 IpcInfoObjectTypeTaskResume IpcInfoObjectType = 36 IpcInfoObjectTypeVoucher IpcInfoObjectType = 37 IpcInfoObjectTypeVoucherAttrControl IpcInfoObjectType = 38 IpcInfoObjectTypeWorkInterval IpcInfoObjectType = 39 IpcInfoObjectTypeUxHandler IpcInfoObjectType = 40 IpcInfoObjectTypeUextObject IpcInfoObjectType = 41 IpcInfoObjectTypeArcadeReg IpcInfoObjectType = 42 IpcInfoObjectTypeEventlink IpcInfoObjectType = 43 IpcInfoObjectTypeTaskInspect IpcInfoObjectType = 44 IpcInfoObjectTypeTaskRead IpcInfoObjectType = 45 IpcInfoObjectTypeThreadInspect IpcInfoObjectType = 46 IpcInfoObjectTypeThreadRead IpcInfoObjectType = 47 IpcInfoObjectTypeSuidCred IpcInfoObjectType = 48 IpcInfoObjectTypeHypervisor IpcInfoObjectType = 49 IpcInfoObjectTypeTaskIDToken IpcInfoObjectType = 50 IpcInfoObjectTypeTaskFatal IpcInfoObjectType = 51 IpcInfoObjectTypeKcdata IpcInfoObjectType = 52 IpcInfoObjectTypeExclavesResource IpcInfoObjectType = 53 IpcInfoObjectTypeThreadResume IpcInfoObjectType = 54 IpcInfoObjectTypeUnknown IpcInfoObjectType = 4294967295 )
func (IpcInfoObjectType) String ¶ added in v0.17.0
func (e IpcInfoObjectType) String() string
String returns the IpcInfoObjectType constant's name, or its numeric form when the value is not a known constant.
type LaunchDataType ¶ added in v0.17.0
type LaunchDataType int32
const ( LaunchDataTypeDictionary LaunchDataType = 1 LaunchDataTypeArray LaunchDataType = 2 LaunchDataTypeFd LaunchDataType = 3 LaunchDataTypeInteger LaunchDataType = 4 LaunchDataTypeReal LaunchDataType = 5 LaunchDataTypeBool LaunchDataType = 6 LaunchDataTypeString LaunchDataType = 7 LaunchDataTypeOpaque LaunchDataType = 8 LaunchDataTypeErrno LaunchDataType = 9 LaunchDataTypeMachport LaunchDataType = 10 )
func (LaunchDataType) String ¶ added in v0.17.0
func (e LaunchDataType) String() string
String returns the LaunchDataType constant's name, or its numeric form when the value is not a known constant.
type MDLabelDomain ¶
type MDLabelDomain int32
These constants are used to specify a domain to MDLabelCreate().
const ( KMDLabelUserDomain MDLabelDomain = 0 KMDLabelLocalDomain MDLabelDomain = 1 )
func (MDLabelDomain) String ¶
func (e MDLabelDomain) String() string
String returns the MDLabelDomain constant's name, or its numeric form when the value is not a known constant.
type MDQueryOptionFlags ¶
type MDQueryOptionFlags int32
const ( KMDQuerySynchronous MDQueryOptionFlags = 1 KMDQueryWantsUpdates MDQueryOptionFlags = 4 KMDQueryAllowFSTranslation MDQueryOptionFlags = 8 )
func (MDQueryOptionFlags) String ¶
func (e MDQueryOptionFlags) String() string
String returns the MDQueryOptionFlags constant's name, or its numeric form when the value is not a known constant.
type MDQuerySortOptionFlags ¶
type MDQuerySortOptionFlags int32
const (
KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)
func (MDQuerySortOptionFlags) String ¶
func (e MDQuerySortOptionFlags) String() string
String returns the MDQuerySortOptionFlags constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeFlags ¶ added in v0.17.0
type MachVMRangeFlags uint64
Bitmask — values may be combined with |.
const (
MachVMRangeFlagsNone MachVMRangeFlags = 0
)
func (MachVMRangeFlags) String ¶ added in v0.17.0
func (e MachVMRangeFlags) String() string
String returns the MachVMRangeFlags constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeFlavor ¶ added in v0.17.0
type MachVMRangeFlavor uint32
const ( MachVMRangeFlavorInvalid MachVMRangeFlavor = 0 MachVMRangeFlavorV1 MachVMRangeFlavor = 1 )
func (MachVMRangeFlavor) String ¶ added in v0.17.0
func (e MachVMRangeFlavor) String() string
String returns the MachVMRangeFlavor constant's name, or its numeric form when the value is not a known constant.
type MachVMRangeTag ¶ added in v0.17.0
type MachVMRangeTag uint16
const ( MachVMRangeTagDefault MachVMRangeTag = 0 MachVMRangeTagData MachVMRangeTag = 1 MachVMRangeTagFixed MachVMRangeTag = 2 )
func (MachVMRangeTag) String ¶ added in v0.17.0
func (e MachVMRangeTag) String() string
String returns the MachVMRangeTag constant's name, or its numeric form when the value is not a known constant.
type ManagedAssetPackDownloadDelegate ¶ added in v0.17.0
type ManagedAssetPackDownloadDelegate interface {
}
ManagedAssetPackDownloadDelegate receives the callbacks of the Objective-C protocol BAManagedAssetPackDownloadDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (ManagedAssetPackDownloadDelegate…Handler): implement the ones you need on the same value and the framework will call them too.
type ManagedAssetPackDownloadDelegateDownloadOfAssetPackBeganHandler ¶ added in v0.17.0
type ManagedAssetPackDownloadDelegateDownloadOfAssetPackBeganHandler interface {
DownloadOfAssetPackBegan(assetPack *AssetPack)
}
ManagedAssetPackDownloadDelegateDownloadOfAssetPackBeganHandler is the optional BAManagedAssetPackDownloadDelegate method downloadOfAssetPackBegan:. Implement it on a ManagedAssetPackDownloadDelegate value to receive that callback; a value without it is simply never sent one.
type ManagedAssetPackDownloadDelegateDownloadOfAssetPackFailedWithErrorHandler ¶ added in v0.17.0
type ManagedAssetPackDownloadDelegateDownloadOfAssetPackFailedWithErrorHandler interface {
DownloadOfAssetPackFailedWithError(assetPack *AssetPack, err error)
}
ManagedAssetPackDownloadDelegateDownloadOfAssetPackFailedWithErrorHandler is the optional BAManagedAssetPackDownloadDelegate method downloadOfAssetPack:failedWithError:. Implement it on a ManagedAssetPackDownloadDelegate value to receive that callback; a value without it is simply never sent one.
type ManagedAssetPackDownloadDelegateDownloadOfAssetPackFinishedHandler ¶ added in v0.17.0
type ManagedAssetPackDownloadDelegateDownloadOfAssetPackFinishedHandler interface {
DownloadOfAssetPackFinished(assetPack *AssetPack)
}
ManagedAssetPackDownloadDelegateDownloadOfAssetPackFinishedHandler is the optional BAManagedAssetPackDownloadDelegate method downloadOfAssetPackFinished:. Implement it on a ManagedAssetPackDownloadDelegate value to receive that callback; a value without it is simply never sent one.
type ManagedAssetPackDownloadDelegateDownloadOfAssetPackHasProgressHandler ¶ added in v0.17.0
type ManagedAssetPackDownloadDelegateDownloadOfAssetPackHasProgressHandler interface {
DownloadOfAssetPackHasProgress(assetPack *AssetPack, progress obj.Object)
}
ManagedAssetPackDownloadDelegateDownloadOfAssetPackHasProgressHandler is the optional BAManagedAssetPackDownloadDelegate method downloadOfAssetPack:hasProgress:. Implement it on a ManagedAssetPackDownloadDelegate value to receive that callback; a value without it is simply never sent one.
type ManagedAssetPackDownloadDelegateDownloadOfAssetPackPausedHandler ¶ added in v0.17.0
type ManagedAssetPackDownloadDelegateDownloadOfAssetPackPausedHandler interface {
DownloadOfAssetPackPaused(assetPack *AssetPack)
}
ManagedAssetPackDownloadDelegateDownloadOfAssetPackPausedHandler is the optional BAManagedAssetPackDownloadDelegate method downloadOfAssetPackPaused:. Implement it on a ManagedAssetPackDownloadDelegate value to receive that callback; a value without it is simply never sent one.
type ManagedDownloaderExtension ¶ added in v0.17.0
type ManagedDownloaderExtension interface {
}
ManagedDownloaderExtension is the Go form of the Objective-C protocol BAManagedDownloaderExtension.
type ManagedErrorCode ¶ added in v0.17.0
type ManagedErrorCode int64
An error code for a managed asset pack.
const ( // An error code that indicates the system couldn’t find an asset pack with the given identifier. ManagedErrorCodeAssetPackNotFound ManagedErrorCode = 0 // An error code that indicates the system couldn’t find a file at the specified path. ManagedErrorCodeFileNotFound ManagedErrorCode = 1 // An error code that indicates that the system couldn’t ensure the local availability of some or all of the requested asset packs. ManagedErrorCodeLocalAvailabilityFailure ManagedErrorCode = 2 )
func (ManagedErrorCode) String ¶ added in v0.17.0
func (e ManagedErrorCode) String() string
String returns the ManagedErrorCode constant's name, or its numeric form when the value is not a known constant.
type MpoFlags ¶ added in v0.17.0
type MpoFlags uint32
Bitmask — values may be combined with |.
const ( MpoFlagsPort MpoFlags = 0 MpoFlagsServicePort MpoFlags = 1024 MpoFlagsConnectionPort MpoFlags = 2048 MpoFlagsReplyPort MpoFlags = 4096 MpoFlagsWeakReplyPort MpoFlags = 16384 MpoFlagsNotificationPort MpoFlags = 17408 MpoFlagsExceptionPort MpoFlags = 32768 MpoFlagsConnectionPortWithPortArray MpoFlags = 65536 )
type Perm ¶ added in v0.17.0
type Perm int32
const ( PermReadData Perm = 2 PermListDirectory Perm = 2 PermWriteData Perm = 4 PermAddFile Perm = 4 PermExecute Perm = 8 PermSearch Perm = 8 PermDelete Perm = 16 PermAppendData Perm = 32 PermAddSubdirectory Perm = 32 PermDeleteChild Perm = 64 PermReadAttributes Perm = 128 PermWriteAttributes Perm = 256 PermReadExtattributes Perm = 512 PermWriteExtattributes Perm = 1024 PermReadSecurity Perm = 2048 PermWriteSecurity Perm = 4096 PermChangeOwner Perm = 8192 PermSynchronize Perm = 1048576 )
type PtrauthKey ¶ added in v0.17.0
type PtrauthKey int32
const ( Ptrauth_key_none PtrauthKey = -1 Ptrauth_key_asia PtrauthKey = 0 Ptrauth_key_asib PtrauthKey = 1 Ptrauth_key_asda PtrauthKey = 2 Ptrauth_key_asdb PtrauthKey = 3 Ptrauth_key_process_independent_code PtrauthKey = 0 Ptrauth_key_process_dependent_code PtrauthKey = 1 Ptrauth_key_process_independent_data PtrauthKey = 2 Ptrauth_key_process_dependent_data PtrauthKey = 3 Ptrauth_key_return_address PtrauthKey = 1 Ptrauth_key_frame_pointer PtrauthKey = 3 Ptrauth_key_function_pointer PtrauthKey = 0 Ptrauth_key_block_function PtrauthKey = 0 Ptrauth_key_cxx_vtable_pointer PtrauthKey = 2 Ptrauth_key_method_list_pointer PtrauthKey = 2 Ptrauth_key_objc_isa_pointer PtrauthKey = 2 Ptrauth_key_objc_super_pointer PtrauthKey = 2 Ptrauth_key_objc_sel_pointer PtrauthKey = 3 Ptrauth_key_objc_class_ro_pointer PtrauthKey = 2 Ptrauth_key_block_descriptor_pointer PtrauthKey = 2 Ptrauth_key_init_fini_pointer PtrauthKey = 0 )
func (PtrauthKey) String ¶ added in v0.17.0
func (e PtrauthKey) String() string
String returns the PtrauthKey constant's name, or its numeric form when the value is not a known constant.
type TaskSharedRegionStubs ¶
type TaskSharedRegionStubs uint8
const ( )
func (TaskSharedRegionStubs) String ¶
func (e TaskSharedRegionStubs) String() string
String returns the TaskSharedRegionStubs constant's name, or its numeric form when the value is not a known constant.
type URLDownload ¶ added in v0.17.0
type URLDownload struct {
Download
}
URLDownload is an idiomatic wrapper over the Objective-C class BAURLDownload.
It embeds Download, promoting that type's methods.
An object that represents a remote asset to download.
func NewURLDownloadWithIdentifierRequestApplicationGroupIdentifier ¶ added in v0.17.0
func NewURLDownloadWithIdentifierRequestApplicationGroupIdentifier(identifier string, request obj.Object, applicationGroupIdentifier string) *URLDownload
NewURLDownloadWithIdentifierRequestApplicationGroupIdentifier creates a download that uses the specified identifier and App Group.
func NewURLDownloadWithIdentifierRequestApplicationGroupIdentifierPriority ¶ added in v0.17.0
func NewURLDownloadWithIdentifierRequestApplicationGroupIdentifierPriority(identifier string, request obj.Object, applicationGroupIdentifier string, priority int) *URLDownload
NewURLDownloadWithIdentifierRequestApplicationGroupIdentifierPriority creates a prioritized download that uses the specified identifier and App Group.
func NewURLDownloadWithIdentifierRequestEssentialFileSizeApplicationGroupIdentifierPriority ¶ added in v0.17.0
func NewURLDownloadWithIdentifierRequestEssentialFileSizeApplicationGroupIdentifierPriority(identifier string, request obj.Object, essential bool, fileSize int, applicationGroupIdentifier string, priority int) *URLDownload
NewURLDownloadWithIdentifierRequestEssentialFileSizeApplicationGroupIdentifierPriority constructs a download object to represent the download of a asset located inside of the provided
func NewURLDownloadWithIdentifierRequestFileSizeApplicationGroupIdentifier ¶ added in v0.17.0
func NewURLDownloadWithIdentifierRequestFileSizeApplicationGroupIdentifier(identifier string, request obj.Object, fileSize int, applicationGroupIdentifier string) *URLDownload
NewURLDownloadWithIdentifierRequestFileSizeApplicationGroupIdentifier constructs a download object to represent the download of a asset located inside of the provided
func URLDownloadFromID ¶ added in v0.17.0
func URLDownloadFromID(id objc.ID) *URLDownload
URLDownloadFromID adopts an existing Objective-C object as a URLDownload (nil for 0), retaining it and registering a release finalizer.
type VirtualMemoryGuardExceptionCode ¶ added in v0.17.0
type VirtualMemoryGuardExceptionCode uint32
const ( KGUARD_EXC_DEALLOC_GAP VirtualMemoryGuardExceptionCode = 1 KGUARD_EXC_RECLAIM_COPYIO_FAILURE VirtualMemoryGuardExceptionCode = 2 KGUARD_EXC_RECLAIM_INDEX_FAILURE VirtualMemoryGuardExceptionCode = 4 KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE VirtualMemoryGuardExceptionCode = 8 KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE VirtualMemoryGuardExceptionCode = 9 KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE VirtualMemoryGuardExceptionCode = 10 KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE VirtualMemoryGuardExceptionCode = 11 KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION VirtualMemoryGuardExceptionCode = 12 // Guard exception sent to a thread when a CoW defeatured map attempts to copy memory which is not permitted by system policy. KGUARD_EXC_COW_DEFEATURED_COPY_DENIED VirtualMemoryGuardExceptionCode = 13 // Guard exception sent to a thread when it attempts to extract a given type of memory in a way which is not permitted for CoW defeatured maps. KGUARD_EXC_COW_DEFEATURED_EXTRACT_DENIED VirtualMemoryGuardExceptionCode = 14 // Guard exception sent to a thread when it attempts to copy-map a memory entry which was created for sharing by a CoW defeatured map. KGUARD_EXC_COW_DEFEATURED_SHARE_MAP_AS_COPY_DENIED VirtualMemoryGuardExceptionCode = 15 KGUARD_EXC_COW_DEFEATURED_FIRST VirtualMemoryGuardExceptionCode = 13 KGUARD_EXC_COW_DEFEATURED_LAST VirtualMemoryGuardExceptionCode = 15 KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY VirtualMemoryGuardExceptionCode = 16 KGUARD_EXC_SEC_ACCESS_FAULT VirtualMemoryGuardExceptionCode = 98 KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT VirtualMemoryGuardExceptionCode = 99 KGUARD_EXC_SEC_COPY_DENIED VirtualMemoryGuardExceptionCode = 100 KGUARD_EXC_SEC_SHARING_DENIED VirtualMemoryGuardExceptionCode = 101 KGUARD_EXC_MTE_SYNC_FAULT VirtualMemoryGuardExceptionCode = 200 KGUARD_EXC_MTE_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 201 KGUARD_EXC_MTE_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 202 KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 203 KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 204 )
func (VirtualMemoryGuardExceptionCode) String ¶ added in v0.17.0
func (e VirtualMemoryGuardExceptionCode) String() string
String returns the VirtualMemoryGuardExceptionCode constant's name, or its numeric form when the value is not a known constant.
type XpcListenerCreateFlags ¶ added in v0.17.0
type XpcListenerCreateFlags uint64
Bitmask — values may be combined with |.
const ( XpcListenerCreateFlagsNone XpcListenerCreateFlags = 0 XpcListenerCreateFlagsInactive XpcListenerCreateFlags = 1 XpcListenerCreateFlagsForceMach XpcListenerCreateFlags = 2 XpcListenerCreateFlagsForceXpcservice XpcListenerCreateFlags = 4 )
func (XpcListenerCreateFlags) String ¶ added in v0.17.0
func (e XpcListenerCreateFlags) String() string
String returns the XpcListenerCreateFlags constant's name, or its numeric form when the value is not a known constant.
type XpcSessionCreateFlags ¶ added in v0.17.0
type XpcSessionCreateFlags uint64
Bitmask — values may be combined with |.
const ( XpcSessionCreateFlagsNone XpcSessionCreateFlags = 0 XpcSessionCreateFlagsInactive XpcSessionCreateFlags = 1 XpcSessionCreateFlagsMachPrivileged XpcSessionCreateFlags = 2 )
func (XpcSessionCreateFlags) String ¶ added in v0.17.0
func (e XpcSessionCreateFlags) String() string
String returns the XpcSessionCreateFlags constant's name, or its numeric form when the value is not a known constant.
Source Files
¶
- BAAppExtensionInfo_generated.go
- BAAssetPackManager_generated.go
- BAAssetPackManifest_generated.go
- BAAssetPack_generated.go
- BADownloadManagerDelegate_delegate_generated.go
- BADownloadManager_generated.go
- BADownload_generated.go
- BAManagedAssetPackDownloadDelegate_delegate_generated.go
- BAURLDownload_generated.go
- backgroundassets_classmethods_generated.go
- backgroundassets_constants_generated.go
- backgroundassets_enums_generated.go
- backgroundassets_errors_generated.go
- backgroundassets_protocols_generated.go
- backgroundassets_providers_generated.go
- backgroundassets_runtime_generated.go
- doc.go