expo-app-blocker 0.1.20 → 0.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,33 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as contributors and maintainers pledge to make participation in this project a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to a positive environment:
10
+
11
+ - Using welcoming and inclusive language
12
+ - Being respectful of differing viewpoints and experiences
13
+ - Gracefully accepting constructive criticism
14
+ - Focusing on what is best for the community
15
+ - Showing empathy toward other community members
16
+
17
+ Examples of unacceptable behavior:
18
+
19
+ - The use of sexualized language or imagery
20
+ - Trolling, insulting/derogatory comments, and personal or political attacks
21
+ - Public or private harassment
22
+ - Publishing others' private information without explicit permission
23
+ - Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+ ## Enforcement
26
+
27
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening a GitHub issue or contacting the maintainers directly. All complaints will be reviewed and investigated and will result in a response deemed necessary and appropriate.
28
+
29
+ Maintainers who do not follow or enforce the Code of Conduct may be removed from the project team.
30
+
31
+ ## Attribution
32
+
33
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
@@ -0,0 +1,93 @@
1
+ name: Bug Report
2
+ description: Something isn't working as expected
3
+ labels: ["bug"]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ Before filing a bug, please check [existing issues](https://github.com/eylonshm/expo-app-blocker/issues) and the [Platform Notes](https://github.com/eylonshm/expo-app-blocker#platform-notes) in the README.
9
+
10
+ - type: input
11
+ id: version
12
+ attributes:
13
+ label: expo-app-blocker version
14
+ placeholder: "e.g. 1.2.0"
15
+ validations:
16
+ required: true
17
+
18
+ - type: input
19
+ id: expo_version
20
+ attributes:
21
+ label: Expo SDK version
22
+ placeholder: "e.g. 52"
23
+ validations:
24
+ required: true
25
+
26
+ - type: dropdown
27
+ id: platform
28
+ attributes:
29
+ label: Platform
30
+ options:
31
+ - iOS
32
+ - Android
33
+ - Both
34
+ validations:
35
+ required: true
36
+
37
+ - type: input
38
+ id: os_version
39
+ attributes:
40
+ label: OS version
41
+ placeholder: "e.g. iOS 17.4 / Android 14"
42
+ validations:
43
+ required: true
44
+
45
+ - type: dropdown
46
+ id: device_type
47
+ attributes:
48
+ label: Device type
49
+ options:
50
+ - Physical device
51
+ - Simulator / Emulator
52
+ validations:
53
+ required: true
54
+
55
+ - type: input
56
+ id: device_model
57
+ attributes:
58
+ label: Device model
59
+ placeholder: "e.g. iPhone 15 Pro, Pixel 7"
60
+
61
+ - type: textarea
62
+ id: description
63
+ attributes:
64
+ label: What happened?
65
+ description: A clear description of the bug. Include what you expected vs what actually happened.
66
+ validations:
67
+ required: true
68
+
69
+ - type: textarea
70
+ id: reproduction
71
+ attributes:
72
+ label: Steps to reproduce
73
+ placeholder: |
74
+ 1. Call `requestPermissions()`
75
+ 2. Call `setBlockConfiguration(...)`
76
+ 3. Open blocked app
77
+ 4. ...
78
+ validations:
79
+ required: true
80
+
81
+ - type: textarea
82
+ id: logs
83
+ attributes:
84
+ label: Relevant logs or errors
85
+ description: Paste Xcode console output (iOS) or `adb logcat` output (Android). Redact any personal data.
86
+ render: shell
87
+
88
+ - type: textarea
89
+ id: config
90
+ attributes:
91
+ label: Plugin config (app.json)
92
+ description: Paste the relevant `expo-app-blocker` plugin config from your `app.json`.
93
+ render: json
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Question / Help
4
+ url: https://github.com/eylonshm/expo-app-blocker/discussions
5
+ about: Ask questions and get help from the community
6
+ - name: Apple Developer Portal Setup
7
+ url: https://github.com/eylonshm/expo-app-blocker/blob/master/docs/APPLE_DEVELOPER_SETUP.md
8
+ about: Step-by-step guide for iOS entitlement and App ID setup
@@ -0,0 +1,42 @@
1
+ name: Feature Request
2
+ description: Suggest a new feature or API addition
3
+ labels: ["enhancement"]
4
+ body:
5
+ - type: dropdown
6
+ id: platform
7
+ attributes:
8
+ label: Platform
9
+ options:
10
+ - iOS
11
+ - Android
12
+ - Both
13
+ - Not platform-specific
14
+ validations:
15
+ required: true
16
+
17
+ - type: textarea
18
+ id: problem
19
+ attributes:
20
+ label: What problem does this solve?
21
+ description: Describe the use case or limitation you're running into.
22
+ validations:
23
+ required: true
24
+
25
+ - type: textarea
26
+ id: solution
27
+ attributes:
28
+ label: Proposed solution
29
+ description: What would you like to see added or changed? Include API shape if relevant.
30
+
31
+ - type: textarea
32
+ id: alternatives
33
+ attributes:
34
+ label: Alternatives considered
35
+ description: Any workarounds you've tried, or other libraries that handle this differently.
36
+
37
+ - type: checkboxes
38
+ id: contribution
39
+ attributes:
40
+ label: Willing to contribute?
41
+ options:
42
+ - label: I'd be willing to open a PR for this
@@ -0,0 +1,24 @@
1
+ ## Summary
2
+
3
+ <!-- What does this PR do? Why? -->
4
+
5
+ ## Changes
6
+
7
+ <!-- List the key changes. Focus on the "what" and "why", not line-by-line. -->
8
+
9
+ -
10
+
11
+ ## Testing
12
+
13
+ - [ ] Tested on **iOS** (physical device)
14
+ - [ ] Tested on **Android** (device or emulator)
15
+ - [ ] Ran `npx expo prebuild --clean` and verified native output
16
+
17
+ <!-- Describe how you tested this. Include device/OS version if relevant. -->
18
+
19
+ ## Checklist
20
+
21
+ - [ ] README updated (if public API, props, or config options changed)
22
+ - [ ] Types and JSDoc updated (if new exports added)
23
+ - [ ] No unrelated changes included
24
+ - [ ] PR title is clear and descriptive
@@ -0,0 +1,30 @@
1
+ # Security Policy
2
+
3
+ ## Scope
4
+
5
+ `expo-app-blocker` is a client-side Expo native module. It has no server components, no network requests, and no data collection. Security concerns are most likely to involve:
6
+
7
+ - Unsafe handling of app tokens or opaque selection data
8
+ - Bypassable blocking behavior (iOS shield dismissal, Android overlay escapes)
9
+ - Improper use of entitlements or Android permissions
10
+ - Dependency vulnerabilities
11
+
12
+ ## Reporting a Vulnerability
13
+
14
+ **Please do not report security vulnerabilities via public GitHub issues.**
15
+
16
+ Report vulnerabilities privately using [GitHub's private vulnerability reporting](https://github.com/eylonshm/expo-app-blocker/security/advisories/new).
17
+
18
+ Include as much of the following as possible:
19
+
20
+ - Description of the vulnerability and potential impact
21
+ - Steps to reproduce or proof-of-concept
22
+ - Affected versions
23
+ - Platform (iOS / Android) and OS version
24
+ - Suggested fix, if you have one
25
+
26
+ You can expect an acknowledgement within 72 hours. We'll keep you updated as we investigate and patch.
27
+
28
+ ## Supported Versions
29
+
30
+ Only the latest published version on npm receives security fixes. We recommend always staying up to date.
@@ -0,0 +1,29 @@
1
+ version: 2
2
+ updates:
3
+ # npm dependencies
4
+ - package-ecosystem: "npm"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "weekly"
8
+ day: "monday"
9
+ open-pull-requests-limit: 5
10
+ groups:
11
+ expo:
12
+ patterns:
13
+ - "expo*"
14
+ - "@expo/*"
15
+ ignore:
16
+ # Peer deps — version is dictated by the consuming app, not this package
17
+ - dependency-name: "expo"
18
+ update-types: ["version-update:semver-major"]
19
+ - dependency-name: "react-native"
20
+ update-types: ["version-update:semver-major"]
21
+ - dependency-name: "react"
22
+ update-types: ["version-update:semver-major"]
23
+
24
+ # GitHub Actions
25
+ - package-ecosystem: "github-actions"
26
+ directory: "/"
27
+ schedule:
28
+ interval: "weekly"
29
+ day: "monday"
@@ -10,7 +10,7 @@ jobs:
10
10
  if: "!startsWith(github.event.head_commit.message, 'v')"
11
11
 
12
12
  steps:
13
- - uses: actions/checkout@v4
13
+ - uses: actions/checkout@v6
14
14
 
15
15
  - uses: actions/setup-node@v4
16
16
  with:
@@ -0,0 +1,30 @@
1
+ name: Close stale issues
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "0 8 * * 1" # every Monday at 08:00 UTC
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ stale:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/stale@v9
13
+ with:
14
+ stale-issue-message: >
15
+ This issue has been inactive for 60 days. It will be closed in 7 days
16
+ unless there is further activity. If this is still relevant, please
17
+ leave a comment or a 👍 reaction.
18
+ close-issue-message: >
19
+ Closed due to inactivity. Feel free to reopen if this is still relevant.
20
+ stale-pr-message: >
21
+ This PR has been inactive for 30 days. It will be closed in 7 days
22
+ unless there is further activity.
23
+ close-pr-message: >
24
+ Closed due to inactivity. Feel free to reopen if you'd like to continue.
25
+ days-before-issue-stale: 60
26
+ days-before-issue-close: 7
27
+ days-before-pr-stale: 30
28
+ days-before-pr-close: 7
29
+ exempt-issue-labels: "pinned,security,in-progress"
30
+ exempt-pr-labels: "pinned,in-progress"
package/README.md CHANGED
@@ -12,6 +12,9 @@ https://github.com/user-attachments/assets/37f34797-6b92-40d5-911a-90c40e9ffaaa
12
12
 
13
13
  > **iOS requires Apple Developer Portal setup before building.** See [Prerequisites](#prerequisites) for details.
14
14
 
15
+ > [!IMPORTANT]
16
+ > **Submit your Family Controls distribution approval request now.** App Store distribution requires Apple approval per bundle ID — it can take days to weeks and you can't ship without it. [Request here](https://developer.apple.com/contact/request/family-controls-distribution) (you'll need to submit once per bundle ID — 4 total). You can develop and test locally without waiting.
17
+
15
18
  <details>
16
19
  <summary><strong>Table of Contents</strong></summary>
17
20
 
@@ -167,7 +170,9 @@ npx expo run:android # Android works on emulator
167
170
 
168
171
  3. Assign the App Group to all 4 App IDs
169
172
 
170
- 4. Request **Family Controls** capability approval (works in dev builds without approval)
173
+ 4. Request **Family Controls** capability approval (required for App Store/TestFlight — works in local dev builds without it)
174
+ - Submit the form **once per bundle ID** (4 total): [developer.apple.com/contact/request/family-controls-distribution](https://developer.apple.com/contact/request/family-controls-distribution)
175
+ - Incomplete capability setup causes cryptic provisioning errors — make sure all 4 App IDs have Family Controls + App Groups enabled
171
176
 
172
177
  ### Android
173
178
 
@@ -564,6 +569,8 @@ const styles = StyleSheet.create({
564
569
  - **FamilyActivityPicker is required** - No API to enumerate installed apps on iOS
565
570
  - **Shield customization is limited** - Only icon, title, subtitle, button labels, and colors can be changed. No custom views, fonts, or animations
566
571
  - **Cannot open apps from shield** - Use notifications as a workaround to redirect users to your app
572
+ - **Permission status may lag** - After a user grants or revokes Screen Time access outside your app, the status may not update until the app is restarted. Re-check on app foreground
573
+ - **Picker may crash on large categories** - The native `FamilyActivityPicker` can crash when scrolling through very large app categories. Consider providing fallback UI (e.g. a retry button) if this affects your users
567
574
 
568
575
  ### Android Limitations
569
576
 
@@ -9,6 +9,27 @@ This guide walks you through the one-time setup required in the Apple Developer
9
9
 
10
10
  ---
11
11
 
12
+ ## Step 0: Request Family Controls Approval (Do This First)
13
+
14
+ > **Do this before anything else.** App Store and TestFlight distribution require explicit Apple approval for the Family Controls entitlement. Approval can take days to weeks — start the process immediately.
15
+
16
+ Because `expo-app-blocker` creates 4 bundle identifiers (main app + 3 extensions), **you must submit the request form once for each bundle ID**:
17
+
18
+ | Bundle ID | Submit for |
19
+ |---|---|
20
+ | `com.yourapp.id` | Main app |
21
+ | `com.yourapp.id.DeviceActivityMonitor` | DeviceActivityMonitor extension |
22
+ | `com.yourapp.id.ShieldAction` | ShieldAction extension |
23
+ | `com.yourapp.id.ShieldConfiguration` | ShieldConfiguration extension |
24
+
25
+ Submit each one at: https://developer.apple.com/contact/request/family-controls-distribution
26
+
27
+ **You can continue with local development builds without waiting for approval.** Approval is only required to distribute via TestFlight or the App Store.
28
+
29
+ > **Warning:** If you skip or partially complete the capability setup in Steps 2–6, you will run into cryptic provisioning errors during build. Make sure all 4 App IDs have both **Family Controls** and **App Groups** enabled before building.
30
+
31
+ ---
32
+
12
33
  ## Step 1: Create the App Group
13
34
 
14
35
  The App Group enables data sharing between your main app and the three iOS extensions.
@@ -129,16 +150,13 @@ When you're done, you should have:
129
150
 
130
151
  ## About Family Controls Approval
131
152
 
132
- - **Development builds** (run from Xcode): Family Controls works **without** formal Apple approval
133
- - **TestFlight**: May require approval depending on your account
134
- - **App Store**: Requires Family Controls capability approval from Apple
135
-
136
- To request approval:
137
- 1. Go to https://developer.apple.com/contact/request/family-controls-distribution
138
- 2. Fill out the form explaining your app's use case
139
- 3. Wait for Apple's response (can take days to weeks)
153
+ | Distribution method | Approval required? |
154
+ |---|---|
155
+ | Local dev build (Xcode / `expo run:ios`) | No |
156
+ | TestFlight | Yes |
157
+ | App Store | Yes |
140
158
 
141
- **You can develop and test locally without waiting for approval.**
159
+ See [Step 0](#step-0-request-family-controls-approval-do-this-first) for submission instructions. You must submit once per bundle ID (4 total).
142
160
 
143
161
  ---
144
162
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-app-blocker",
3
- "version": "0.1.20",
3
+ "version": "0.1.22",
4
4
  "description": "Expo module for cross-platform app blocking. Android: UsageStatsManager + Overlay. iOS: Screen Time API (FamilyControls + ManagedSettings + DeviceActivity).",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",