Background Assets: manifestURL file does not exist

I have the manifestURL set up in the info.plist. Write the following code for extension

- (NSSet<BADownload *> *)downloadsForRequest:(BAContentRequest)contentRequest
                 manifestURL:(NSURL *)manifestURL
                extensionInfo:(BAAppExtensionInfo *)extensionInfo
{
  [BADownloadManager sharedManager].delegate = self;
  NSLog(@"BackgroundAssetsTest extension downloadsForRequestWithManifestURLExist:%@",@([[NSFileManager defaultManager] fileExistsAtPath:self.manifestURL.absoluteString]));
  NSLog(@"BackgroundAssetsTest extension downloadsForRequest: %@",manifestURL);
  NSError *cfgError;
  NSString *config = [NSString stringWithContentsOfFile:self.manifestURL.absoluteString encoding:NSUTF8StringEncoding error:&cfgError];
  NSLog(@"BackgroundAssetsTest extension downloadsForRequestCfg:%@ error:%@",config,cfgError);
....
   }

Trigger using the backgroundassets-debug tool. But the manifestURL file of the extension delegate callback does not exist. Viewing console.app Logs:

BackgroundAssetsTest extension downloadsForRequestWithManifestURLExist:0
BackgroundAssetsTest extension downloadsForRequest: file:///var/tmp/com.apple.backgroundassets.downloadstaging/com.my.bundleid/994c0d0f-17c0-44b3-8e92-144927701b9c.json
BackgroundAssetsTest extension downloadsForRequestCfg:(null) error:Error Domain=NSCocoaErrorDomain Code=260 "The file “994c0d0f-17c0-44b3-8e92-144927701b9c.json” couldn’t be opened because there is no such file." UserInfo={NSFilePath=file:///var/tmp/com.apple.backgroundassets.downloadstaging/com.my.bundleid/994c0d0f-17c0-44b3-8e92-144927701b9c.json, NSUnderlyingError=0x103f06e90 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

What happens when I'm supposed to read the file for parsing, but it doesn't exist!!

I suspected that the manifestURL file had failed to download, but a review of the console logs reveals that the download is complete. backgroundassets.user Process logs:

Download did finish: BAManifestDownload (0x90ce258e0) - com.my.bundleid.Manifest-60F3F3DF-3B06-4031-A926-E658055EF83C
Download did finish done.

Background Assets: manifestURL file does not exist
 
 
Q