swift-toolkit
swift-toolkit copied to clipboard
Screen Time Content Restrictions Disabling Reader WebView
Bug Report
What happened?
Using the Test app, the reader is prevented from loading ePub content when Screen Time content restrictions are enabled.
Expected behavior
Users of the app should be able to tap "Allow Website" or enter "localhost" into the approved website list to allow the reader to load content
How to reproduce?
Affected users are going to Settings > Screen Time > Content & Privacy Restrictions > Content Restrictions, then turning on the Web Content filter to allow only specified websites. Until 16.5.1 was released, adding "localhost" to the list of approved websites would allow the reader to load all ePub content. But after the update, it no longer works.
Environment
- Readium version: 2.5.1
Development environment
macOS: 13.4.1 platform: x86_64 carthage: 0.39.0 Xcode 14.3.1 Build version 14E300c
Testing device
- iOS version: 16.5.1c
- Model (e.g. iPhone 11 Pro Max): iPhone 11
- Is it an emulator? No
Additional context
- Are you willing to fix the problem and contribute a pull request? Yes
Thanks @brianzinken, did you have a chance to test the following ideas?
- Using 127.0.0.1 instead of localhost and see if that helps.
- Use a fixed port instead of a random one.
- Adding manually localhost:port in iOS's settings, when you use a fixed port
@mickael-menu Using 127.0.0.1 instead of localhost - did not resolve the issue. I used the debugger to catch the random port for the web view, and applied that to the iOS settings. That did not resolve the issue either. I can try overriding the random port and assigning a fixed one.