Skip to content

Commit bb86983

Browse files
Apply suggestions from code review
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 3bdc570 commit bb86983

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,24 @@ Please note that it only supports iOS (and requires iOS 15 or higher) and requir
1515

1616
## Handle permissions
1717

18-
To block apps, you need to request Screen Time permissions. Some features (events still seem to trigger in most cases) seem to work without having permissions, but I wouldn't rely on it.
18+
To block apps, you need to request Screen Time permissions. Note that some features (for example, events) may still trigger without permissions; however, this behavior is not guaranteed.
1919

2020
```TypeScript
2121
import * as ReactNativeDeviceActivity from "react-native-device-activity";
2222

23+
import * as ReactNativeDeviceActivity from "react-native-device-activity";
24+
import React, { useEffect } from 'react';
2325

2426
useEffect(() => {
2527
ReactNativeDeviceActivity.requestAuthorization();
2628
}, [])
27-
```
2829

2930
You can also revoke permissions:
3031

3132
```TypeScript
33+
import * as ReactNativeDeviceActivity from "react-native-device-activity";
34+
3235
ReactNativeDeviceActivity.revokeAuthorization();
33-
```
3436
3537
## Select Apps to track
3638
@@ -65,7 +67,7 @@ const DeviceActivityPicker = () => {
6567
Some things worth noting here:
6668

6769
- This is a SwiftUI view, which is prone to crashing, especially when browsing larger categories of apps or searching for apps. It's recommended to provide a fallback view (positioned behind the SwiftUI view) that allows the user to know what's happening and reload the view and tailor that to your app's design and UX.
68-
The activitySelection tokens can be particularly large (especially if you use includeEntireCategory flag), so you probably want to reference them through a familyActivitySelectionId instead of always passing the string token around. Most functions in this library accepts a familyActivitySelectionId as well as the familyActivitySelection token directly.
70+
The activitySelection tokens can be particularly large (especially if you use includeEntireCategory flag), so you probably want to reference them through a familyActivitySelectionId instead of always passing the string token around. Most functions in this library accept a familyActivitySelectionId as well as the familyActivitySelection token directly.
6971

7072
## Time tracking
7173

@@ -115,7 +117,7 @@ const events = ReactNativeDeviceActivityModule.getEvents();
115117

116118
Some things worth noting here:
117119

118-
Depending on your use case (if you need different schedules for different days, for example,) you might need multiple monitors. There's a hard limit on 20 monitors at the same time. Study the [DateComponents](https://developer.apple.com/documentation/foundation/datecomponents) object to model this to your use case.
120+
Depending on your use case (if you need different schedules for different days, for example) you might need multiple monitors. There's a hard limit on 20 monitors at the same time. Study the [DateComponents](https://developer.apple.com/documentation/foundation/datecomponents) object to model this to your use case.
119121

120122
## Block the shield
121123

0 commit comments

Comments
 (0)