@buivietphi/skill-mobile-mt 2.0.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/AGENTS.md +482 -0
- package/README.md +528 -0
- package/SKILL.md +1399 -0
- package/android/android-native.md +480 -0
- package/bin/install.mjs +976 -0
- package/flutter/flutter.md +304 -0
- package/humanizer/humanizer-mobile.md +295 -0
- package/ios/ios-native.md +182 -0
- package/package.json +56 -0
- package/react-native/react-native.md +743 -0
- package/shared/agent-rules-template.md +343 -0
- package/shared/ai-dlc-workflow.md +237 -0
- package/shared/anti-patterns.md +407 -0
- package/shared/architecture-intelligence.md +416 -0
- package/shared/bug-detection.md +71 -0
- package/shared/ci-cd.md +423 -0
- package/shared/claude-md-template.md +125 -0
- package/shared/code-review.md +133 -0
- package/shared/common-pitfalls.md +117 -0
- package/shared/document-analysis.md +167 -0
- package/shared/error-recovery.md +467 -0
- package/shared/observability.md +688 -0
- package/shared/offline-first.md +377 -0
- package/shared/performance-prediction.md +210 -0
- package/shared/platform-excellence.md +244 -0
- package/shared/prompt-engineering.md +705 -0
- package/shared/release-checklist.md +82 -0
- package/shared/testing-strategy.md +332 -0
- package/shared/ui-ux-mobile.md +667 -0
- package/shared/version-management.md +526 -0
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
# Version Management — SDK Compatibility First
|
|
2
|
+
|
|
3
|
+
> Treat SDK version as a first-class constraint, not an afterthought.
|
|
4
|
+
|
|
5
|
+
## Philosophy
|
|
6
|
+
|
|
7
|
+
**Traditional approach:** Install package → hope it works with current SDK
|
|
8
|
+
**This approach:** Check SDK compatibility BEFORE suggesting any package
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## ⚠️ IMPORTANT: Always WebSearch for Latest
|
|
13
|
+
|
|
14
|
+
**The version matrix below is a SNAPSHOT and may be outdated.**
|
|
15
|
+
**Before installing ANY package or suggesting ANY version:**
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
1. WebSearch "[package] latest version [current year]"
|
|
19
|
+
2. WebSearch "[package] [framework version] compatibility"
|
|
20
|
+
3. Read the OFFICIAL changelog/migration guide
|
|
21
|
+
4. Cross-reference with the matrix below
|
|
22
|
+
|
|
23
|
+
⛔ NEVER rely solely on the matrix below — it was written at a point in time
|
|
24
|
+
✅ ALWAYS verify with WebSearch for the most current information
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Version Matrix (React Native / Expo)
|
|
30
|
+
|
|
31
|
+
### Expo SDK Compatibility
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
Expo SDK 52 (latest - Jan 2025)
|
|
35
|
+
├── React Native: 0.76.x
|
|
36
|
+
├── React: 18.3.x
|
|
37
|
+
├── Node: >= 18.0.0
|
|
38
|
+
├── TypeScript: >= 5.3.0
|
|
39
|
+
└── Metro: 0.80.x
|
|
40
|
+
|
|
41
|
+
Expo SDK 51
|
|
42
|
+
├── React Native: 0.74.x
|
|
43
|
+
├── React: 18.2.x
|
|
44
|
+
├── Node: >= 18.0.0
|
|
45
|
+
├── TypeScript: >= 5.3.0
|
|
46
|
+
└── Metro: 0.80.x
|
|
47
|
+
|
|
48
|
+
Expo SDK 50
|
|
49
|
+
├── React Native: 0.73.x
|
|
50
|
+
├── React: 18.2.x
|
|
51
|
+
├── Node: >= 18.0.0
|
|
52
|
+
├── TypeScript: >= 5.1.0
|
|
53
|
+
└── Metro: 0.76.x
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### React Native CLI Compatibility
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
React Native 0.76.x (latest)
|
|
60
|
+
├── React: 18.3.x
|
|
61
|
+
├── Node: >= 18.0.0
|
|
62
|
+
├── TypeScript: >= 5.0.0
|
|
63
|
+
├── Metro: 0.80.x
|
|
64
|
+
├── Hermes: Latest
|
|
65
|
+
├── iOS: >= 13.4
|
|
66
|
+
└── Android: >= 6.0 (API 23)
|
|
67
|
+
|
|
68
|
+
React Native 0.74.x
|
|
69
|
+
├── React: 18.2.x
|
|
70
|
+
├── Node: >= 18.0.0
|
|
71
|
+
├── TypeScript: >= 5.0.0
|
|
72
|
+
├── Metro: 0.80.x
|
|
73
|
+
├── iOS: >= 13.4
|
|
74
|
+
└── Android: >= 6.0 (API 23)
|
|
75
|
+
|
|
76
|
+
React Native 0.73.x
|
|
77
|
+
├── React: 18.2.x
|
|
78
|
+
├── Node: >= 18.0.0
|
|
79
|
+
├── TypeScript: >= 5.0.0
|
|
80
|
+
├── Metro: 0.76.x
|
|
81
|
+
├── iOS: >= 13.4
|
|
82
|
+
└── Android: >= 6.0 (API 23)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Flutter SDK Compatibility
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
Flutter 3.27.x (latest - Jan 2025)
|
|
91
|
+
├── Dart: >= 3.6.0
|
|
92
|
+
├── iOS: >= 12.0
|
|
93
|
+
├── Android: >= 21 (API 21)
|
|
94
|
+
├── Material: 3.x
|
|
95
|
+
└── Cupertino: Latest
|
|
96
|
+
|
|
97
|
+
Flutter 3.24.x
|
|
98
|
+
├── Dart: >= 3.5.0
|
|
99
|
+
├── iOS: >= 12.0
|
|
100
|
+
├── Android: >= 21 (API 21)
|
|
101
|
+
├── Material: 3.x
|
|
102
|
+
└── Cupertino: Latest
|
|
103
|
+
|
|
104
|
+
Flutter 3.22.x
|
|
105
|
+
├── Dart: >= 3.4.0
|
|
106
|
+
├── iOS: >= 11.0
|
|
107
|
+
├── Android: >= 21 (API 21)
|
|
108
|
+
├── Material: 3.x
|
|
109
|
+
└── Cupertino: Latest
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## iOS Native Compatibility
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
iOS 18+ (latest - 2024)
|
|
118
|
+
├── Xcode: 16.0+
|
|
119
|
+
├── Swift: 6.0+
|
|
120
|
+
├── Deployment Target: iOS 13.0+ (recommended)
|
|
121
|
+
└── CocoaPods: 1.15.x
|
|
122
|
+
|
|
123
|
+
iOS 17
|
|
124
|
+
├── Xcode: 15.0+
|
|
125
|
+
├── Swift: 5.9+
|
|
126
|
+
├── Deployment Target: iOS 12.0+
|
|
127
|
+
└── CocoaPods: 1.14.x
|
|
128
|
+
|
|
129
|
+
iOS 16
|
|
130
|
+
├── Xcode: 14.0+
|
|
131
|
+
├── Swift: 5.7+
|
|
132
|
+
├── Deployment Target: iOS 11.0+
|
|
133
|
+
└── CocoaPods: 1.12.x
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Android Native Compatibility
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
Android 15+ (API 35, latest - 2024)
|
|
142
|
+
├── Android Studio: Ladybug (2024.2.1)+
|
|
143
|
+
├── Gradle: 8.7+
|
|
144
|
+
├── Kotlin: 2.0.x
|
|
145
|
+
├── AGP (Android Gradle Plugin): 8.7.x
|
|
146
|
+
├── Compose: 1.7.x
|
|
147
|
+
└── Min SDK: 24 (Android 7.0) recommended
|
|
148
|
+
|
|
149
|
+
Android 14 (API 34)
|
|
150
|
+
├── Android Studio: Hedgehog (2023.1.1)+
|
|
151
|
+
├── Gradle: 8.4+
|
|
152
|
+
├── Kotlin: 1.9.x
|
|
153
|
+
├── AGP: 8.2.x
|
|
154
|
+
├── Compose: 1.5.x
|
|
155
|
+
└── Min SDK: 23 (Android 6.0)
|
|
156
|
+
|
|
157
|
+
Android 13 (API 33)
|
|
158
|
+
├── Android Studio: Flamingo (2022.2.1)+
|
|
159
|
+
├── Gradle: 8.0+
|
|
160
|
+
├── Kotlin: 1.8.x
|
|
161
|
+
├── AGP: 8.0.x
|
|
162
|
+
├── Compose: 1.4.x
|
|
163
|
+
└── Min SDK: 21 (Android 5.0)
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Package Compatibility Protocol
|
|
169
|
+
|
|
170
|
+
### BEFORE suggesting ANY package:
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
STEP 1: DETECT CURRENT SDK
|
|
174
|
+
React Native:
|
|
175
|
+
- Read package.json → react-native version
|
|
176
|
+
- Check expo.sdkVersion (if Expo)
|
|
177
|
+
|
|
178
|
+
Flutter:
|
|
179
|
+
- Read pubspec.yaml → environment.flutter
|
|
180
|
+
|
|
181
|
+
iOS Native:
|
|
182
|
+
- Read Podfile → platform :ios, 'X.X'
|
|
183
|
+
- Read *.xcodeproj/project.pbxproj → IPHONEOS_DEPLOYMENT_TARGET
|
|
184
|
+
|
|
185
|
+
Android Native:
|
|
186
|
+
- Read app/build.gradle → compileSdkVersion, minSdkVersion
|
|
187
|
+
|
|
188
|
+
STEP 2: CHECK PACKAGE COMPATIBILITY
|
|
189
|
+
- Search package docs for version compatibility
|
|
190
|
+
- Check GitHub releases for SDK support
|
|
191
|
+
- Look for "Supported Versions" in README
|
|
192
|
+
- Verify peer dependencies
|
|
193
|
+
|
|
194
|
+
STEP 3: SUGGEST COMPATIBLE VERSION
|
|
195
|
+
✅ "react-native-reanimated": "^3.6.0" (works with RN 0.73+)
|
|
196
|
+
❌ "react-native-reanimated": "^3.0.0" (requires RN 0.71+, you have 0.70)
|
|
197
|
+
|
|
198
|
+
If incompatible:
|
|
199
|
+
Option 1: Suggest upgrade SDK first
|
|
200
|
+
Option 2: Suggest older compatible package version
|
|
201
|
+
Option 3: Suggest alternative package
|
|
202
|
+
|
|
203
|
+
STEP 4: WARN ABOUT BREAKING CHANGES
|
|
204
|
+
- Major version changes (3.x → 4.x) = breaking changes
|
|
205
|
+
- SDK upgrades may require migration
|
|
206
|
+
- Link to migration guide if available
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Common Package Compatibility
|
|
212
|
+
|
|
213
|
+
### React Native
|
|
214
|
+
|
|
215
|
+
| Package | RN 0.76 | RN 0.74 | RN 0.73 | Notes |
|
|
216
|
+
|---------|---------|---------|---------|-------|
|
|
217
|
+
| **react-navigation** | 7.x | 7.x | 6.x | v7 requires RN 0.74+ |
|
|
218
|
+
| **react-native-reanimated** | 3.16+ | 3.10+ | 3.6+ | Always use latest for SDK |
|
|
219
|
+
| **react-native-gesture-handler** | 2.20+ | 2.18+ | 2.14+ | Match with Reanimated |
|
|
220
|
+
| **react-native-safe-area-context** | 4.12+ | 4.10+ | 4.8+ | Used by React Navigation |
|
|
221
|
+
| **react-native-screens** | 4.0+ | 3.34+ | 3.31+ | Used by React Navigation |
|
|
222
|
+
| **@react-native-async-storage** | 2.0+ | 1.24+ | 1.23+ | Separate from RN core |
|
|
223
|
+
| **react-native-mmkv** | 3.x | 3.x | 2.x | Faster than AsyncStorage |
|
|
224
|
+
| **@shopify/flash-list** | 1.7+ | 1.6+ | 1.6+ | Drop-in FlatList replacement |
|
|
225
|
+
| **axios** | 1.7.x | 1.6.x | 1.6.x | Independent of RN version |
|
|
226
|
+
| **zustand** | 5.x | 4.x | 4.x | Independent of RN version |
|
|
227
|
+
| **@tanstack/react-query** | 5.x | 5.x | 4.x | Check React version |
|
|
228
|
+
|
|
229
|
+
### Expo
|
|
230
|
+
|
|
231
|
+
| Package | Expo 52 | Expo 51 | Expo 50 | Notes |
|
|
232
|
+
|---------|---------|---------|---------|-------|
|
|
233
|
+
| **expo-router** | 4.x | 4.x | 3.x | File-based routing |
|
|
234
|
+
| **expo-image** | ~2.0.0 | ~1.12.0 | ~1.10.0 | Fast image component |
|
|
235
|
+
| **expo-camera** | ~16.0.0 | ~15.0.0 | ~14.0.0 | Camera access |
|
|
236
|
+
| **expo-location** | ~18.0.0 | ~17.0.0 | ~16.0.0 | GPS/location |
|
|
237
|
+
| **expo-notifications** | ~0.29.0 | ~0.28.0 | ~0.27.0 | Push notifications |
|
|
238
|
+
| **expo-secure-store** | ~14.0.0 | ~13.0.0 | ~12.0.0 | Secure storage |
|
|
239
|
+
| **expo-linear-gradient** | ~14.0.0 | ~13.0.0 | ~12.0.0 | Gradient backgrounds |
|
|
240
|
+
|
|
241
|
+
### Flutter
|
|
242
|
+
|
|
243
|
+
| Package | Flutter 3.27 | Flutter 3.24 | Flutter 3.22 | Notes |
|
|
244
|
+
|---------|--------------|--------------|--------------|-------|
|
|
245
|
+
| **riverpod** | 3.x | 3.x | 2.x | State management |
|
|
246
|
+
| **flutter_riverpod** | 3.x | 3.x | 2.x | Match with riverpod |
|
|
247
|
+
| **go_router** | 15.x | 14.x | 13.x | Declarative routing |
|
|
248
|
+
| **dio** | 5.x | 5.x | 5.x | HTTP client |
|
|
249
|
+
| **flutter_bloc** | 9.x | 9.x | 8.x | BLoC pattern |
|
|
250
|
+
| **hive** | 2.x | 2.x | 2.x | Local database |
|
|
251
|
+
| **sqflite** | 2.x | 2.x | 2.x | SQLite for Flutter |
|
|
252
|
+
| **shared_preferences** | 2.x | 2.x | 2.x | Simple key-value |
|
|
253
|
+
| **flutter_secure_storage** | 9.x | 9.x | 8.x | Secure storage |
|
|
254
|
+
| **cached_network_image** | 3.x | 3.x | 3.x | Image caching |
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## Migration Guides
|
|
259
|
+
|
|
260
|
+
### React Native Major Upgrades
|
|
261
|
+
|
|
262
|
+
```
|
|
263
|
+
0.73 → 0.74:
|
|
264
|
+
- New Architecture enabled by default
|
|
265
|
+
- Update Gradle to 8.3+
|
|
266
|
+
- Update CMake if using C++ modules
|
|
267
|
+
- Review breaking changes: https://react-native-community.github.io/upgrade-helper/
|
|
268
|
+
|
|
269
|
+
0.74 → 0.76:
|
|
270
|
+
- React 18.3 required
|
|
271
|
+
- Update Metro config
|
|
272
|
+
- Check deprecated APIs
|
|
273
|
+
- Test with Hermes engine
|
|
274
|
+
|
|
275
|
+
Expo SDK 50 → 51:
|
|
276
|
+
- Run: npx expo install --fix
|
|
277
|
+
- Update app.json with new config
|
|
278
|
+
- Check deprecated expo-* packages
|
|
279
|
+
- Test deep linking configuration
|
|
280
|
+
|
|
281
|
+
Expo SDK 51 → 52:
|
|
282
|
+
- React Native 0.76 included
|
|
283
|
+
- Update expo-router if used
|
|
284
|
+
- Check for breaking changes in expo-* packages
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Flutter Major Upgrades
|
|
288
|
+
|
|
289
|
+
```
|
|
290
|
+
3.22 → 3.24:
|
|
291
|
+
- Dart 3.5 required
|
|
292
|
+
- Update Material widgets to Material 3
|
|
293
|
+
- Check for deprecated APIs
|
|
294
|
+
- Run: flutter pub upgrade --major-versions
|
|
295
|
+
|
|
296
|
+
3.24 → 3.27:
|
|
297
|
+
- Dart 3.6 required
|
|
298
|
+
- New widget deprecations
|
|
299
|
+
- Performance improvements
|
|
300
|
+
- Run: flutter pub upgrade --major-versions
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## Pre-Installation Checklist
|
|
306
|
+
|
|
307
|
+
Before suggesting `npm install` / `yarn add` / `flutter pub add`:
|
|
308
|
+
|
|
309
|
+
```
|
|
310
|
+
□ Current SDK version detected
|
|
311
|
+
□ Package compatibility verified
|
|
312
|
+
□ Peer dependencies checked
|
|
313
|
+
□ Breaking changes reviewed
|
|
314
|
+
□ Migration guide (if needed) linked
|
|
315
|
+
□ Alternative options considered
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## Version Lock Strategy
|
|
321
|
+
|
|
322
|
+
### React Native / Expo
|
|
323
|
+
|
|
324
|
+
```json
|
|
325
|
+
// package.json
|
|
326
|
+
{
|
|
327
|
+
"dependencies": {
|
|
328
|
+
"react-native-reanimated": "~3.6.0", // ~ allows patch (3.6.x)
|
|
329
|
+
"react-navigation": "^6.0.0", // ^ allows minor (6.x.x)
|
|
330
|
+
"axios": "1.6.2" // exact version
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
RULES:
|
|
335
|
+
- Core RN libraries: Use ~ (patch updates only)
|
|
336
|
+
- Navigation/UI: Use ^ (minor updates OK)
|
|
337
|
+
- Data/API: Use exact version (full control)
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### Flutter
|
|
341
|
+
|
|
342
|
+
```yaml
|
|
343
|
+
# pubspec.yaml
|
|
344
|
+
dependencies:
|
|
345
|
+
flutter_riverpod: ^3.0.0 # ^ allows compatible updates
|
|
346
|
+
dio: 5.4.0 # exact version
|
|
347
|
+
go_router: '>=13.0.0 <14.0.0' # range constraint
|
|
348
|
+
|
|
349
|
+
RULES:
|
|
350
|
+
- State management: Use ^ (minor updates OK)
|
|
351
|
+
- HTTP/API: Use exact version
|
|
352
|
+
- Routing: Use range (controlled updates)
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
## Dependency Conflict Resolution
|
|
358
|
+
|
|
359
|
+
### React Native
|
|
360
|
+
|
|
361
|
+
```bash
|
|
362
|
+
# Check for conflicts
|
|
363
|
+
npm ls <package-name>
|
|
364
|
+
yarn why <package-name>
|
|
365
|
+
|
|
366
|
+
# Common conflict: react-native-reanimated + react-native
|
|
367
|
+
Error: react-native-reanimated@3.6.0 requires react-native@>=0.72
|
|
368
|
+
|
|
369
|
+
Fix:
|
|
370
|
+
1. Upgrade react-native to 0.72+
|
|
371
|
+
2. OR downgrade react-native-reanimated to 3.5.x
|
|
372
|
+
3. Check compatibility matrix above
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
### Flutter
|
|
376
|
+
|
|
377
|
+
```bash
|
|
378
|
+
# Check for conflicts
|
|
379
|
+
flutter pub deps
|
|
380
|
+
|
|
381
|
+
# Common conflict: riverpod + flutter_riverpod versions mismatch
|
|
382
|
+
Error: riverpod ^3.0.0 depends on flutter_riverpod ^3.0.0
|
|
383
|
+
|
|
384
|
+
Fix:
|
|
385
|
+
1. Ensure versions match:
|
|
386
|
+
riverpod: ^3.0.0
|
|
387
|
+
flutter_riverpod: ^3.0.0
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
---
|
|
391
|
+
|
|
392
|
+
## Release Mode Testing
|
|
393
|
+
|
|
394
|
+
**CRITICAL:** Always test in release mode before submitting to stores.
|
|
395
|
+
|
|
396
|
+
### React Native
|
|
397
|
+
|
|
398
|
+
```bash
|
|
399
|
+
# iOS Release
|
|
400
|
+
cd ios && pod install && cd ..
|
|
401
|
+
npx react-native run-ios --configuration Release
|
|
402
|
+
|
|
403
|
+
# Android Release
|
|
404
|
+
npx react-native run-android --variant=release
|
|
405
|
+
|
|
406
|
+
COMMON RELEASE-ONLY ISSUES:
|
|
407
|
+
- Hermes bytecode compilation errors
|
|
408
|
+
- Minification breaks code
|
|
409
|
+
- Missing native modules
|
|
410
|
+
- Performance regressions
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
### Expo
|
|
414
|
+
|
|
415
|
+
```bash
|
|
416
|
+
# EAS Build (production-like)
|
|
417
|
+
eas build --profile preview --platform ios
|
|
418
|
+
eas build --profile preview --platform android
|
|
419
|
+
|
|
420
|
+
# Local release build
|
|
421
|
+
npx expo run:ios --configuration Release
|
|
422
|
+
npx expo run:android --variant release
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
### Flutter
|
|
426
|
+
|
|
427
|
+
```bash
|
|
428
|
+
# iOS Release
|
|
429
|
+
flutter build ios --release
|
|
430
|
+
flutter run --release
|
|
431
|
+
|
|
432
|
+
# Android Release
|
|
433
|
+
flutter build apk --release
|
|
434
|
+
flutter build appbundle --release
|
|
435
|
+
|
|
436
|
+
COMMON RELEASE-ONLY ISSUES:
|
|
437
|
+
- Code obfuscation breaks reflection
|
|
438
|
+
- Missing native permissions
|
|
439
|
+
- Assets not bundled correctly
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
---
|
|
443
|
+
|
|
444
|
+
## Version Documentation
|
|
445
|
+
|
|
446
|
+
Always document SDK requirements in README:
|
|
447
|
+
|
|
448
|
+
```markdown
|
|
449
|
+
## Requirements
|
|
450
|
+
|
|
451
|
+
- **React Native:** 0.74.x
|
|
452
|
+
- **Expo SDK:** 51 (if using Expo)
|
|
453
|
+
- **Node:** >= 18.0.0
|
|
454
|
+
- **iOS:** >= 13.0
|
|
455
|
+
- **Android:** >= API 23 (Android 6.0)
|
|
456
|
+
- **Xcode:** 15.0+ (for iOS development)
|
|
457
|
+
- **Android Studio:** Hedgehog (2023.1.1)+ (for Android development)
|
|
458
|
+
|
|
459
|
+
## Dependency Versions
|
|
460
|
+
|
|
461
|
+
Key dependencies are locked to compatible versions. Do not upgrade without testing:
|
|
462
|
+
|
|
463
|
+
- `react-native-reanimated`: ~3.6.0
|
|
464
|
+
- `@react-navigation/native`: ^6.0.0
|
|
465
|
+
- `react-native-mmkv`: ^2.12.0
|
|
466
|
+
|
|
467
|
+
See `package.json` for full list.
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
---
|
|
471
|
+
|
|
472
|
+
## Auto-Detection Script
|
|
473
|
+
|
|
474
|
+
Add to project for teammates:
|
|
475
|
+
|
|
476
|
+
```javascript
|
|
477
|
+
// scripts/check-versions.js
|
|
478
|
+
const { execSync } = require('child_process');
|
|
479
|
+
const pkg = require('../package.json');
|
|
480
|
+
|
|
481
|
+
const RN_VERSION = pkg.dependencies['react-native'];
|
|
482
|
+
const NODE_VERSION = process.version;
|
|
483
|
+
const REQUIRED_NODE = '18.0.0';
|
|
484
|
+
|
|
485
|
+
console.log('📦 Version Check');
|
|
486
|
+
console.log(`React Native: ${RN_VERSION}`);
|
|
487
|
+
console.log(`Node: ${NODE_VERSION} (required: >=${REQUIRED_NODE})`);
|
|
488
|
+
|
|
489
|
+
// Check Node version
|
|
490
|
+
if (parseInt(NODE_VERSION.slice(1)) < parseInt(REQUIRED_NODE)) {
|
|
491
|
+
console.error(`❌ Node version too old. Please upgrade to ${REQUIRED_NODE}+`);
|
|
492
|
+
process.exit(1);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
// Check iOS deployment target
|
|
496
|
+
try {
|
|
497
|
+
const podfile = require('fs').readFileSync('ios/Podfile', 'utf8');
|
|
498
|
+
const match = podfile.match(/platform :ios, '(\d+\.\d+)'/);
|
|
499
|
+
if (match) {
|
|
500
|
+
console.log(`iOS Deployment Target: ${match[1]}`);
|
|
501
|
+
}
|
|
502
|
+
} catch {}
|
|
503
|
+
|
|
504
|
+
console.log('✅ All version checks passed');
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
Run before every install:
|
|
508
|
+
```json
|
|
509
|
+
{
|
|
510
|
+
"scripts": {
|
|
511
|
+
"preinstall": "node scripts/check-versions.js"
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
---
|
|
517
|
+
|
|
518
|
+
## Summary
|
|
519
|
+
|
|
520
|
+
**Core Principle:** SDK version is the foundation. Everything else must align with it.
|
|
521
|
+
|
|
522
|
+
**Workflow:**
|
|
523
|
+
1. Detect SDK version FIRST
|
|
524
|
+
2. Check package compatibility SECOND
|
|
525
|
+
3. Suggest installation THIRD
|
|
526
|
+
4. Test in release mode BEFORE production
|