The requested URL is not permitted to be downloaded until the application is launched error in background assets

Hi , i tried to download image using background assets framework. I tried to use install and update events to test the extension. But the extension always delegate to backgroundDownload(_ :failedWithError :) function with following error

Error Domain=BAErrorDomain Code=202 "The requested URL is not permitted to be downloaded until the application is launched." UserInfo={NSLocalizedFailureReason=The requested URL is not permitted to be downloaded until the application is launched.}

I used the following url to download the image https://w0.peakpx.com/wallpaper/934/165/HD-wallpaper-avatar-aang-aang-airbender-aire-appa-avatar-legend-leyenda.jpg

Why am i getting this error and how to resolve this?

Take a look at the documentation for the BADownloadDomainAllowList Info.plist key.

Until your application is first launched, you extension is only allowed to schedule downloads from domains present in this list. You're likely seeing this error because your BADownloadDomainAllowList entry in Info.plist does not contain w0.peakpx.com.

You can take a look at the Info.plist in our sample code for an example. Note that wildcards are allowed -- "*.peakpx.com" would allow your download to proceed as well.

Thanks for the update, My bad. Instead of domain name ,I provided domain name with scheme (https://w0.peakpx.com)

The requested URL is not permitted to be downloaded until the application is launched error in background assets
 
 
Q