Skip to content

Conversation

@Arlevoy
Copy link
Contributor

@Arlevoy Arlevoy commented Apr 28, 2025

Hi there!

Below a suggest way to improve a little bit the documentation, I would love to hear your feedbacks on this!

Many thanks for the lib very useful :)

Summary by CodeRabbit

  • Documentation
    • Expanded and restructured the README to include detailed setup instructions for both managed Expo and bare React Native projects.
    • Added comprehensive explanations of Apple Screen Time APIs, entitlements, and configuration steps.
    • Included extensive usage examples demonstrating authorization, app selection, shield configuration, scheduling, and app blocking.
    • Provided troubleshooting tips for permission delays, native view crashes, and API finickiness.
    • Updated API references, contribution guidelines, and noted known issues and behaviors.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 28, 2025

Walkthrough

The README.md for react-native-device-activity was thoroughly rewritten and expanded. It now includes a detailed overview of the library, descriptions of Apple Screen Time APIs, installation and entitlement setup instructions, two comprehensive usage examples, a full API reference, notes on data persistence and limitations, known issues, troubleshooting tips, and contribution guidelines. No code or API signatures were altered.

Changes

File(s) Change Summary
README.md Expanded and restructured documentation: added detailed library overview, Apple API descriptions with code snippets, installation and entitlement setup instructions, two comprehensive usage examples, full API reference, notes on persistence and limitations, known issues, troubleshooting, and contributing guidelines. No code or API changes.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant API
    participant ShieldUI

    User->>App: Request permission & select app
    App->>API: Request authorization
    API-->>App: Authorization granted
    App->>ShieldUI: Configure shield appearance & actions
    App->>API: Schedule monitoring
    API-->>App: Monitoring active
    User->>App: Change settings or stop monitoring
    App->>API: Update or stop schedule
    API-->>App: Schedule updated/stopped
    App->>User: Feedback & updates
Loading

Possibly related PRs

  • Update readme and example app.json #38: Both PRs focus on enhancing the README.md documentation for react-native-device-activity with detailed explanations about Apple's Family Controls entitlement and usage, making their changes directly related at the documentation level.
  • Improve docs #57: The main PR and the retrieved PR both focus exclusively on expanding and improving the README.md documentation for the react-native-device-activity package, adding detailed usage examples and clarifications without modifying any code logic or exported entities.

Poem

🐇
In README fields where docs were few,
A rabbit hopped and wrote anew.
With code and snippets, guides abound,
Installation steps are clearly found.
Now users cheer, confusion gone—
The docs are strong, the path is drawn!
📚✨


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6bc6c6d and 361c05d.

