Cannot load AVURLAsset

For some reason, iOS 11 public beta 3 cannot load AVURLAssets.


This is for an audiobook downloader / player app.


Here is an example of what I'm trying to do.


        _asset = [AVURLAsset assetWithURL:location];
        CMTime length = _asset.duration; /
        NSArray *test = [_asset availableMetadataFormats]; //used for testing


This is the value of the "location" variable.


file:///var/mobile/Containers/Data/Application/C7018FA3-5E15-410C-88FA-570A0A4B902B/Library/Application%20Support/Content/1224/Doctor%20Who%20-%20Doom%20Coalition%204/1-01%20Ship%20in%20a%20Bottle.m4b


When I try to debug the values of length or test they are empty.


This same code works fine in iOS 10.


Is there something else I should try?

I tried loading some metadata using blocks. I'm getting this error.


Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSUnderlyingError=0x604000243990 {Error Domain=NSOSStatusErrorDomain Code=-12842 "(null)"}, NSLocalizedFailureReason=An unknown error occurred (-12842), NSURL=file:///Users/hackmodford/Library/Developer/CoreSimulator/Devices/EF07F640-9F3E-41EF-A019-31098A42EA61/data/Containers/Data/Application/B114CD0F-B6FD-4DC2-A0EC-B40C011FF78F/Library/Application%20Support/Content/686/Doctor%20Who%20-%20The%20Auntie%20Matter/The%20Auntie%20Matter.m4b, NSLocalizedDescription=The operation could not be completed}

So far, this issue only affects .m4b files.

mp3 files still work fine.

Cannot load AVURLAsset
 
 
Q