expo-app-blocker 0.1.0 → 0.1.2

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,42 @@
1
+ name: Publish to npm
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+
7
+ jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+ # Skip version bump commits to prevent loops
11
+ if: "!startsWith(github.event.head_commit.message, 'v')"
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - uses: actions/setup-node@v4
17
+ with:
18
+ node-version: 20
19
+ registry-url: https://registry.npmjs.org
20
+
21
+ - name: Determine version bump
22
+ id: version
23
+ run: |
24
+ COMMIT_MSG="${{ github.event.head_commit.message }}"
25
+ if echo "$COMMIT_MSG" | grep -qw "\[major\]"; then
26
+ echo "bump=major" >> $GITHUB_OUTPUT
27
+ elif echo "$COMMIT_MSG" | grep -qw "\[minor\]"; then
28
+ echo "bump=minor" >> $GITHUB_OUTPUT
29
+ else
30
+ echo "bump=patch" >> $GITHUB_OUTPUT
31
+ fi
32
+
33
+ - name: Bump version (no git commit)
34
+ run: npm version ${{ steps.version.outputs.bump }} --no-git-tag-version
35
+
36
+ - name: Publish to npm
37
+ run: npm publish --access public
38
+ env:
39
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
40
+
41
+ - name: Output version
42
+ run: echo "Published $(node -p 'require("./package.json").version')"
package/README.md CHANGED
@@ -22,6 +22,8 @@ Cross-platform app blocking module for Expo. Block other apps and redirect users
22
22
 
23
23
  ### Apple Developer Portal (iOS)
24
24
 
25
+ > **Full step-by-step guide**: [docs/APPLE_DEVELOPER_SETUP.md](docs/APPLE_DEVELOPER_SETUP.md)
26
+
25
27
  1. Register **4 App IDs** with **Family Controls** and **App Groups** capabilities:
26
28
  - `com.yourapp.id` (main app)
27
29
  - `com.yourapp.id.DeviceActivityMonitor`
@@ -0,0 +1,161 @@
1
+ # Apple Developer Portal Setup
2
+
3
+ This guide walks you through the one-time setup required in the Apple Developer Portal for `expo-app-blocker` on iOS.
4
+
5
+ ## Prerequisites
6
+
7
+ - A **paid Apple Developer account** ($99/year)
8
+ - Access to https://developer.apple.com/account
9
+
10
+ ---
11
+
12
+ ## Step 1: Create the App Group
13
+
14
+ The App Group enables data sharing between your main app and the three iOS extensions.
15
+
16
+ 1. Go to **Identifiers**: https://developer.apple.com/account/resources/identifiers/list
17
+ 2. Change the dropdown from **"App IDs"** to **"App Groups"**
18
+ - Or go directly to: https://developer.apple.com/account/resources/identifiers/list/applicationGroup
19
+ 3. Click the **+** (blue plus) button
20
+ 4. Select **App Groups** > **Continue**
21
+ 5. Fill in:
22
+ - **Description**: `Your App Name Shared` (e.g., "My App Blocker Shared")
23
+ - **Identifier**: The value you set in `ios.appGroup` in your plugin config
24
+ - Example: `group.com.yourapp.blocker`
25
+ 6. Click **Continue** > **Register**
26
+
27
+ ---
28
+
29
+ ## Step 2: Register the Main App ID
30
+
31
+ 1. Go to **Identifiers**: https://developer.apple.com/account/resources/identifiers/list
32
+ 2. Make sure the dropdown shows **"App IDs"**
33
+ 3. Click the **+** button
34
+ 4. Select **App IDs** > **Continue**
35
+ 5. Select **App** > **Continue**
36
+ 6. Fill in:
37
+ - **Description**: Your app name (e.g., "My App Blocker")
38
+ - **Bundle ID**: Select **Explicit**, enter your `ios.bundleIdentifier` from `app.json`
39
+ - Example: `com.yourapp.id`
40
+ 7. Scroll down to **Capabilities** and enable:
41
+ - **App Groups**
42
+ - **Family Controls**
43
+ 8. Click **Continue** > **Register**
44
+
45
+ > **Note on Family Controls**: If you don't see Family Controls in the capabilities list, you may need to request it. Look for a link to request additional capabilities, or check if it appears under "Additional Capabilities".
46
+
47
+ ---
48
+
49
+ ## Step 3: Register the DeviceActivityMonitor Extension App ID
50
+
51
+ 1. Click the **+** button again
52
+ 2. **App IDs** > **App** > **Continue**
53
+ 3. Fill in:
54
+ - **Description**: `Your App DeviceActivityMonitor`
55
+ - **Bundle ID**: Explicit, enter `{your-bundle-id}.DeviceActivityMonitor`
56
+ - Example: `com.yourapp.id.DeviceActivityMonitor`
57
+ 4. Enable capabilities:
58
+ - **App Groups**
59
+ - **Family Controls**
60
+ 5. Click **Continue** > **Register**
61
+
62
+ ---
63
+
64
+ ## Step 4: Register the ShieldAction Extension App ID
65
+
66
+ 1. Click the **+** button
67
+ 2. **App IDs** > **App** > **Continue**
68
+ 3. Fill in:
69
+ - **Description**: `Your App ShieldAction`
70
+ - **Bundle ID**: Explicit, enter `{your-bundle-id}.ShieldAction`
71
+ - Example: `com.yourapp.id.ShieldAction`
72
+ 4. Enable capabilities:
73
+ - **App Groups**
74
+ - **Family Controls**
75
+ 5. Click **Continue** > **Register**
76
+
77
+ ---
78
+
79
+ ## Step 5: Register the ShieldConfiguration Extension App ID
80
+
81
+ 1. Click the **+** button
82
+ 2. **App IDs** > **App** > **Continue**
83
+ 3. Fill in:
84
+ - **Description**: `Your App ShieldConfiguration`
85
+ - **Bundle ID**: Explicit, enter `{your-bundle-id}.ShieldConfiguration`
86
+ - Example: `com.yourapp.id.ShieldConfiguration`
87
+ 4. Enable capabilities:
88
+ - **App Groups**
89
+ - **Family Controls**
90
+ 5. Click **Continue** > **Register**
91
+
92
+ ---
93
+
94
+ ## Step 6: Assign the App Group to All App IDs
95
+
96
+ For **each of the 4 App IDs** you just created:
97
+
98
+ 1. Click on the App ID in the list
99
+ 2. Scroll to **App Groups**
100
+ 3. Click **Configure** (or **Edit**)
101
+ 4. Check your App Group (e.g., `group.com.yourapp.blocker`)
102
+ 5. Click **Save**
103
+
104
+ Repeat for all 4:
105
+ - `com.yourapp.id`
106
+ - `com.yourapp.id.DeviceActivityMonitor`
107
+ - `com.yourapp.id.ShieldAction`
108
+ - `com.yourapp.id.ShieldConfiguration`
109
+
110
+ ---
111
+
112
+ ## Summary Checklist
113
+
114
+ When you're done, you should have:
115
+
116
+ - [ ] **1 App Group**: `group.com.yourapp.blocker`
117
+ - [ ] **4 App IDs**, each with Family Controls + App Groups:
118
+
119
+ | App ID | Description |
120
+ |---|---|
121
+ | `com.yourapp.id` | Main app |
122
+ | `com.yourapp.id.DeviceActivityMonitor` | Relock timer extension |
123
+ | `com.yourapp.id.ShieldAction` | Shield button handler extension |
124
+ | `com.yourapp.id.ShieldConfiguration` | Custom shield UI extension |
125
+
126
+ - [ ] App Group assigned to all 4 App IDs
127
+
128
+ ---
129
+
130
+ ## About Family Controls Approval
131
+
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)
140
+
141
+ **You can develop and test locally without waiting for approval.**
142
+
143
+ ---
144
+
145
+ ## Troubleshooting
146
+
147
+ **"Family Controls" not visible in capabilities list**
148
+ - Make sure you're on a paid developer account (not free)
149
+ - Try searching for it in the capabilities search bar
150
+ - You may need to request access: https://developer.apple.com/contact/request/family-controls-distribution
151
+
152
+ **"An App ID with this identifier is not available"**
153
+ - The bundle ID might already be registered. Check your existing identifiers.
154
+
155
+ **App Group not showing when configuring an App ID**
156
+ - Make sure you created the App Group first (Step 1)
157
+ - Try refreshing the page
158
+
159
+ **Signing errors in Xcode after setup**
160
+ - In Xcode: select each target > Signing & Capabilities > set your Team
161
+ - Xcode should automatically create provisioning profiles using the registered App IDs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-app-blocker",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
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",