Background Assets: Download BAManifestDownload rejected as we are out of download allowance

316 views Asked by At

Background Asset Session: https://developer.apple.com/videos/play/wwdc2022/110403

I create a new project after watching the session. And i add the following in the info.plist:

  • BAMaxInstallSize: 1024000

  • BAManifestURL: https://***.com

  • BAInitialDownloadRestrictions : Dictionary

    • BADownloadAllowance: 1024000

    • BADownloadDomainAllowList : Array

      • *.***.com

But when i debug the extension with this command: xcrun backgroundassets-debug -s --app-install -b com.***.BADemo1 -d xxxxxxx , i get some error in conslog.app:

Download BAManifestDownload  - com.***.BADemo1.Manifest-xx rejected as we are out of download allowance.

Download did fail: BAManifestDownload  - com.***.BADemo1.Manifest-xx with error: Error Domain=com.apple.backgroundassets.error Code=203 "The requested download will not be allowed due to running out of download allowance." UserInfo={NSLocalizedFailureReason=The requested download will not be allowed due to running out of download allowance.}

Rejecting launching extension for <private> because it has already run too long.

how i can fix this problem?

1

There are 1 answers

0
iroh On

You provided BADownloadAllowance value as 128kB. Try to provide more value (like 10MB)to this key.

As per apple document ,system tries to download contents in ManifestURL. and manifest download fails due to less allowance

The system will pre-download the contents of the URL specified in the BAManifestURL key in your app's Info.plist before calling into your extension. The manifestURL argument will point to a read-only file containing those contents. You are encouraged to use this file to determine what assets need to be downloaded.