LeagcyChat

Stars
6
Language
Objective-C
Updated

A wildly over-the-top real-time system performance & diagnostics dashboard built entirely in Objective-C.

šŸš€ CRAZY Features

  • 5 Interactive Gauges: CPU, Memory, FPS, Battery, Disk with particle effects
  • Gesture Controls: Tap for pulse effects, Long press for crazy rotations
  • Haptic Feedback: Impact feedback on interactions
  • Voice Alerts: Speech synthesis for critical warnings
  • Thermal Monitoring: Device temperature with voice alerts
  • Glow Effects: Dynamic glowing for critical states
  • Particle Systems: Explosive particle effects on alerts
  • Debug Mode: Toggle advanced debugging features

Core Features

  • Live System Metrics: CPU usage, memory, FPS, battery, network, thermal state, disk usage
  • Visual Dashboard: Animated circular gauges with Core Animation
  • Performance Monitor: FPS tracker, memory warnings, lifecycle handling
  • Threading: Background collection via GCD, UI updates on main thread
  • Persistence: JSON logging with thermal and disk data
  • UIKit-First: Programmatic Auto Layout, dark mode, adaptive layouts

CRAZY Animations & Effects

CrazyCircularGaugeView:

  • Glow Layer: Dynamic shadow effects for critical values
  • Particle Emitter: CAEmitterLayer with custom particles
  • Pulse Animations: Scale transforms on alerts
  • Rotation Effects: 360° spins on long press
  • Haptic Feedback: UIImpactFeedbackGenerator integration

Voice Synthesis:

  • AVSpeechSynthesizer: Text-to-speech alerts
  • Custom Voice: US English with adjusted rate/pitch
  • Contextual Alerts: Different messages for CPU, memory, thermal

Gesture Interactions:

  • Tap Gesture: Pulse + particles + haptic
  • Long Press: Rotation animation + notification haptic

Architecture

  • MVC Pattern: Clear separation with crazy view components
  • Threading Model: GCD background queues + main queue UI
  • Core Animation: GPU-accelerated effects and particles
  • AVFoundation: Speech synthesis integration

New Metrics Added

  • Thermal State: NSProcessInfo thermal monitoring
  • Disk Usage: File system space calculation
  • Enhanced Logging: All metrics with timestamps

Project Structure

PulseBoard/
ā”œā”€ā”€ Classes/
│   ā”œā”€ā”€ Controllers/
│   │   └── PulseBoardViewController.h/.m
│   ā”œā”€ā”€ Models/
│   │   └── SystemMetrics.h/.m
│   ā”œā”€ā”€ Views/
│   │   └── CircularGaugeView.h/.m
│   └── Utilities/
│       ā”œā”€ā”€ SystemMetricsCollector.h/.m
│       ā”œā”€ā”€ FPSTracker.h/.m
│       └── PerformanceLogger.h/.m
ā”œā”€ā”€ Resources/
ā”œā”€ā”€ Supporting Files/
│   ā”œā”€ā”€ AppDelegate.h/.m
│   ā”œā”€ā”€ SceneDelegate.h/.m
│   └── Info.plist
└── README.md

Key Components

SystemMetricsCollector

Collects system metrics asynchronously using GCD:

  • CPU usage via Mach APIs
  • Memory usage via NSProcessInfo
  • Battery state via UIDevice
  • Network reachability via SCNetworkReachability

FPSTracker

Tracks app FPS using CADisplayLink for accurate frame rate monitoring.

CircularGaugeView

Custom UIView with Core Animation layers for smooth circular progress indicators.

PerformanceLogger

Persists metrics to JSON file in documents directory.

Performance Optimizations

  • Efficient metric collection every 0.5s
  • Background threading to avoid UI blocking
  • Core Animation for GPU-accelerated animations
  • Minimal memory footprint with ARC

Instruments Profiling Tips

  • Use Time Profiler to monitor CPU usage
  • Allocations instrument for memory tracking
  • Core Animation instrument for animation performance
  • Network instrument for connectivity monitoring

Interview Talking Points

  • Objective-C memory management with ARC
  • UIKit programmatic layout vs Storyboards
  • Core Animation layer-based drawing
  • GCD for concurrent programming
  • Mach APIs for low-level system access
  • CADisplayLink for frame-based timing
  • MVC architecture in iOS apps

CRAZY Additions

  • Particle Effects: CAEmitterLayer with custom particle images
  • Voice Synthesis: AVSpeechSynthesizer for alerts
  • Haptic Feedback: Multiple feedback generators
  • Thermal Monitoring: NSProcessInfo thermal state
  • Gesture Interactions: Tap and long press handlers
  • Glow Effects: Dynamic CAShapeLayer shadows# LeagcyChat