A lightweight debug tool for iOS developers to instantly see which screen they're on while testing their app.
The overlay label updates automatically as the user moves from screen to screen β no manual calls needed. Tapping the label opens the trail bottom sheet, showing every screen visited in order with the current one highlighted, and the label itself can be dragged to any edge of the screen and stays there across launches.
- π± Real-time screen name overlay β floating label shows the active
UIViewControllerclass name - π Auto-detection β uses method swizzling on
viewDidAppear/viewDidDisappear, no manual calls needed - π Tap for trail details β tap the label to open a bottom sheet and dump the hierarchy/trail to the Xcode console
- π§ Navigation breadcrumbs β records every visited screen, including repeats and back navigation
- β±οΈ Optional screen timing β pass
showTimeOnTrail: trueto include durations in the trail - π«₯ Passthrough touches β the overlay never blocks your app's own interactions
- β‘ Simple setup β call
ScreenRadar.enable()once inside your app's#if DEBUGblock - π Dark & light mode support β overlay automatically adapts to system appearance
- ποΈ Draggable overlay β optionally drag the label anywhere on screen, snaps to nearest edge
- π‘οΈ Debug-only by usage β wrap
ScreenRadar.enable()in#if DEBUGso it never runs in production
| Minimum | |
|---|---|
| iOS | 13.0+ |
| Swift | 5.7+ |
| Xcode | 14.0+ |
- In Xcode, go to File β Add Package Dependenciesβ¦
- Enter the repository URL:
https://github.com/sanketk2020/ScreenRadarKit - Select Up to Next Major Version starting from
1.0.0 - Add to your app target (not a framework target)
Or add it manually to your Package.swift:
dependencies: [
.package(url: "https://github.com/sanketk2020/ScreenRadarKit", from: "1.0.0")
],
targets: [
.target(
name: "YourApp",
dependencies: ["ScreenRadarKit"]
)
]Important: ScreenRadar is a debug tool. Always wrap
ScreenRadar.enable()in#if DEBUGin your app target. If you call it from a Release build, the overlay will appear.
ScreenRadar.enable() takes two optional parameters:
| Parameter | Default | Description |
|---|---|---|
draggable |
false |
Lets you drag the overlay anywhere on screen; snaps to the nearest edge on release |
showTimeOnTrail |
false |
Adds per-screen duration to the navigation trail shown in the bottom sheet |
import ScreenRadarKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
#if DEBUG
ScreenRadar.enable(draggable: true, showTimeOnTrail: true)
#endif
return true
}
}import ScreenRadarKit
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
func scene(
_ scene: UIScene,
willConnectTo session: UISceneSession,
options connectionOptions: UIScene.ConnectionOptions
) {
#if DEBUG
ScreenRadar.enable(draggable: true, showTimeOnTrail: true)
#endif
}
}Prefer the plain
ScreenRadar.enable()call if you don't need dragging or trail timing β both parameters are optional and default tofalse.
#if DEBUG
@import ScreenRadarKit;
[ScreenRadar enableWithDraggable:NO showTimeOnTrail:NO];
#endifWith draggable overlay and trail timing:
#if DEBUG
[ScreenRadar enableWithDraggable:YES showTimeOnTrail:YES];
#endifDisable:
[ScreenRadar disable];Objective-C callers should use the full selector because Swift default parameters are not exposed as Objective-C overloads.
β οΈ SwiftUI β ScreenRadarKit is UIKit-focused today. Native SwiftUI apps may only surface wrapper controllers such asUIHostingController, so SwiftUI screen-name tracking is not supported yet. SwiftUI support may be explored in a future version.
By default the overlay is fixed at the top center. Pass draggable: true to let developers drag it anywhere on screen. It snaps to the nearest edge β top, bottom, left, or right β when released. Position is saved across app launches.
#if DEBUG
ScreenRadar.enable(draggable: true)
#endifTap the overlay label to open a bottom sheet with the current session trail and the previous session trail. The current screen is highlighted, and you can clear or export the trail as a plain text file.
#if DEBUG
ScreenRadar.enable(showTimeOnTrail: true)
#endifYou can combine options:
#if DEBUG
ScreenRadar.enable(draggable: true, showTimeOnTrail: true)
#endifThe overlay automatically adapts to the system appearance β no extra setup needed.
| Light Mode | Dark Mode |
|---|---|
| Black background, white text | White background, black text |
Make sure
UIUserInterfaceStyleis not forced in yourInfo.plist, otherwise the system appearance change will have no effect.
| Component | Responsibility |
|---|---|
ScreenRadar |
Public entry point (enable() / disable()) |
UIViewController+Swizzling |
Hooks into viewDidAppear & viewDidDisappear via Objective-C runtime swizzling |
ViewControllerTracker |
Resolves the topmost VC from the window hierarchy; prints hierarchy on tap |
OverlayWindow |
Creates a UIWindow above all other windows with the floating label |
PassthroughWindow |
Overrides hitTest so touches fall through to the app beneath |
TrailLogger |
Records, persists, clears, and exports screen trails |
TrailBottomSheet |
Presents current and previous session trails |
When active, ScreenRadar prints to the Xcode console:
π ScreenRadar enabled
π± ScreenRadar β HomeViewController
// After tapping the label:
==========================
π‘ ScreenRadar Hierarchy
==========================
β³ UINavigationController
Navigation Stack:
β’ HomeViewController
β’ ProfileViewController
Visible:
β³ ProfileViewController
==========================
π ScreenRadar Trail Export
Project: SampleApp
Session: Current
Generated: 2026-06-08 12:04:21
01. HomeViewController <1s
02. MessagesViewController 12s
03. ProfileViewController β current
ScreenRadar.disable()MIT License. See LICENSE for details.
For questions or feature requests, reach out at sanketk.j.2020@gmail.com or open an issue.
If ScreenRadarKit saved you time while debugging, consider buying me a coffee βοΈ
