-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FXIOS-6706 [v116] Screen Time implementation #15111
Add FXIOS-6706 [v116] Screen Time implementation #15111
Conversation
Client.app: Coverage: 34.27
Generated by 🚫 Danger Swift against bc6019e |
@@ -35,9 +38,18 @@ class WebviewViewController: UIViewController, ContentContainable, Screenshotabl | |||
]) | |||
} | |||
|
|||
private func setupScreenTimeController() { | |||
addChild(screenTimeController) | |||
screenTimeController.view.frame = webView.frame |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should use constraints here as well instead of setting a frame to avoid problems with rotation or other screen size changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok perfect i'm changing it
Thank you so much @FilippoZazzeroni for implementing screen time! This is great! |
You're welcome @thatswinnie 🚀. Thank you a lot for your reviews. |
@FilippoZazzeroni @thatswinnie just a heads up: the current solution is also tracking page usage in incognito mode. |
@domcorvasce thank you. i see safari when you enable content restrictions it disables the incognito mode, however if you can suppress the recording when you are in incognito mode, we should just set that boolean to true if we are in private mode. what do you think @thatswinnie ? |
@FilippoZazzeroni that's a good point. We could use WebContentSettings.blockedByFilter to block incognito mode if content restrictions are enabled but I wouldn’t do it just like Chrome doesn’t. One last note. I think there is some misunderstanding about this PR. This PR is adding support for Screen Time limits on web content, and the ability of Screen Time to show a time breakdown per website. Disabling incognito mode should be discussed as part of a separate Family Controls integration. |
@domcorvasce ok. I think just turn true the |
Ok maybe a solution could be to add the screen time implementation to entire browser view controller view, in order to limit the screen time to entire app, and suppress the recording inside web view controller when incognito mode is enabled. i don't think is needed to disable the incognito mode, since parental control can work on that too. |
Jira ticket
Github issue
Description
Added implementation of Screen Time functionalities. To test this implementation use a real device, because on simulator screen time doesn't work. In order to test it, go to
Settings > Screen Time > Content & Privacy Restrictions > Content Restrictions > Web Content
and selectLimit Adult Websites
orAllowed Websites
then navigate to a restricted page and you should see that the navigation is disabled.Pull requests checks where applicable