📒 Files selected for processing (1)
  • README.md (4 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md

[uncategorized] ~14-~14: A comma might be missing here.
Context: ...our use case you might not need all the APIs hence not all the new bundle identifier...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[grammar] ~120-~120: Use “the” before the superlative.
Context: ...f the Shield UI/actions. We try to make a best guess here - prioritizing apps/web...

(THE_SUPERLATIVE)


[style] ~152-~152: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...pproval for 4 bundleIdentifiers (if you want to use all the native extensions that is, ...

(REP_WANT_TO_VB)


[uncategorized] ~159-~159: A comma might be missing here.
Context: ...ShieldConfiguration Once you've gotten approval you need to manually add the "Family Co...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[uncategorized] ~232-~232: This verb may not be in the correct tense. Consider changing the tense to fit the context better.
Context: ...interval. The main principle is that you're configuring these apps to be blocled with FamilyCon...

(AI_EN_LECTOR_REPLACEMENT_VERB_TENSE)


[uncategorized] ~398-~398: A comma might be missing here.
Context: ...I Reference (the list is not exhaustive yet please refer to the Typescript types fo...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)

🪛 markdownlint-cli2 (0.17.2)
README.md

138-138: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


404-404: Inline HTML
Element: br

(MD033, no-inline-html)


404-404: Inline HTML
Element: br

(MD033, no-inline-html)


410-410: Inline HTML
Element: br

(MD033, no-inline-html)


410-410: Inline HTML
Element: br

(MD033, no-inline-html)


410-410: Inline HTML
Element: br

(MD033, no-inline-html)


410-410: Inline HTML
Element: br

(MD033, no-inline-html)


417-417: Inline HTML
Element: br

(MD033, no-inline-html)


417-417: Inline HTML
Element: br

(MD033, no-inline-html)


420-420: Inline HTML
Element: br

(MD033, no-inline-html)


423-423: Inline HTML
Element: br

(MD033, no-inline-html)

🔇 Additional comments (1)
README.md (1)

398-398: 🧹 Nitpick (assertive)

Add missing comma in heading
Improve readability by inserting a comma:

- ## API Reference (the list is not exhaustive yet please refer to the Typescript types for the full list)
+ ## API Reference (the list is not exhaustive yet, please refer to the Typescript types for the full list)

Likely an incorrect or invalid review comment.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~398-~398: A comma might be missing here.
Context: ...I Reference (the list is not exhaustive yet please refer to the Typescript types fo...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)

…tallation instructions, and examples for using the FamilyControl, ShieldConfiguration, and ActivityMonitor APIs.
@Arlevoy Arlevoy force-pushed the documentation/update-readme branch from 361c05d to 35ac177 Compare April 28, 2025 08:24
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

♻️ Duplicate comments (4)
README.md (4)

1-2: Consider adding a Table of Contents
Given the length and depth of this README, including a TOC immediately after the main title will greatly improve navigation for readers.


14-14: Add missing comma before “hence”
Punctuation needed for clarity:

- Note: Depending on your use case you might not need all the APIs hence not all the new bundle identifier and capabilities are required.
+ Note: Depending on your use case, you might not need all the APIs; hence, not all the new bundle identifiers and capabilities are required.

351-351: Correct typo “blocled” → “blocked”
Fix the misspelling to improve clarity:

- configuring these apps to be blocled with FamilyControl API
+ configuring these apps to be blocked with FamilyControl API

523-523: Remove inline HTML in table cell
Avoid <br> tags in tables; use Markdown line breaks (two spaces) or separate rows:

- `familyActivitySelection`: string \| null<br>`onSelectionChange`: (event) => void<br>`style`: ViewStyle
+ `familyActivitySelection`: string \| null  
+ `onSelectionChange`: (event) => void  
+ `style`: ViewStyle
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between 361c05d and 35ac177.

📒 Files selected for processing (1)
  • README.md (5 hunks)
🔇 Additional comments (6)
README.md (6)

30-37: Code fence has correct language tag
The typescript tag ensures proper highlighting for the shieldConfig example. No change needed.


45-52: Code fence has correct language tag
The typescript tag ensures proper highlighting for the shieldActions example.


59-69: Code fence has correct language tag
The typescript tag is properly specified for the startMonitoring snippet.


75-82: Code fence has correct language tag
The bash tag makes the installation commands clear.


8-8: 🧹 Nitpick (assertive)

Add terminating period to tagline
For consistency and to follow sentence conventions, consider ending this line with a period:

- React Native wrapper for Apple's Screen Time, Device Activity and Family Controls APIs
+ React Native wrapper for Apple's Screen Time, Device Activity and Family Controls APIs.

Likely an incorrect or invalid review comment.


255-255: 🧹 Nitpick (assertive)

Add commas around parenthetical clause
Frame the parenthetical with commas for readability:

- Depending on your use case (if you need different schedules for different days, for example) you might need multiple monitors.
+ Depending on your use case, (if you need different schedules for different days, for example,) you might need multiple monitors.

Likely an incorrect or invalid review comment.

…ontents, clarify API usage, and improve installation instructions for Expo and bare React Native projects.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🔭 Outside diff range comments (1)
README.md (1)

202-207: 🧹 Nitpick (assertive)

Standardize code block language tags.
Some fences use TypeScript while others use typescript (or vary in casing). For consistency and proper syntax highlighting, use the lowercase typescript tag throughout.

♻️ Duplicate comments (2)
README.md (2)

166-168: Specify language for fenced code block.
This code snippet lacks a language identifier, which was raised in a previous review. Please add bash after the opening backticks:

- ```
+ ```bash

42-42: 🧹 Nitpick (assertive)

Clarify sentence structure with a semicolon.
Consider splitting or adding a semicolon before “hence” for better readability:

- Note: Depending on your use case, you might not need all the APIs hence not all the new bundle identifier and capabilities are required.
+ Note: Depending on your use case, you might not need all the APIs; hence, not all the new bundle identifiers and capabilities are required.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between 35ac177 and 33322d9.

📒 Files selected for processing (1)
  • README.md (6 hunks)
🔇 Additional comments (3)
README.md (3)

10-10: Well-structured alert callout.
The "⚠️ Important" warning is prominent and links correctly to the entitlement section. Nice improvement!


12-24: Good addition: Table of Contents.
The detailed TOC improves navigation for lengthy documentation.


40-40: Moved WWDC reference out of heading.
Great callout placement with _See [WWDC21]..._ outside the main heading.

README.md Outdated
## Table of Contents

Please note that it only supports iOS (and requires iOS 15 or higher) and requires a Custom Dev Client to work with Expo. For Android I'd probably look into [UsageStats](https://developer.android.com/reference/android/app/usage/UsageStats), which seems provide more granularity.
- [Apple's Screen Time APIs Explained](#apples-screen-time-apis-explained-for-official-details-wwdc21)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Broken anchor in TOC for the first heading.
The link [Apple's Screen Time APIs Explained](#apples-screen-time-apis-explained-for-official-details-wwdc21) does not match the actual heading ID ## Apple's Screen Time APIs Explained. Update the anchor to #apples-screen-time-apis-explained.

Arlevoy and others added 3 commits April 29, 2025 19:17
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (6)
README.md (6)

8-8: Consider adding an Oxford comma
For consistency and clarity, insert a comma before “and Family Controls”:

- React Native wrapper for Apple's Screen Time, Device Activity and Family Controls APIs.
+ React Native wrapper for Apple's Screen Time, Device Activity, and Family Controls APIs.

148-148: Add missing article for correctness
Change “make a best guess” to “make the best guess” to fix the superlative usage:

- We try to make a best guess here …
+ We try to make the best guess here …

551-551: Remove inline HTML tags in table cells
Replace <br> with native Markdown line breaks or a list to satisfy lint rules:

- `familyActivitySelection`: string \| null<br>`onSelectionChange`: (event) => void<br>`style`: ViewStyle
+ `familyActivitySelection`: string \| null  
+ `onSelectionChange`: (event) => void  
+ `style`: ViewStyle

545-545: 🧹 Nitpick (assertive)

Correct “Typescript” casing
Use “TypeScript” in the API reference heading for proper branding:

- ## API Reference (the list is not exhaustive yet please refer to the Typescript types for the full list)
+ ## API Reference (the list is not exhaustive yet please refer to the TypeScript types for the full list)

42-42: 🧹 Nitpick (assertive)

Improve punctuation in overview note
Split or punctuate for readability—add a semicolon and commas:

- Note: Depending on your use case, you might not need all the APIs hence not all the new bundle identifier and capabilities are required.
+ Note: Depending on your use case, you might not need all the APIs; hence, not all bundle identifiers and capabilities are required.

12-37: ⚠️ Potential issue

Fix broken anchor in Table of Contents
The first TOC entry links to #apples-screen-time-apis-explained-for-official-details-wwdc21, but the heading ID is #apples-screen-time-apis-explained. Update accordingly:

- - [Apple's Screen Time APIs Explained](#apples-screen-time-apis-explained-for-official-details-wwdc21)
+ - [Apple's Screen Time APIs Explained](#apples-screen-time-apis-explained)
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between 33322d9 and aa9c610.

📒 Files selected for processing (1)
  • README.md (6 hunks)
🔇 Additional comments (1)
README.md (1)

1-2: Title is clear and follows conventions
Using the package name as the sole H1 is the standard for GitHub READMEs.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🔭 Outside diff range comments (1)
README.md (1)

195-204: 🧹 Nitpick (assertive)

Consolidate and correct nested code fences in the example
The use of four backticks and an inner TypeScript block can break rendering. Consider using a single fenced block with the proper language tag and remove the nested fence:

- ````typescript
- ```TypeScript
+ ```typescript
  import * as ReactNativeDeviceActivity from "react-native-device-activity";
  ReactNativeDeviceActivity.revokeAuthorization();
  // …rest of the example…
- ```
- ````
+ ```
♻️ Duplicate comments (2)
README.md (2)

14-14: 🛠️ Refactor suggestion

Fix broken TOC anchor for "Apple's Screen Time APIs Explained"
The link slug includes an extra suffix (-for-official-details-wwdc21) that doesn’t match the actual heading anchor. Update it to match the heading ## Apple's Screen Time APIs Explained.

- - [Apple's Screen Time APIs Explained](#apples-screen-time-apis-explained-for-official-details-wwdc21)
+ - [Apple's Screen Time APIs Explained](#apples-screen-time-apis-explained)

42-42: 🧹 Nitpick (assertive)

Improve sentence structure in the introductory note
This line runs two independent clauses with “hence”—consider using a semicolon and pluralizing “bundle identifiers” for clarity.

- Note: Depending on your use case, you might not need all the APIs hence not all the new bundle identifier and capabilities are required.
+ Note: Depending on your use case, you might not need all the APIs; hence, not all the new bundle identifiers and capabilities are required.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between aa9c610 and 6290067.

📒 Files selected for processing (1)
  • README.md (6 hunks)
🔇 Additional comments (1)
README.md (1)

35-36: Verify TOC anchors for special characters in "Weird behaviors ⚠️" and "Troubleshooting 📱"
The current TOC links:

- [Weird behaviors ⚠️](#weird-behaviors-)
- [Troubleshooting 📱](#troubleshooting-)

may not resolve correctly because of the trailing hyphens and emoji. Please confirm the generated slug (e.g., by testing the browser’s anchor target) and update the links accordingly.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🔭 Outside diff range comments (1)
README.md (1)

195-228: ⚠️ Potential issue

Incorrect code fencing
A four-backtick fence is used here, inadvertently including the ## Select Apps to track heading within the code block. Switch to a standard triple-backtick fence (```typescript) for the snippet and close it before the next Markdown heading.

♻️ Duplicate comments (3)
README.md (3)

42-42: 🧹 Nitpick (assertive)

Refine punctuation in note
Consider using a semicolon before “hence” and adding a comma after it for clarity:

- Note: Depending on your use case, you might not need all the APIs hence not all the new bundle identifiers and capabilities are required.
+ Note: Depending on your use case, you might not need all the APIs; hence, not all the new bundle identifiers and capabilities are required.

545-550: 🛠️ Refactor suggestion

Remove inline HTML in table cells
Replace <br> tags in the Props column with native markdown line breaks or split into multiple lines:

- `familyActivitySelection`: string \| null<br>`onSelectionChange`: (event) => void<br>`style`: ViewStyle
+ `familyActivitySelection`: string \| null  
+ `onSelectionChange`: (event) => void  
+ `style`: ViewStyle

553-556: 🛠️ Refactor suggestion

Remove inline HTML in hook table
Convert <br> breaks into native markdown or separate rows. Example:

- `onSave`: () => void<br>`onCancel`: () => void<br>`handleSelectionChange`: (event) => void
+ `onSave`: () => void  
+ `onCancel`: () => void  
+ `handleSelectionChange`: (event) => void
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between aa9c610 and 6290067.

📒 Files selected for processing (1)
  • README.md (6 hunks)
🔇 Additional comments (44)
README.md (44)

1-2: Project Title: The title is clear and follows GitHub conventions.


8-8: Great introduction tagline: The one-line description effectively summarizes the library’s purpose.


10-10: Prominent warning: The callout about Apple entitlement requirements is clear and actionable.


38-40: Section header formatting: The relocated WWDC21 reference under the heading is well–formatted and improves readability.


52-52: Blank line for visual separation.


58-65: ShieldConfiguration example: The TypeScript snippet is properly fenced and provides a clear configuration example.


67-68: ShieldAction section header: The ShieldAction API heading clearly delineates the next API subsection.


74-80: ShieldAction example: The TypeScript snippet is well–fenced and demonstrates primary button behavior accurately.


82-83: ActivityMonitor header: The ActivityMonitor API heading is descriptive and correctly placed.


90-100: startMonitoring example: The code sample illustrates scheduling and repetition options clearly.


102-103: Installation header: The managed Expo installation section is introduced with a clear ## heading.


106-110: Install command snippet: The bash fence is specified correctly, showing both npm and yarn alternatives.


114-133: Expo plugin config: The JSON snippet is valid, correctly fenced, and shows the necessary app.json settings.


136-138: Prebuild command: The npx expo prebuild --platform ios snippet is properly fenced as bash.


140-145: Xcode Targets verification: The list of targets to check in Xcode is clear and actionable.


146-146: Notes header: The ### Some Notes heading matches the TOC and is appropriately capitalized.


164-164: Bare React Native heading: The ### Add the package to your npm dependencies heading is clear and precise.


174-179: Entitlement section clarity: The ## Family Controls (distribution) entitlement requires approval from Apple section effectively emphasizes the need for early Apple approval.


191-193: Basic example header: The heading for the event tracking example is concise and descriptive.


232-233: Implementation notes: The tips on SwiftUI fallback views and token size considerations are valuable for production readiness.


283-283: Monitor limit reminder: The note about the 20-monitor limit and using DateComponents is a helpful caveat.


377-379: Alternative example header: The ## Alternative Example: Blocking Apps for a Time Slot heading clearly introduces a more complex use case.


382-385: Example imports: The TypeScript import statements are properly fenced and demonstrate required modules.


386-390: Constants definition: Declaring SELECTION_ID, SHIELD_CONFIG_ID, and ACTIVITY_NAME at the top enhances clarity.


391-399: Authorization flow: The useEffect for requestAuthorization with status logging provides a clear initialization pattern.


401-404: State management: Using useState<string | null> to track the activity selection is intuitive.


406-409: Event handler: The handleSelectionChange callback cleanly processes native events and updates state.


411-417: Selection persistence: Validating the selection before saving and alerting on error is good UX.


418-422: Saving selection ID: Demonstrating setFamilyActivitySelectionId for extension communication is effective.


424-428: Shield configuration workflow: The transition from saving selection to calling configureBlocking is logical.


431-436: Shield UI settings: The shieldConfig object is concise and clearly labeled.


439-443: Shield actions: The shieldActions definition demonstrates primary action behavior correctly.


446-447: API call: The updateShield invocation is properly demonstrated with both config and actions.


449-458: Action scheduling: Both configureActions examples for interval start and end are well–structured.


474-483: Scheduling function: The startScheduledBlocking async function, with both production and test schedules, is comprehensive.


485-494: Test schedule example: Showing dynamic time calculation for testing is a practical demonstration.


499-504: Monitoring invocation: The await startMonitoring call is correctly placed within the error-handling flow.


506-510: Error handling: Logging errors and notifying users via Alert.alert balances debugging and UX.


513-531: JSX layout: The component structure, with selection view and save button, is clearly demonstrated.


535-543: Key Concepts recap: The numbered summary provides a quick reference to the main API concepts.


572-574: Contributing section: The call for contributions and link to guidelines is clear and user-friendly.


576-577: Weird behaviors section: Documenting API quirks helps developers troubleshoot unexpected behavior.


590-594: Troubleshooting tips: Providing multiple troubleshooting steps for Screen Time API issues is very helpful.


600-603: Troubleshooting completeness: The final tips on privacy restrictions and resetting settings round out the section well.

@pkg-pr-new
Copy link

pkg-pr-new bot commented May 2, 2025

Open in StackBlitz

npm i https://pkg.pr.new/kingstinct/react-native-device-activity@58

commit: d870e3b

Copy link
Member

@robertherber robertherber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this @Arlevoy, I think it looks great. Just go through the CodeRabbit suggestions and I think we're good to merge (it can be a bit nitpicky but pretty good for docs)! 😊

Arlevoy and others added 2 commits May 20, 2025 14:40
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@Arlevoy
Copy link
Contributor Author

Arlevoy commented May 20, 2025

Sorry I did not see your answer!! Will do very soon, thanks a lot !

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🔭 Outside diff range comments (1)
README.md (1)

204-206: 🧹 Nitpick (assertive)

Standardize code fence language for TypeScript
Use a lowercase language identifier for consistency with other fences:

- ```TypeScript
+ ```typescript
♻️ Duplicate comments (9)
README.md (9)

10-10: Consider moving the ⚠️ warning into a dedicated Prerequisites section
This critical note is easily missed at the top of the README. Promoting it to its own “Prerequisites” or “Before You Begin” section improves visibility for developers who need Apple entitlements.


20-20: Unify casing between TOC entry and heading for "Some Notes"
The TOC uses [Some notes](#some-notes) while the heading is ### Some Notes. Ensure both are identical (e.g., capital “N” in the TOC).

Also applies to: 146-146


166-168: Add language specifier to the code fence
This bare React Native install snippet is missing a language tag for syntax highlighting. For example:

- ```
+ ```bash
  npm install react-native-device-activity
- ```
+ ```

42-42: 🧹 Nitpick (assertive)

Improve clarity and punctuation in the introductory note
The sentence is a run-on. Consider adding a semicolon and commas for readability:

- Note: Depending on your use case, you might not need all the APIs hence not all the new bundle identifier and capabilities are required.
+ Note: Depending on your use case, you might not need all the APIs; hence, not all the new bundle identifiers and capabilities are required.

14-14: ⚠️ Potential issue

Fix broken anchor in Table of Contents for the main section
The link refers to #apples-screen-time-apis-explained-for-official-details-wwdc21 but the actual heading is ## Apple's Screen Time APIs Explained, which generates #apples-screen-time-apis-explained. Please update the TOC entry to:

- [Apple's Screen Time APIs Explained](#apples-screen-time-apis-explained-for-official-details-wwdc21)
+ [Apple's Screen Time APIs Explained](#apples-screen-time-apis-explained)

561-569: 🧹 Nitpick (assertive)

Remove inline HTML <br> tags in the Functions table
The parameters column uses <br> tags. Refactor to a multi-line list for better readability and lint compliance:

- `activityName`: string<br>`schedule`: DeviceActivitySchedule<br>`events`: DeviceActivityEvent[]
+ - `activityName`: string  
+ - `schedule`: DeviceActivitySchedule  
+ - `events`: DeviceActivityEvent[]

382-384: 🧹 Nitpick (assertive)

Include missing imports for View and Button in the Alternative Example
The component uses <View> and <Button> but only imports Alert. Add the necessary imports so the example compiles:

 import { useEffect, useState } from 'react';
- import { Alert } from 'react-native';
+ import { Alert, View, Button } from 'react-native';

548-551: 🧹 Nitpick (assertive)

Remove inline HTML <br> tags in the Components table
Markdown lint flags inline HTML. Replace these with native line breaks or multiple rows for correct formatting:

- `familyActivitySelection`: string \| null<br>`onSelectionChange`: (event) => void<br>`style`: ViewStyle
+ `familyActivitySelection`: string \| null  
+ `onSelectionChange`: (event) => void  
+ `style`: ViewStyle

555-558: 🧹 Nitpick (assertive)

Remove inline HTML <br> tags in the Hooks table
Convert the props column to use Markdown line breaks instead of <br> tags:

- `currentFamilyActivitySelection`: string \| null<br>`isActivityPickerLoading`: boolean<br>`onSave`: () => void<br>`onCancel`: () => void<br>`handleSelectionChange`: (event) => void
+ `currentFamilyActivitySelection`: string \| null  
+ `isActivityPickerLoading`: boolean  
+ `onSave`: () => void  
+ `onCancel`: () => void  
+ `handleSelectionChange`: (event) => void
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between 6290067 and 53bcb5d.

📒 Files selected for processing (1)
  • README.md (6 hunks)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (14)
README.md (14)

8-8: Well-formed introductory tagline with Oxford comma
The description is concise and correctly uses an Oxford comma for clarity.


106-110: Bash code fence correctly specified
Great addition of the bash specifier for syntax highlighting in the installation snippet.


146-146: Proper capitalization of “Some Notes”
The heading is now consistently title-cased, matching the TOC entry.


232-233: Approve list formatting
The bullets under “Some things worth noting here” are now consistently prefixed and clear.


10-10: 🧹 Nitpick (assertive)

Extract warning into a Prerequisites section
Consider moving the ⚠️ Important note into a dedicated “Prerequisites” or “Before You Begin” section to improve visibility and structure.


14-36: ⚠️ Potential issue

Fix Table of Contents anchors and consistency
The TOC contains several broken or inconsistent anchors:

  • The main Apple Screen Time link uses #apples-screen-time-apis-explained-for-official-details-wwdc21 but the heading slug is #apples-screen-time-apis-explained
  • The “Some Notes” entry is lowercased and doesn’t match the ### Some Notes heading
  • The “Weird behaviors ⚠️” and “Troubleshooting 📱” anchors include trailing hyphens and may not resolve correctly

Please update the TOC entries to exactly match the heading IDs for reliable in-page navigation.


42-42: 🧹 Nitpick (assertive)

Add punctuation for clarity
Insert a comma or semicolon before “hence” to separate clauses, e.g.:

- Note: Depending on your use case you might not need all the APIs hence not all the new bundle identifiers are required.
+ Note: Depending on your use case, you might not need all the APIs; hence, not all the new bundle identifiers are required.

166-168: 🧹 Nitpick (assertive)

Add language specifier to bare project snippet
The npm install snippet for bare React Native should use a code fence language, e.g.:

- ```
+ ```bash
npm install react-native-device-activity

283-283: 🧹 Nitpick (assertive)

Prefix missing bullet item
Add a dash before this line to include it in the list, for example:

- Depending on your use case (…)
+ - Depending on your use case (…)

382-384: ⚠️ Potential issue

Include all required imports in example
The React component uses <View> and <Button> but only imports Alert. Add the missing imports:

 import { useEffect, useState } from 'react';
- import { Alert } from 'react-native';
+ import { Alert, View, Button } from 'react-native';

550-550: 🛠️ Refactor suggestion

Replace inline HTML in components table
Use Markdown line breaks instead of <br> tags in the Props column, for example:

- `familyActivitySelection`: string \| null<br>`onSelectionChange`: (event) => void<br>`style`: ViewStyle
+ `familyActivitySelection`: string \| null  
+ `onSelectionChange`: (event) => void  
+ `style`: ViewStyle

556-556: 🛠️ Refactor suggestion

Replace inline HTML in hooks table
Refactor the Returns column to use native Markdown breaks instead of <br> tags.


562-562: 🛠️ Refactor suggestion

Replace inline HTML in functions table
Convert <br> separators into Markdown list items or line breaks for the startMonitoring parameters.


180-183: 🧹 Nitpick (assertive)

Wrap bundle identifiers in backticks
Ensure all identifiers in the list are formatted as code, for example:

- - com.your-bundleIdentifier.ActivityMonitor
+ - `com.your-bundleIdentifier.ActivityMonitor`
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between 53bcb5d and d513e26.

📒 Files selected for processing (1)
  • README.md (6 hunks)
🔇 Additional comments (8)
README.md (8)

1-2: Skip trivial header definition
The top-level header is clear and follows standard README conventions.


38-40: Skip structural headings
Section header and accompanying WWDC reference are correctly formatted and need no further changes.


44-44: Skip heading addition
The new ### FamilyControl API header is correctly formatted.


51-51: Skip heading addition
The new ### ShieldConfiguration API header is correctly formatted.


58-66: Skip example snippet
The TypeScript code block is properly fenced and clear.


114-131: Skip plugin configuration snippet
The JSON snippet uses a json fence and appears valid.


148-150: Skip bullet content under “Some Notes”
The bulleted items are informative and well-presented.


602-602: Approve troubleshooting tip addition
Good inclusion of the Content & Privacy Restrictions item under Troubleshooting.

…n adjustments, improved phrasing, and additional import statements for better code examples.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

♻️ Duplicate comments (6)
README.md (6)

14-14: Duplicate of previous feedback: fix broken TOC anchor.
The link [Apple's Screen Time APIs Explained](#apples-screen-time-apis-explained-for-official-details-wwdc21) won’t navigate to the ## Apple's Screen Time APIs Explained heading. Update it to #apples-screen-time-apis-explained.


182-185: 🧹 Nitpick (assertive)

Wrap bundle identifiers in code formatting.
Ensure each bundle identifier is in backticks for clarity, e.g.:

- - com.your-bundleIdentifier
+ - `com.your-bundleIdentifier`

176-176: 🧹 Nitpick (assertive)

Add comma after introductory phrase.
Insert a comma after “As early as possible” for readability:

- As early as possible you want to [request approval from Apple](…).
+ As early as possible, you want to [request approval from Apple](…).

42-42: 🧹 Nitpick (assertive)

Refine sentence structure around “hence”.
Add a semicolon or split into two sentences for clarity. For example:

- Note: Depending on your use case, you might not need all the APIs hence not all the new bundle identifier and capabilities are required.
+ Note: Depending on your use case, you might not need all the APIs; hence, not all new bundle identifiers and capabilities are required.

283-283: ⚠️ Potential issue

Bullet missing hyphen in “Some things worth noting here” list.
This item should be prefixed with a dash to match the other bullets:

- Depending on your use case (if you need different schedules for different days, for example)…
+ - Depending on your use case (if you need different schedules for different days, for example)…

550-563: 🛠️ Refactor suggestion

Remove inline HTML <br> tags in tables.
Convert <br> to native Markdown line breaks (two spaces + newline) or split entries into multiple rows. For instance:

- `familyActivitySelection`: string \| null<br>`onSelectionChange`: (event) => void<br>`style`: ViewStyle
+ `familyActivitySelection`: string \| null  
+ `onSelectionChange`: (event) => void  
+ `style`: ViewStyle
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Lite

📥 Commits

Reviewing files that changed from the base of the PR and between d513e26 and ea4a86f.

📒 Files selected for processing (1)
  • README.md (6 hunks)
🔇 Additional comments (11)
README.md (11)

1-2: Looks good: project title is clear and concise.
The repository name is prominently displayed at the top as expected.


8-8: Introduction is well phrased and includes proper Oxford comma.
The tagline succinctly describes the library’s purpose.


38-41: Section heading and reference to WWDC21 look correct.
The heading and italicized note provide proper context for readers.


44-100: The API explanation sections and corresponding examples are clear and accurate; no issues noted.


102-145: Installation instructions for managed Expo projects are well formatted with proper code fences.


148-232: The basic example and “Select Apps to track” flow are documented clearly with working code snippets.


236-282: Time tracking and block-the-shield examples compile and illustrate the functionality appropriately.


284-296: Direct blocking example looks fine.


301-336: Alternative full blocking example is comprehensive and well structured.


535-547: Key Concepts section succinctly summarizes the library’s core steps.


564-604: Contributing, weird behaviors, and troubleshooting sections provide valuable guidance.

@Arlevoy
Copy link
Contributor Author

Arlevoy commented May 22, 2025

@robertherber I think this is ok :) I took most of them there are nice

… video and add a blank line for improved readability.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

♻️ Duplicate comments (7)
README.md (7)

30-30: TOC entry for API Reference is overly verbose
The Table of Contents link

- [API Reference](#api-reference-the-list-is-not-exhaustive-yet-please-refer-to-the-typescript-types-for-the-full-list)

should be shortened to

- [API Reference](#api-reference)

for better readability.


42-42: 🧹 Nitpick (assertive)

Use semicolon or punctuation before “hence”
The sentence currently reads:

Note: Depending on your use case, you might not need all the APIs hence not all the new bundle identifier and capabilities are required.
Consider adding a semicolon and comma for clarity:

- ...you might not need all the APIs hence not all the new bundle identifier...
+ ...you might not need all the APIs; hence, not all the new bundle identifiers...

176-176: 🧹 Nitpick (assertive)

Add comma after introductory phrase
Insert a comma after “As early as possible” to improve readability:

- As early as possible you want to request approval from Apple…
+ As early as possible, you want to request approval from Apple…

35-35: ⚠️ Potential issue

Broken anchor for “Weird behaviors ⚠️
The link uses (#weird-behaviors-), which does not match the actual heading ID. Update it to remove the trailing hyphen or include the emoji slug, e.g.:

- - [Weird behaviors ⚠️](#weird-behaviors-)
+ - [Weird behaviors ⚠️](#weird-behaviors-⚠️)
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

35-35: Link fragments should be valid
null

(MD051, link-fragments)


148-148: 🧹 Nitpick (assertive)

Grammar: include “the” in superlative phrase
Change “make a best guess here” to “make the best guess here” for correct usage of a superlative:

- We try to make a best guess here
+ We try to make the best guess here
🧰 Tools
🪛 LanguageTool

[grammar] ~148-~148: Use “the” before the superlative.
Context: ...f the Shield UI/actions. We try to make a best guess here - prioritizing apps/web...

(THE_SUPERLATIVE)


549-563: 🧹 Nitpick (assertive)

Remove inline HTML tags in tables
Markdown lint flags <br> in table cells. Refactor these rows to use native Markdown line breaks (two spaces + newline) or separate rows. For example:

-| `DeviceActivitySelectionView` | `familyActivitySelection`: string | null  `<br>` `onSelectionChange`: (event) => void  `<br>` `style`: ViewStyle | Native component...
+| `DeviceActivitySelectionView` |  
+| &nbsp;&nbsp;`familyActivitySelection`: string \| null  
+| &nbsp;&nbsp;`onSelectionChange`: (event) => void  
+| &nbsp;&nbsp;`style`: ViewStyle | Native component that renders the app selection UI |

Apply similar changes to the Hooks and Functions tables.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

551-551: Inline HTML
Element: br

(MD033, no-inline-html)


551-551: Inline HTML
Element: br

(MD033, no-inline-html)


557-557: Inline HTML
Element: br

(MD033, no-inline-html)


557-557: Inline HTML
Element: br

(MD033, no-inline-html)


557-557: Inline HTML
Element: br

(MD033, no-inline-html)


557-557: Inline HTML
Element: br

(MD033, no-inline-html)


187-187: 🧹 Nitpick (assertive)

Add missing comma after “approval”
Clarify the conditional clause by adding a comma:

- Once you've gotten approval you need to manually add…
+ Once you've gotten approval, you need to manually add…
🧰 Tools
🪛 LanguageTool

[uncategorized] ~187-~187: Possible missing comma found.
Context: ...ShieldConfiguration Once you've gotten approval you need to manually add the "Family Co...

(AI_HYDRA_LEO_MISSING_COMMA)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ea4a86f and 657a082.

📒 Files selected for processing (1)
  • README.md (6 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md

[grammar] ~148-~148: Use “the” before the superlative.
Context: ...f the Shield UI/actions. We try to make a best guess here - prioritizing apps/web...

(THE_SUPERLATIVE)


[uncategorized] ~187-~187: Possible missing comma found.
Context: ...ShieldConfiguration Once you've gotten approval you need to manually add the "Family Co...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~189-~189: Possible missing comma found.
Context: ...omatically. ⚠️ If you don't do all the above you will run into a lot of strange prov...

(AI_HYDRA_LEO_MISSING_COMMA)

🪛 markdownlint-cli2 (0.17.2)
README.md

25-25: Link fragments should be valid
null

(MD051, link-fragments)


35-35: Link fragments should be valid
null

(MD051, link-fragments)


551-551: Inline HTML
Element: br

(MD033, no-inline-html)


551-551: Inline HTML
Element: br

(MD033, no-inline-html)


557-557: Inline HTML
Element: br

(MD033, no-inline-html)


557-557: Inline HTML
Element: br

(MD033, no-inline-html)


557-557: Inline HTML
Element: br

(MD033, no-inline-html)


557-557: Inline HTML
Element: br

(MD033, no-inline-html)


564-564: Inline HTML
Element: br

(MD033, no-inline-html)


564-564: Inline HTML
Element: br

(MD033, no-inline-html)


567-567: Inline HTML
Element: br

(MD033, no-inline-html)


570-570: Inline HTML
Element: br

(MD033, no-inline-html)

Comment on lines +194 to +195

````typescript
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Incorrect code fence formatting
The example uses four backticks instead of three, so it won’t render properly. Change:

- ````typescript
+ ```typescript

and close with ``` (three backticks) instead of ````.

🤖 Prompt for AI Agents
In README.md lines 194 to 195, the code fence for the TypeScript example uses
four backticks instead of three, which causes improper rendering. Fix this by
replacing the four backticks with three at the start of the code block and
ensure the closing backticks are also three. This will correctly format the code
block for proper display.

Arlevoy and others added 3 commits May 28, 2025 11:02
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…d adding blank lines for improved readability.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🔭 Outside diff range comments (1)
README.md (1)

206-209: 🧹 Nitpick (assertive)

Normalize code-fence language identifiers
Several fences use TypeScript (capital “T” and “S”). To maintain consistency and better tooling support, use lowercase identifiers (typescript or ts) for all code blocks.

♻️ Duplicate comments (3)
README.md (3)

10-10: Consider moving the warning to a “Prerequisites” section
The important callout on line 10 is buried in the intro. Per a prior suggestion, relocating it into a dedicated “Prerequisites” (or “Before You Begin”) section will improve discoverability and ensure users don’t miss the Apple-approval requirement.


553-563: 🛠️ Refactor suggestion

Remove inline HTML <br> tags in tables
Markdown lint flags the use of <br> in table cells. Replace these with native Markdown line breaks (two spaces + newline) or split into multiple rows. For example:

| `DeviceActivitySelectionView` | `familyActivitySelection`: string \| null<br>`onSelectionChange`: (event) => void<br>`style`: ViewStyle | … |
+| `DeviceActivitySelectionView` | `familyActivitySelection`: string \| null  
+  `onSelectionChange`: (event) => void  
+  `style`: ViewStyle | … |

44-44: 🧹 Nitpick (assertive)

Improve punctuation in the “Note” sentence
The line reads:

Note: Depending on your use case, you might not need all the APIs hence not all the new bundle identifier and capabilities are required.

Consider adding a semicolon before “hence” and commas around it, and pluralizing “identifier” for clarity:

- …you might not need all the APIs hence not all the new bundle identifier and capabilities are required.
+ …you might not need all the APIs; hence, not all the new bundle identifiers and capabilities are required.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 657a082 and d870e3b.

📒 Files selected for processing (1)
  • README.md (6 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md

[uncategorized] ~42-~42: A comma might be missing here.
Context: ...ur use case, you might not need all the APIs hence not all the new bundle identifier...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)


[grammar] ~148-~148: Use “the” before the superlative.
Context: ...f the Shield UI/actions. We try to make a best guess here - prioritizing apps/web...

(THE_SUPERLATIVE)


[uncategorized] ~148-~148: Possible missing comma found.
Context: ...lay a shield specific for the Instagram selection that will take precedence over the less...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~157-~157: The preposition “about” seems more likely in this position.
Context: .... - Event history. Contains information of which events have been triggered and wh...

(AI_EN_LECTOR_REPLACEMENT_PREPOSITION)


[uncategorized] ~176-~176: Possible missing comma found.
Context: ...quires approval from Apple As early as possible you want to [request approval from Appl...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~187-~187: A comma might be missing here.
Context: ...hieldConfiguration` Once you've gotten approval you need to manually add the "Family Co...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)

🪛 markdownlint-cli2 (0.17.2)
README.md

25-25: Link fragments should be valid
null

(MD051, link-fragments)


26-26: Link fragments should be valid
null

(MD051, link-fragments)


27-27: Link fragments should be valid
null

(MD051, link-fragments)


28-28: Link fragments should be valid
null

(MD051, link-fragments)


29-29: Link fragments should be valid
null

(MD051, link-fragments)


30-30: Link fragments should be valid
null

(MD051, link-fragments)


31-31: Link fragments should be valid
null

(MD051, link-fragments)


32-32: Link fragments should be valid
null

(MD051, link-fragments)


33-33: Link fragments should be valid
null

(MD051, link-fragments)


34-34: Link fragments should be valid
null

(MD051, link-fragments)


35-35: Link fragments should be valid
null

(MD051, link-fragments)


36-36: Link fragments should be valid
null

(MD051, link-fragments)

Comment on lines +14 to +18
- [Apple's Screen Time APIs Explained](https://developer.apple.com/videos/play/wwdc2021/10123/)
- [FamilyControl API](#familycontrol-api)
- [ShieldConfiguration API](#shieldconfiguration-api)
- [ShieldAction API](#shieldaction-api)
- [ActivityMonitor API](#activitymonitor-api)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix broken TOC anchors and links
The Table of Contents entries use external URLs or invalid fragment identifiers (e.g., #weird-behaviors-). They should point to internal headings with valid, lowercase, hyphenated anchors (for example: [Apple's Screen Time APIs Explained](#apples-screen-time-apis-explained)). Please update all TOC links to match the actual section IDs.

Also applies to: 20-36

🤖 Prompt for AI Agents
In README.md lines 14 to 18 and also lines 20 to 36, the Table of Contents links
use external URLs or invalid fragment identifiers that do not match the actual
internal heading IDs. Update all TOC links to use valid, lowercase, hyphenated
anchors that correspond exactly to the internal section headings, for example,
change external URLs to internal anchors like #apples-screen-time-apis-explained
and fix any invalid fragments such as #weird-behaviors- to their correct form.

Comment on lines +195 to +200
````typescript
import * as ReactNativeDeviceActivity from "react-native-device-activity";

ReactNativeDeviceActivity.revokeAuthorization();

```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Correct the code fence delimiters
The TypeScript example starts with four backticks (````typescript) but closes with three. This will break rendering. Use three backticks for both start and end:

- ````typescript
+ ```typescript- ```
+ ```
🤖 Prompt for AI Agents
In README.md around lines 195 to 200, the TypeScript code block starts with four
backticks but ends with three, causing rendering issues. Change the opening
delimiter to use three backticks followed by "typescript" to match the closing
three backticks, ensuring consistent code fence delimiters for proper
formatting.

@robertherber robertherber merged commit 0980cdc into kingstinct:main May 31, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants