AVURLAsset loading fails for custom url schemes in iOS11
| Originator: | jlou | ||
| Number: | rdar://32598825 | Date Originated: | June 6 2017 |
| Status: | Open | Resolved: | |
| Product: | iOS | Product Version: | 11 |
| Classification: | Bug | Reproducible: | Always |
Area:
AVFoundation
Summary:
Playback fails using a custom url scheme and AVURLResourceLoaderDelegate in iOS11 without invoking the delegate. The same code works with no issues on iOS9 and iOS10.
Steps to Reproduce:
1. Create an AVURLAsset with a custom url scheme.
2. Set a delegate for the AVURLAsset's resourceLoader.
3. Try to play
Expected Results:
The resource loader delegate's -resourceLoader:shouldWaitForLoadingOfRequestedResource: should be invoked.
Observed Results:
The resource loader delegate's -resourceLoader:shouldWaitForLoadingOfRequestedResource: is not invoked and playback fails with the player item error: Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-12936), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x6100002428b0 {Error Domain=NSOSStatusErrorDomain Code=-12936 "(null)"}}
Version:
iOS 11
Notes:
I get the following in my console log when trying to play:
2017-06-06 14:38:01.612177-0700 AVPlayerTest[71461:7712960] [] URLAssetSetProperty signalled err=-12170 (kFigAssetError_InvalidParameter) (Unsettable/unknown property) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/EmbeddedCoreMedia_Sim/EmbeddedCoreMedia-2010.7.3/Prototypes/FigAsset/FigAsset_URL.c line 1298
2017-06-06 14:38:01.710000-0700 AVPlayerTest[71461:7713137] [] curll_getURLOnQueue signalled err=-17383 (kFigCustomURLLoaderError_RequestUnhandled) (request unhandled) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/EmbeddedCoreMediaFramework_Sim/EmbeddedCoreMedia-2010.7.3/Sources/DataIO/CustomURLHandling/FigCustomURLHandling.c line 2081
2017-06-06 14:38:01.710395-0700 AVPlayerTest[71461:7713147] [] CustomURLFlume fbfcu_AskForResponse: no provider set
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Easy repro case is to use AVARLDelegateDemo
I'm seeing a similar issue in my app, and I opened rdar://32695399 to report it.
I wanted to mention two things I found:
1) The bug reproduces with Apple's AVARLDelegateDemo from https://developer.apple.com/library/content/samplecode/sc1791/Introduction/Intro.html
2) The bug appears to only occur on the simulator. My app and the sample app work OK on real devices running iOS 11.0b1