Skip to content

Commit

Permalink
add screen time option (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kodzhabashev authored Mar 5, 2024
1 parent 7f89996 commit 5a7d00a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
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',
}

0 comments on commit 5a7d00a

Please sign in to comment.