I am calling [NSURLProtocol registerClass]
to use a custom protocol (Chromium Cronet) when playing a video using AVPlayer
. (The register is done at here: )
It works well on iOS simulator (Xcode 11.3) but when runs on an actual device (iPhone SE, iOS 13), the custom protocol was not triggered. (i.e. it's canInitWithRequest
method was not called).
My question: what is the possible reason to cause different behavior between iOS simulator and real device in the case of [NSURLProtocol registerClass]
? Anything I can do to fix that for real device?