Skip to content
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 screen time option #43

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,5 +232,6 @@ might break in future iOS versions or have your app rejected in the App Store.
| **`Tethering`** | <code>'tethering'</code> | Tethering settings (used to create a hotspot with mobile data). |
| **`DoNotDisturb`** | <code>'doNotDisturb'</code> | Do Not Disturb settings. |
| **`TouchIdPasscode`** | <code>'touchIdPasscode'</code> | Touch id passcode settings. |
| **`ScreenTime`** | <code>'screenTime'</code> | Scree Time settings. |

</docgen-api>
3 changes: 2 additions & 1 deletion ios/Plugin/NativeSettingsPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public class NativeSettingsPlugin: CAPPlugin {
"wifi": "App-prefs:WIFI",
"tethering": "App-prefs:INTERNET_TETHERING",
"doNotDisturb": "App-prefs:DO_NOT_DISTURB",
"touchIdPasscode": "App-prefs:TOUCHID_PASSCODE"
"touchIdPasscode": "App-prefs:TOUCHID_PASSCODE",
"screenTime": "App-prefs:SCREEN_TIME"
]

@objc func open(_ call: CAPPluginCall) {
Expand Down
5 changes: 5 additions & 0 deletions src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,4 +413,9 @@ export enum IOSSettings {
* Touch id passcode settings.
*/
TouchIdPasscode = 'touchIdPasscode',

/**
* Screen Time settings.
*/
ScreenTime = 'screenTime',
}