NSURLProtocol registerClass works for iOS simulator but not actual device

∥☆過路亽.° 提交于 2020-03-16 07:38:09

问题


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?

来源:https://stackoverflow.com/questions/60128491/nsurlprotocol-registerclass-works-for-ios-simulator-but-not-actual-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!