Skip to content

Latest commit

Β 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”§ Debug App β€” Internal iOS Debug Menu (MVP)

A minimal, modular iOS app (Swift + SwiftUI) demonstrating an internal developer debug menu for QA and engineering workflows.


πŸš€ Quick highlights

  • Built with Swift and SwiftUI (iOS 15+)
  • Reveal the debug menu with the device Shake gesture (simulator: use Hardware β†’ Shake Gesture or trigger via code)
  • Includes feature flags, device diagnostics, and feedback JSON export
  • Small, clean codebase that is easy to extend and integrate into other apps

✨ Features

  • πŸ” Shake to reveal an in-app Debug Menu
  • βš™οΈ Feature flag toggle(s) (demo)
  • πŸ“± Device & OS diagnostics (printable to console)
  • πŸ“ Export feedback as JSON (printed in MVP β€” extendable to file upload)
  • 🧩 Modular file layout for quick onboarding and extension

πŸ“± How it works

  1. Launch the app in Simulator or on a device.
  2. Trigger a Shake (Simulator: Device β†’ Shake or menu Hardware β†’ Shake Gesture) β€” the debug menu appears.
  3. Use toggles to enable demo feature flags, print device info, or Send Feedback JSON which prints a JSON payload to the console (MVP behaviour).

The debug menu is implemented as a SwiftUI view and is toggled via a NotificationCenter event published by an overridden UIWindow.motionEnded handler in ShakeGesture.swift. This keeps the UI declarative and the event handling platform-friendly.


πŸ›  Files to look at (quick tour)

  • DebugApp.swift β€” App entrypoint (@main) that launches ContentView.
  • ContentView.swift β€” Main screen and the @State that controls debug menu visibility. Attaches .onShake modifier.
  • DebugMenuView.swift β€” Debug UI: toggles, device info button, feedback action.
  • ShakeGesture.swift β€” UIWindow override to post .deviceShaken Notification and View.onShake(_:) modifier to observe it.

πŸ§ͺ Unit tests

The repo includes a small test target with example tests using XCTest. Suggested test cases:

  • Verify feature flag default state and toggle behavior.
  • Verify feedback JSON formatting utility (if moved into a helper).
  • Verify debug visibility state toggles when receiving the .deviceShaken notification (unit-testable by posting the notification).

Run tests in Xcode with:
⌘ + U


▢️ Setup & Run

  1. Clone the repo:
git clone https://github.com/umaidshahid/debug-app
cd DebugApp
Open the Xcode project/workspace (e.g., DebugApp.xcodeproj) in Xcode 15+.
Select a Simulator or a connected device.
Build & run (⌘ + R). To reveal the Debug Menu in Simulator: Device β†’ Shake (or Hardware β†’ Shake Gesture).

About

A minimal, modular iOS app (Swift + SwiftUI) demonstrating an internal developer debug menu for QA and engineering workflows.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages