@codyswann/lisa 2.111.0 → 2.113.0
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.
- package/cdk/package-lisa/package.lisa.json +1 -0
- package/dist/core/lisa.d.ts +42 -0
- package/dist/core/lisa.d.ts.map +1 -1
- package/dist/core/lisa.js +67 -0
- package/dist/core/lisa.js.map +1 -1
- package/expo/package-lisa/package.lisa.json +1 -0
- package/nestjs/package-lisa/package.lisa.json +1 -0
- package/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.mcp.json +3 -3
- package/plugins/lisa-expo/THIRD-PARTY-NOTICES.md +57 -0
- package/plugins/lisa-expo/skills/add-app-clip/SKILL.md +280 -0
- package/plugins/lisa-expo/skills/add-app-clip/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/add-app-clip/references/native-module.md +96 -0
- package/plugins/lisa-expo/skills/building-native-ui/SKILL.md +321 -0
- package/plugins/lisa-expo/skills/building-native-ui/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/animations.md +220 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/controls.md +272 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/form-sheet.md +253 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/gradients.md +106 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/icons.md +213 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/media.md +198 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/route-structure.md +229 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/search.md +248 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/storage.md +121 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/tabs.md +433 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/toolbar-and-headers.md +284 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/visual-effects.md +197 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/webgpu-three.md +605 -0
- package/plugins/lisa-expo/skills/building-native-ui/references/zoom-transitions.md +158 -0
- package/plugins/lisa-expo/skills/eas-update-insights/SKILL.md +228 -0
- package/plugins/lisa-expo/skills/eas-update-insights/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/eas-update-insights/references/channel-insights-schema.md +47 -0
- package/plugins/lisa-expo/skills/eas-update-insights/references/update-insights-schema.md +69 -0
- package/plugins/lisa-expo/skills/expo-api-routes/SKILL.md +369 -0
- package/plugins/lisa-expo/skills/expo-api-routes/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/expo-brownfield/SKILL.md +54 -0
- package/plugins/lisa-expo/skills/expo-brownfield/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/expo-brownfield/references/brownfield-integrated.md +526 -0
- package/plugins/lisa-expo/skills/expo-brownfield/references/brownfield-isolated.md +402 -0
- package/plugins/lisa-expo/skills/expo-brownfield/references/comparison.md +63 -0
- package/plugins/lisa-expo/skills/expo-brownfield/references/troubleshooting.md +88 -0
- package/plugins/lisa-expo/skills/expo-cicd-workflows/SKILL.md +92 -0
- package/plugins/lisa-expo/skills/expo-cicd-workflows/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/expo-cicd-workflows/scripts/fetch.js +113 -0
- package/plugins/lisa-expo/skills/expo-cicd-workflows/scripts/package.json +11 -0
- package/plugins/lisa-expo/skills/expo-cicd-workflows/scripts/validate.js +85 -0
- package/plugins/lisa-expo/skills/expo-deployment/SKILL.md +190 -0
- package/plugins/lisa-expo/skills/expo-deployment/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/expo-deployment/references/app-store-metadata.md +479 -0
- package/plugins/lisa-expo/skills/expo-deployment/references/ios-app-store.md +355 -0
- package/plugins/lisa-expo/skills/expo-deployment/references/play-store.md +246 -0
- package/plugins/lisa-expo/skills/expo-deployment/references/testflight.md +58 -0
- package/plugins/lisa-expo/skills/expo-deployment/references/workflows.md +200 -0
- package/plugins/lisa-expo/skills/expo-dev-client/SKILL.md +164 -0
- package/plugins/lisa-expo/skills/expo-dev-client/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/expo-module/SKILL.md +141 -0
- package/plugins/lisa-expo/skills/expo-module/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/expo-module/references/config-plugin.md +90 -0
- package/plugins/lisa-expo/skills/expo-module/references/create-expo-module.md +206 -0
- package/plugins/lisa-expo/skills/expo-module/references/lifecycle.md +127 -0
- package/plugins/lisa-expo/skills/expo-module/references/module-config.md +48 -0
- package/plugins/lisa-expo/skills/expo-module/references/native-module.md +286 -0
- package/plugins/lisa-expo/skills/expo-module/references/native-view.md +171 -0
- package/plugins/lisa-expo/skills/expo-tailwind-setup/SKILL.md +480 -0
- package/plugins/lisa-expo/skills/expo-tailwind-setup/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/expo-ui-jetpack-compose/SKILL.md +40 -0
- package/plugins/lisa-expo/skills/expo-ui-jetpack-compose/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/expo-ui-swift-ui/SKILL.md +39 -0
- package/plugins/lisa-expo/skills/expo-ui-swift-ui/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/native-data-fetching/SKILL.md +507 -0
- package/plugins/lisa-expo/skills/native-data-fetching/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/native-data-fetching/references/expo-router-loaders.md +344 -0
- package/plugins/lisa-expo/skills/upgrading-expo/SKILL.md +134 -0
- package/plugins/lisa-expo/skills/upgrading-expo/agents/openai.yaml +4 -0
- package/plugins/lisa-expo/skills/upgrading-expo/references/expo-av-to-audio.md +132 -0
- package/plugins/lisa-expo/skills/upgrading-expo/references/expo-av-to-video.md +160 -0
- package/plugins/lisa-expo/skills/upgrading-expo/references/native-tabs.md +124 -0
- package/plugins/lisa-expo/skills/upgrading-expo/references/new-architecture.md +79 -0
- package/plugins/lisa-expo/skills/upgrading-expo/references/react-19.md +79 -0
- package/plugins/lisa-expo/skills/upgrading-expo/references/react-compiler.md +59 -0
- package/plugins/lisa-expo/skills/upgrading-expo/references/react-navigation-to-expo-router.md +61 -0
- package/plugins/lisa-expo/skills/use-dom/SKILL.md +417 -0
- package/plugins/lisa-expo/skills/use-dom/agents/openai.yaml +4 -0
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/src/expo/.mcp.json +3 -3
- package/plugins/src/expo/THIRD-PARTY-NOTICES.md +57 -0
- package/plugins/src/expo/skills/add-app-clip/SKILL.md +280 -0
- package/plugins/src/expo/skills/add-app-clip/references/native-module.md +96 -0
- package/plugins/src/expo/skills/building-native-ui/SKILL.md +321 -0
- package/plugins/src/expo/skills/building-native-ui/references/animations.md +220 -0
- package/plugins/src/expo/skills/building-native-ui/references/controls.md +272 -0
- package/plugins/src/expo/skills/building-native-ui/references/form-sheet.md +253 -0
- package/plugins/src/expo/skills/building-native-ui/references/gradients.md +106 -0
- package/plugins/src/expo/skills/building-native-ui/references/icons.md +213 -0
- package/plugins/src/expo/skills/building-native-ui/references/media.md +198 -0
- package/plugins/src/expo/skills/building-native-ui/references/route-structure.md +229 -0
- package/plugins/src/expo/skills/building-native-ui/references/search.md +248 -0
- package/plugins/src/expo/skills/building-native-ui/references/storage.md +121 -0
- package/plugins/src/expo/skills/building-native-ui/references/tabs.md +433 -0
- package/plugins/src/expo/skills/building-native-ui/references/toolbar-and-headers.md +284 -0
- package/plugins/src/expo/skills/building-native-ui/references/visual-effects.md +197 -0
- package/plugins/src/expo/skills/building-native-ui/references/webgpu-three.md +605 -0
- package/plugins/src/expo/skills/building-native-ui/references/zoom-transitions.md +158 -0
- package/plugins/src/expo/skills/eas-update-insights/SKILL.md +228 -0
- package/plugins/src/expo/skills/eas-update-insights/references/channel-insights-schema.md +47 -0
- package/plugins/src/expo/skills/eas-update-insights/references/update-insights-schema.md +69 -0
- package/plugins/src/expo/skills/expo-api-routes/SKILL.md +369 -0
- package/plugins/src/expo/skills/expo-brownfield/SKILL.md +54 -0
- package/plugins/src/expo/skills/expo-brownfield/references/brownfield-integrated.md +526 -0
- package/plugins/src/expo/skills/expo-brownfield/references/brownfield-isolated.md +402 -0
- package/plugins/src/expo/skills/expo-brownfield/references/comparison.md +63 -0
- package/plugins/src/expo/skills/expo-brownfield/references/troubleshooting.md +88 -0
- package/plugins/src/expo/skills/expo-cicd-workflows/SKILL.md +92 -0
- package/plugins/src/expo/skills/expo-cicd-workflows/scripts/fetch.js +113 -0
- package/plugins/src/expo/skills/expo-cicd-workflows/scripts/package.json +11 -0
- package/plugins/src/expo/skills/expo-cicd-workflows/scripts/validate.js +85 -0
- package/plugins/src/expo/skills/expo-deployment/SKILL.md +190 -0
- package/plugins/src/expo/skills/expo-deployment/references/app-store-metadata.md +479 -0
- package/plugins/src/expo/skills/expo-deployment/references/ios-app-store.md +355 -0
- package/plugins/src/expo/skills/expo-deployment/references/play-store.md +246 -0
- package/plugins/src/expo/skills/expo-deployment/references/testflight.md +58 -0
- package/plugins/src/expo/skills/expo-deployment/references/workflows.md +200 -0
- package/plugins/src/expo/skills/expo-dev-client/SKILL.md +164 -0
- package/plugins/src/expo/skills/expo-module/SKILL.md +141 -0
- package/plugins/src/expo/skills/expo-module/references/config-plugin.md +90 -0
- package/plugins/src/expo/skills/expo-module/references/create-expo-module.md +206 -0
- package/plugins/src/expo/skills/expo-module/references/lifecycle.md +127 -0
- package/plugins/src/expo/skills/expo-module/references/module-config.md +48 -0
- package/plugins/src/expo/skills/expo-module/references/native-module.md +286 -0
- package/plugins/src/expo/skills/expo-module/references/native-view.md +171 -0
- package/plugins/src/expo/skills/expo-tailwind-setup/SKILL.md +480 -0
- package/plugins/src/expo/skills/expo-ui-jetpack-compose/SKILL.md +40 -0
- package/plugins/src/expo/skills/expo-ui-swift-ui/SKILL.md +39 -0
- package/plugins/src/expo/skills/native-data-fetching/SKILL.md +507 -0
- package/plugins/src/expo/skills/native-data-fetching/references/expo-router-loaders.md +344 -0
- package/plugins/src/expo/skills/upgrading-expo/SKILL.md +134 -0
- package/plugins/src/expo/skills/upgrading-expo/references/expo-av-to-audio.md +132 -0
- package/plugins/src/expo/skills/upgrading-expo/references/expo-av-to-video.md +160 -0
- package/plugins/src/expo/skills/upgrading-expo/references/native-tabs.md +124 -0
- package/plugins/src/expo/skills/upgrading-expo/references/new-architecture.md +79 -0
- package/plugins/src/expo/skills/upgrading-expo/references/react-19.md +79 -0
- package/plugins/src/expo/skills/upgrading-expo/references/react-compiler.md +59 -0
- package/plugins/src/expo/skills/upgrading-expo/references/react-navigation-to-expo-router.md +61 -0
- package/plugins/src/expo/skills/use-dom/SKILL.md +417 -0
- package/scripts/generate-codex-plugin-artifacts.mjs +7 -2
- package/scripts/install-claude-plugins.sh +23 -7
- package/typescript/package-lisa/package.lisa.json +2 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# EAS Workflows
|
|
2
|
+
|
|
3
|
+
Automate builds, submissions, and deployments with EAS Workflows.
|
|
4
|
+
|
|
5
|
+
## Web Deployment
|
|
6
|
+
|
|
7
|
+
Deploy web apps on push to main:
|
|
8
|
+
|
|
9
|
+
`.eas/workflows/deploy.yml`
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
name: Deploy
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
push:
|
|
16
|
+
branches:
|
|
17
|
+
- main
|
|
18
|
+
|
|
19
|
+
# https://docs.expo.dev/eas/workflows/syntax/#deploy
|
|
20
|
+
jobs:
|
|
21
|
+
deploy_web:
|
|
22
|
+
type: deploy
|
|
23
|
+
params:
|
|
24
|
+
prod: true
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## PR Previews
|
|
28
|
+
|
|
29
|
+
### Web PR Previews
|
|
30
|
+
|
|
31
|
+
```yaml
|
|
32
|
+
name: Web PR Preview
|
|
33
|
+
|
|
34
|
+
on:
|
|
35
|
+
pull_request:
|
|
36
|
+
types: [opened, synchronize]
|
|
37
|
+
|
|
38
|
+
jobs:
|
|
39
|
+
preview:
|
|
40
|
+
type: deploy
|
|
41
|
+
params:
|
|
42
|
+
prod: false
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Native PR Previews with EAS Updates
|
|
46
|
+
|
|
47
|
+
Deploy OTA updates for pull requests:
|
|
48
|
+
|
|
49
|
+
```yaml
|
|
50
|
+
name: PR Preview
|
|
51
|
+
|
|
52
|
+
on:
|
|
53
|
+
pull_request:
|
|
54
|
+
types: [opened, synchronize]
|
|
55
|
+
|
|
56
|
+
jobs:
|
|
57
|
+
publish:
|
|
58
|
+
type: update
|
|
59
|
+
params:
|
|
60
|
+
branch: "pr-${{ github.event.pull_request.number }}"
|
|
61
|
+
message: "PR #${{ github.event.pull_request.number }}"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Production Release
|
|
65
|
+
|
|
66
|
+
Complete release workflow for both platforms:
|
|
67
|
+
|
|
68
|
+
```yaml
|
|
69
|
+
name: Release
|
|
70
|
+
|
|
71
|
+
on:
|
|
72
|
+
push:
|
|
73
|
+
tags: ['v*']
|
|
74
|
+
|
|
75
|
+
jobs:
|
|
76
|
+
build-ios:
|
|
77
|
+
type: build
|
|
78
|
+
params:
|
|
79
|
+
platform: ios
|
|
80
|
+
profile: production
|
|
81
|
+
|
|
82
|
+
build-android:
|
|
83
|
+
type: build
|
|
84
|
+
params:
|
|
85
|
+
platform: android
|
|
86
|
+
profile: production
|
|
87
|
+
|
|
88
|
+
submit-ios:
|
|
89
|
+
type: submit
|
|
90
|
+
needs: [build-ios]
|
|
91
|
+
params:
|
|
92
|
+
platform: ios
|
|
93
|
+
profile: production
|
|
94
|
+
|
|
95
|
+
submit-android:
|
|
96
|
+
type: submit
|
|
97
|
+
needs: [build-android]
|
|
98
|
+
params:
|
|
99
|
+
platform: android
|
|
100
|
+
profile: production
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Build on Push
|
|
104
|
+
|
|
105
|
+
Trigger builds when pushing to specific branches:
|
|
106
|
+
|
|
107
|
+
```yaml
|
|
108
|
+
name: Build
|
|
109
|
+
|
|
110
|
+
on:
|
|
111
|
+
push:
|
|
112
|
+
branches:
|
|
113
|
+
- main
|
|
114
|
+
- release/*
|
|
115
|
+
|
|
116
|
+
jobs:
|
|
117
|
+
build:
|
|
118
|
+
type: build
|
|
119
|
+
params:
|
|
120
|
+
platform: all
|
|
121
|
+
profile: production
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Conditional Jobs
|
|
125
|
+
|
|
126
|
+
Run jobs based on conditions:
|
|
127
|
+
|
|
128
|
+
```yaml
|
|
129
|
+
name: Conditional Release
|
|
130
|
+
|
|
131
|
+
on:
|
|
132
|
+
push:
|
|
133
|
+
branches: [main]
|
|
134
|
+
|
|
135
|
+
jobs:
|
|
136
|
+
check-changes:
|
|
137
|
+
type: run
|
|
138
|
+
params:
|
|
139
|
+
command: |
|
|
140
|
+
if git diff --name-only HEAD~1 | grep -q "^src/"; then
|
|
141
|
+
echo "has_changes=true" >> $GITHUB_OUTPUT
|
|
142
|
+
fi
|
|
143
|
+
|
|
144
|
+
build:
|
|
145
|
+
type: build
|
|
146
|
+
needs: [check-changes]
|
|
147
|
+
if: needs.check-changes.outputs.has_changes == 'true'
|
|
148
|
+
params:
|
|
149
|
+
platform: all
|
|
150
|
+
profile: production
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Workflow Syntax Reference
|
|
154
|
+
|
|
155
|
+
### Triggers
|
|
156
|
+
|
|
157
|
+
```yaml
|
|
158
|
+
on:
|
|
159
|
+
push:
|
|
160
|
+
branches: [main, develop]
|
|
161
|
+
tags: ['v*']
|
|
162
|
+
pull_request:
|
|
163
|
+
types: [opened, synchronize, reopened]
|
|
164
|
+
schedule:
|
|
165
|
+
- cron: '0 0 * * *' # Daily at midnight
|
|
166
|
+
workflow_dispatch: # Manual trigger
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Job Types
|
|
170
|
+
|
|
171
|
+
| Type | Purpose |
|
|
172
|
+
|------|---------|
|
|
173
|
+
| `build` | Create app builds |
|
|
174
|
+
| `submit` | Submit to app stores |
|
|
175
|
+
| `update` | Publish OTA updates |
|
|
176
|
+
| `deploy` | Deploy web apps |
|
|
177
|
+
| `run` | Execute custom commands |
|
|
178
|
+
|
|
179
|
+
### Job Dependencies
|
|
180
|
+
|
|
181
|
+
```yaml
|
|
182
|
+
jobs:
|
|
183
|
+
first:
|
|
184
|
+
type: build
|
|
185
|
+
params:
|
|
186
|
+
platform: ios
|
|
187
|
+
|
|
188
|
+
second:
|
|
189
|
+
type: submit
|
|
190
|
+
needs: [first] # Runs after 'first' completes
|
|
191
|
+
params:
|
|
192
|
+
platform: ios
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## Tips
|
|
196
|
+
|
|
197
|
+
- Use `workflow_dispatch` for manual production releases
|
|
198
|
+
- Combine PR previews with GitHub status checks
|
|
199
|
+
- Use tags for versioned releases
|
|
200
|
+
- Keep sensitive values in EAS Secrets, not workflow files
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: expo-dev-client
|
|
3
|
+
description: Build and distribute Expo development clients locally or via TestFlight
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
license: MIT
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Use EAS Build to create development clients for testing native code changes on physical devices. Use this for creating custom Expo Go clients for testing branches of your app.
|
|
9
|
+
|
|
10
|
+
## Important: When Development Clients Are Needed
|
|
11
|
+
|
|
12
|
+
**Only create development clients when your app requires custom native code.** Most apps work fine in Expo Go.
|
|
13
|
+
|
|
14
|
+
You need a dev client ONLY when using:
|
|
15
|
+
- Local Expo modules (custom native code)
|
|
16
|
+
- Apple targets (widgets, app clips, extensions)
|
|
17
|
+
- Third-party native modules not in Expo Go
|
|
18
|
+
|
|
19
|
+
**Try Expo Go first** with `npx expo start`. If everything works, you don't need a dev client.
|
|
20
|
+
|
|
21
|
+
## EAS Configuration
|
|
22
|
+
|
|
23
|
+
Ensure `eas.json` has a development profile:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"cli": {
|
|
28
|
+
"version": ">= 16.0.1",
|
|
29
|
+
"appVersionSource": "remote"
|
|
30
|
+
},
|
|
31
|
+
"build": {
|
|
32
|
+
"production": {
|
|
33
|
+
"autoIncrement": true
|
|
34
|
+
},
|
|
35
|
+
"development": {
|
|
36
|
+
"autoIncrement": true,
|
|
37
|
+
"developmentClient": true
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"submit": {
|
|
41
|
+
"production": {},
|
|
42
|
+
"development": {}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Key settings:
|
|
48
|
+
- `developmentClient: true` - Bundles expo-dev-client for development builds
|
|
49
|
+
- `autoIncrement: true` - Automatically increments build numbers
|
|
50
|
+
- `appVersionSource: "remote"` - Uses EAS as the source of truth for version numbers
|
|
51
|
+
|
|
52
|
+
## Building for TestFlight
|
|
53
|
+
|
|
54
|
+
Build iOS dev client and submit to TestFlight in one command:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
eas build -p ios --profile development --submit
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
This will:
|
|
61
|
+
1. Build the development client in the cloud
|
|
62
|
+
2. Automatically submit to App Store Connect
|
|
63
|
+
3. Send you an email when the build is ready in TestFlight
|
|
64
|
+
|
|
65
|
+
After receiving the TestFlight email:
|
|
66
|
+
1. Download the build from TestFlight on your device
|
|
67
|
+
2. Launch the app to see the expo-dev-client UI
|
|
68
|
+
3. Connect to your local Metro bundler or scan a QR code
|
|
69
|
+
|
|
70
|
+
## Building Locally
|
|
71
|
+
|
|
72
|
+
Build a development client on your machine:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# iOS (requires Xcode)
|
|
76
|
+
eas build -p ios --profile development --local
|
|
77
|
+
|
|
78
|
+
# Android
|
|
79
|
+
eas build -p android --profile development --local
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Local builds output:
|
|
83
|
+
- iOS: `.ipa` file
|
|
84
|
+
- Android: `.apk` or `.aab` file
|
|
85
|
+
|
|
86
|
+
## Installing Local Builds
|
|
87
|
+
|
|
88
|
+
Install iOS build on simulator:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Find the .app in the .tar.gz output
|
|
92
|
+
tar -xzf build-*.tar.gz
|
|
93
|
+
xcrun simctl install booted ./path/to/App.app
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Install iOS build on device (requires signing):
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Use Xcode Devices window or ideviceinstaller
|
|
100
|
+
ideviceinstaller -i build.ipa
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Install Android build:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
adb install build.apk
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Building for Specific Platform
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# iOS only
|
|
113
|
+
eas build -p ios --profile development
|
|
114
|
+
|
|
115
|
+
# Android only
|
|
116
|
+
eas build -p android --profile development
|
|
117
|
+
|
|
118
|
+
# Both platforms
|
|
119
|
+
eas build --profile development
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Checking Build Status
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# List recent builds
|
|
126
|
+
eas build:list
|
|
127
|
+
|
|
128
|
+
# View build details
|
|
129
|
+
eas build:view
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Using the Dev Client
|
|
133
|
+
|
|
134
|
+
Once installed, the dev client provides:
|
|
135
|
+
- **Development server connection** - Enter your Metro bundler URL or scan QR
|
|
136
|
+
- **Build information** - View native build details
|
|
137
|
+
- **Launcher UI** - Switch between development servers
|
|
138
|
+
|
|
139
|
+
Connect to local development:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# Start Metro bundler
|
|
143
|
+
npx expo start --dev-client
|
|
144
|
+
|
|
145
|
+
# Scan QR code with dev client or enter URL manually
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Troubleshooting
|
|
149
|
+
|
|
150
|
+
**Build fails with signing errors:**
|
|
151
|
+
```bash
|
|
152
|
+
eas credentials
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Clear build cache:**
|
|
156
|
+
```bash
|
|
157
|
+
eas build -p ios --profile development --clear-cache
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**Check EAS CLI version:**
|
|
161
|
+
```bash
|
|
162
|
+
eas --version
|
|
163
|
+
eas update
|
|
164
|
+
```
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: expo-module
|
|
3
|
+
description: Guide for creating and writing Expo native modules and views using the Expo Modules API (Swift, Kotlin, TypeScript). Covers module definition DSL, native views, shared objects, config plugins, lifecycle hooks, autolinking, and type system. Use when building or modifying native modules for Expo.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
license: MIT
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Writing Expo Modules
|
|
9
|
+
|
|
10
|
+
Complete reference for building native modules and views using the Expo Modules API. Covers Swift (iOS), Kotlin (Android), and TypeScript.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- Creating a new Expo native module or native view
|
|
15
|
+
- Adding native functionality (camera, sensors, system APIs) to an Expo app
|
|
16
|
+
- Wrapping platform SDKs for React Native consumption
|
|
17
|
+
- Building config plugins that modify native project files
|
|
18
|
+
- Adding Android, Apple, or web support to an existing Expo module
|
|
19
|
+
- Editing `expo-module.config.json`, config plugins, or lifecycle hooks
|
|
20
|
+
|
|
21
|
+
## References
|
|
22
|
+
|
|
23
|
+
Consult these resources as needed:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
references/
|
|
27
|
+
create-expo-module.md Scaffolding and add-platform-support workflow, defaults, and quirks
|
|
28
|
+
native-module.md Module definition DSL: Name, Function, AsyncFunction, Property, Constant, Events, type system, shared objects
|
|
29
|
+
native-view.md Native view components: View, Prop, EventDispatcher, view lifecycle, ref-based functions
|
|
30
|
+
lifecycle.md Lifecycle hooks: module, iOS app/AppDelegate, Android activity/application listeners
|
|
31
|
+
config-plugin.md Config plugins: modifying Info.plist, AndroidManifest.xml, reading values in native code
|
|
32
|
+
module-config.md expo-module.config.json fields, file placement, and autolinking behavior
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Quick Start
|
|
36
|
+
|
|
37
|
+
Prefer `create-expo-module` over manually creating native module files and directories. In practice, the best path is usually to create the scaffold first and then build on top of it. The scaffold sets up the expected layout, `expo-module.config.json`, podspec or Gradle files, TypeScript bindings, and the standalone example app flow.
|
|
38
|
+
|
|
39
|
+
If an existing Expo module only needs another platform, use `create-expo-module add-platform-support` instead of manually copying native directories.
|
|
40
|
+
|
|
41
|
+
See [references/create-expo-module.md](references/create-expo-module.md) before scaffolding or extending a module. It covers:
|
|
42
|
+
|
|
43
|
+
- local vs standalone modules
|
|
44
|
+
- `--platform`, `--features`, `--barrel`, `--package-manager`, and non-interactive mode
|
|
45
|
+
- `expo.autolinking.nativeModulesDir`
|
|
46
|
+
- `add-platform-support` behavior and quirks
|
|
47
|
+
|
|
48
|
+
## Recommended Workflow
|
|
49
|
+
|
|
50
|
+
1. Choose the scaffold type first:
|
|
51
|
+
- **Local module** for one app
|
|
52
|
+
- **Standalone module** for reuse, monorepos, or publishing
|
|
53
|
+
2. Determine native `expo-module` features that you will need.
|
|
54
|
+
- Based on the user's instructions determine which feature scaffolding will be useful.
|
|
55
|
+
- Available features: `Constant`, `Function`, `AsyncFunction`, `Event`, `View`, `ViewEvent`, `SharedObject`
|
|
56
|
+
3. Scaffold deliberately:
|
|
57
|
+
- pass an explicit slug or path
|
|
58
|
+
- choose `--platform` intentionally instead of relying on defaults
|
|
59
|
+
- use `--features` to choose code samples which you will modify in the next step to match the real implementation.
|
|
60
|
+
4. Replace generated example code with the real implementation.
|
|
61
|
+
5. If you add a new platform later, prefer `add-platform-support` over manual file copying.
|
|
62
|
+
|
|
63
|
+
## Practical Scaffolding Rules
|
|
64
|
+
|
|
65
|
+
- Feature examples are **opt-in**. A newly scaffolded module may be minimal if no features were selected.
|
|
66
|
+
- `ViewEvent` implies `View`.
|
|
67
|
+
- Local modules do **not** generate an `index.ts` barrel by default. Use `--barrel` only if you want one.
|
|
68
|
+
- In non-interactive local scaffolding, pass the positional slug or path explicitly. `--name` changes the native class name, not the folder name.
|
|
69
|
+
- Local modules live in `expo.autolinking.nativeModulesDir` when configured, otherwise in `modules/`.
|
|
70
|
+
- Standalone modules have their own package metadata, scripts, and usually an example app. Local modules use the host app's tooling instead.
|
|
71
|
+
|
|
72
|
+
## Core File Shapes
|
|
73
|
+
|
|
74
|
+
The Swift and Kotlin DSL share the same structure. Swift is usually the clearest primary example; consult the references for feature-specific details.
|
|
75
|
+
|
|
76
|
+
## Module Structure Reference
|
|
77
|
+
|
|
78
|
+
The Swift and Kotlin DSL share the same structure. Both platforms are shown here for reference — in other reference files, Swift is shown as the primary language unless the Kotlin pattern meaningfully differs.
|
|
79
|
+
|
|
80
|
+
**Swift (iOS):**
|
|
81
|
+
|
|
82
|
+
```swift
|
|
83
|
+
import ExpoModulesCore
|
|
84
|
+
|
|
85
|
+
public class MyModule: Module {
|
|
86
|
+
public func definition() -> ModuleDefinition {
|
|
87
|
+
Name("MyModule")
|
|
88
|
+
|
|
89
|
+
Function("hello") { (name: String) -> String in
|
|
90
|
+
return "Hello \(name)!"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Kotlin (Android):**
|
|
97
|
+
|
|
98
|
+
```kotlin
|
|
99
|
+
package expo.modules.mymodule
|
|
100
|
+
|
|
101
|
+
import expo.modules.kotlin.modules.Module
|
|
102
|
+
import expo.modules.kotlin.modules.ModuleDefinition
|
|
103
|
+
|
|
104
|
+
class MyModule : Module() {
|
|
105
|
+
override fun definition() = ModuleDefinition {
|
|
106
|
+
Name("MyModule")
|
|
107
|
+
|
|
108
|
+
Function("hello") { name: String ->
|
|
109
|
+
"Hello $name!"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**TypeScript:**
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
import { requireNativeModule } from "expo";
|
|
119
|
+
|
|
120
|
+
const MyModule = requireNativeModule("MyModule");
|
|
121
|
+
|
|
122
|
+
export function hello(name: string): string {
|
|
123
|
+
return MyModule.hello(name);
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### expo-module.config.json
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
{
|
|
131
|
+
"platforms": ["android", "apple"],
|
|
132
|
+
"apple": {
|
|
133
|
+
"modules": ["MyModule"]
|
|
134
|
+
},
|
|
135
|
+
"android": {
|
|
136
|
+
"modules": ["expo.modules.mymodule.MyModule"]
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Note: iOS uses just the class name; Android uses the fully-qualified class name (package + class). See `references/module-config.md` for all fields.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Config Plugins Reference
|
|
2
|
+
|
|
3
|
+
Config plugins customize native Android and iOS projects generated with `npx expo prebuild`. They are synchronous functions that accept an `ExpoConfig` and return a modified version.
|
|
4
|
+
|
|
5
|
+
## Plugin Structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
my-module/
|
|
9
|
+
plugin/
|
|
10
|
+
tsconfig.json
|
|
11
|
+
src/
|
|
12
|
+
index.ts
|
|
13
|
+
app.plugin.js # Entry: module.exports = require('./plugin/build');
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Writing a Plugin
|
|
17
|
+
|
|
18
|
+
Plugin functions follow the `with` prefix naming convention.
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import {
|
|
22
|
+
ConfigPlugin,
|
|
23
|
+
withInfoPlist,
|
|
24
|
+
withAndroidManifest,
|
|
25
|
+
AndroidConfig,
|
|
26
|
+
} from "expo/config-plugins";
|
|
27
|
+
|
|
28
|
+
const withMyConfig: ConfigPlugin<{ apiKey: string }> = (config, { apiKey }) => {
|
|
29
|
+
// iOS: modify Info.plist
|
|
30
|
+
config = withInfoPlist(config, (config) => {
|
|
31
|
+
config.modResults["MY_API_KEY"] = apiKey;
|
|
32
|
+
return config;
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// Android: modify AndroidManifest.xml
|
|
36
|
+
config = withAndroidManifest(config, (config) => {
|
|
37
|
+
const mainApp =
|
|
38
|
+
AndroidConfig.Manifest.getMainApplicationOrThrow(config.modResults);
|
|
39
|
+
AndroidConfig.Manifest.addMetaDataItemToMainApplication(
|
|
40
|
+
mainApp,
|
|
41
|
+
"MY_API_KEY",
|
|
42
|
+
apiKey
|
|
43
|
+
);
|
|
44
|
+
return config;
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
return config;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export default withMyConfig;
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Using in app.json
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"expo": {
|
|
58
|
+
"plugins": [["my-module", { "apiKey": "secret_key" }]]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Reading Config Values in Native Code
|
|
64
|
+
|
|
65
|
+
**Swift:**
|
|
66
|
+
|
|
67
|
+
```swift
|
|
68
|
+
Function("getApiKey") {
|
|
69
|
+
return Bundle.main.object(forInfoDictionaryKey: "MY_API_KEY") as? String
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Kotlin:**
|
|
74
|
+
|
|
75
|
+
```kotlin
|
|
76
|
+
Function("getApiKey") {
|
|
77
|
+
val appInfo = appContext?.reactContext?.packageManager?.getApplicationInfo(
|
|
78
|
+
appContext?.reactContext?.packageName.toString(),
|
|
79
|
+
PackageManager.GET_META_DATA
|
|
80
|
+
)
|
|
81
|
+
return@Function appInfo?.metaData?.getString("MY_API_KEY")
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Key Rules
|
|
86
|
+
|
|
87
|
+
- Plugins must be synchronous; return values must be serializable (except `mods`)
|
|
88
|
+
- `Mods` are async functions invoked during the prebuild "syncing" phase
|
|
89
|
+
- Use `npm run build plugin` to compile TypeScript plugins
|
|
90
|
+
- Test with `npx expo prebuild --clean`
|