sickn33/agentic-awesome-skills / plugins/aasb-design-studio/skills/mobile-design
mobile-design
VerifiedDesign and review iOS, Android, React Native or Flutter interfaces for touch, accessibility, navigation, offline behavior and measured performance. Use for mobile app UI work; not a mobile compliance certification.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.0 KB |
| decision-trees.md | markdown | 17.1 KB |
| mobile-backend.md | markdown | 15.7 KB |
| mobile-color-system.md | markdown | 10.2 KB |
| mobile-debugging.md | markdown | 5.1 KB |
| mobile-design-thinking.md | markdown | 16.9 KB |
| mobile-navigation.md | markdown | 12.1 KB |
| mobile-performance.md | markdown | 20.5 KB |
| mobile-testing.md | markdown | 11.6 KB |
| mobile-typography.md | markdown | 11.2 KB |
| platform-android.md | markdown | 19.9 KB |
| platform-ios.md | markdown | 17.5 KB |
| scripts/mobile_audit.py | script | 6.0 KB |
| scripts/test_mobile_audit_review.py | script | 3.1 KB |
| touch-psychology.md | markdown | 17.3 KB |
mobile-debugging.md
View on GitHub# Mobile Debugging Guide
> **Stop console.log() debugging!**
> Mobile apps have complex native layers. Text logs are not enough.
> **This file teaches effective mobile debugging strategies.**
---
## π§ MOBILE DEBUGGING MINDSET
```
Web Debugging: Mobile Debugging:
ββββββββββββββββ ββββββββββββββββ
β Browser β β JS Bridge β
β DevTools β β Native UI β
β Network Tab β β GPU/Memory β
ββββββββββββββββ β Threads β
ββββββββββββββββ
```
**Key Differences:**
1. **Native Layer:** JS code works, but app crashes? It's likely native (Java/Obj-C).
2. **Deployment:** You can't just "refresh". State gets lost or stuck.
3. **Network:** SSL Pinning, proxy settings are harder.
4. **Device Logs:** `adb logcat` and `Console.app` are your truth.
---
## π« AI DEBUGGING ANTI-PATTERNS
| β Default | β
Mobile-Correct |
|------------|-------------------|
| "Log everything" | Use sanitized targeted diagnostics and current React Native DevTools/native profilers |
| "Check network tab" | Use Charles Proxy / Proxyman |
| "It works on simulator" | **Test on Real Device** (HW specific bugs) |
| "Reinstall node_modules" | **Clean Native Build** (Gradle/Pod cache) |
| Ignored native logs | Read `logcat` / Xcode logs |
---
## 1. The Toolset
### β‘ React Native & Expo
| Tool | Purpose | Best For |
|------|---------|----------|
| **Reactotron** | State/API/Redux | JS side debugging |
| **React Native DevTools** | Supported JS/Hermes diagnostics | Use with a compatible RN version; legacy Flipper setup is not universal |
| **Expo Tools** | Element inspector | Quick UI checks |
### π οΈ Native Layer (The Deep Dive)
| Tool | Platform | Command | Why Use? |
|------|----------|---------|----------|
| **Logcat** | Android | `adb logcat` | Native crashes, ANRs |
| **Console** | iOS | via Xcode | Native exceptions, memory |
| **Layout Insp.** | Android | Android Studio | UI hierarchy bugs |
| **View Insp.** | iOS | Xcode | UI hierarchy bugs |
---
## 2. Common Debugging Workflows
### π΅οΈ "The App Just Crashed" (Red Screen vs Crash to Home)
**Scenario A: Red Screen (JS Error)**
- **Cause:** Undefined is not an object, import error.
- **Fix:** Read the stack trace on screen. It's usually clear.
**Scenario B: Crash to Home Screen (Native Crash)**
- **Cause:** Native module failure, memory OOM, permission usage without declaration.
- **Tools:**
- **Android:** `adb logcat '*:E'` (Filter for Errors)
- **iOS:** Open Xcode β Window β Devices β View Device Logs
> **π‘ Pro Tip:** If app crashes immediately on launch, it's possibly configuration, startup JS, resources, signing or native code; inspect the actual crash evidence (Info.plist, AndroidManifest.xml).
### π "API Request Failed" (Network)
**Web:** Open Chrome DevTools β Network.
**Mobile:** *You usually can't see this easily.*
**Solution 1: Reactotron/Flipper**
- View network requests in the monitoring app.
**Solution 2: Proxy (Charles/Proxyman)**
- **Hard but powerful.** See ALL traffic even from native SDKs.
- Use only an authorized isolated debug device/build; scope and remove a test certificate afterward. Never disable production TLS/pinning or inspect unrelated traffic.
### π’ "The UI is Laggy" (Performance)
**Don't guess.** measure.
- **React Native:** Performance Monitor (Shake menu).
- **Android:** "Profile GPU Rendering" in Developer Options.
- **Issues:**
- **JS FPS drop:** Heavy calculation in JS thread.
- **UI FPS drop:** Too many views, intricate hierarchy, heavy images.
---
## 3. Platform-Specific Nightmares
### Android
- **Gradle Sync Fail:** Usually Java version mismatch or duplicate classes.
- **Emulator Network:** Android Emulator reaches the host loopback through `10.0.2.2`; the emulator's own `localhost` is still `127.0.0.1`. Other emulators/devices differ.
- **Cached Builds:** Inspect the exact build failure first; clean only the relevant rebuildable output when justified.
### iOS
- **Pod Issues:** Inspect Pod/Xcode errors and the lockfile first; use a targeted repair, preserving local changes and dependency versions.
- **Signing Errors:** Check Team ID and Bundle Identifier.
- **Cache:** Xcode β Product β Clean Build Folder.
---
## π DEBUGGING CHECKLIST
- [ ] **Is it a JS or Native crash?** (Red screen or home screen?)
- [ ] **Did you clean build?** (Native caches are aggressive)
- [ ] **Are you on a real device?** (Simulators hide concurrency bugs)
- [ ] **Did you check the native logs?** (Not just terminal output)
> **Remember:** If JavaScript looks perfect but the app fails, look closer at the Native side.
A red screen/home-screen distinction is a clue, not a definitive JS/native
diagnosis. Preserve and inspect sanitized stack/crash evidence. React Native
DevTools replaces many legacy Flipper/remote-debugging assumptions; use tools
supported by the installed runtime. A successful simulator run is useful evidence
with hardware limits, not a reason to discard simulator testing entirely.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |