TouchInspector - a lightweight package that helps you visualize and debug touches on iOS and iPadOS

Overview

TouchInspector Banner

TouchInspector

TouchInspector is a lightweight package that helps you visualize and debug touches on iOS and iPadOS.

Showing touches is super useful when recording and sharing demos from a device or Simulator.

TouchInspector can optionally also show hit-testing information (i.e. which view a touch is hitting). This is great when trying to identify the type of some view, or debug where a touch is actually going.

Installation

Add TouchInspector to your app's Package.swift file, or selecting File -> Add Packages in Xcode:

.package(url: "https://github.com/jtrivedi/TouchInspector", from: "0.1.0"))

Usage

You'll need to change the type of your application/scene's window to TouchInspectorWindow, which you can do conditionally when developing:

import TouchInspector

func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
    guard let windowScene = (scene as? UIWindowScene) else {
        return
    }
    
    #if DEBUG
    window = TouchInspectorWindow(windowScene: windowScene)
    #else
    window = UIWindow(windowScene: windowScene)
    #endif
    
    window?.rootViewController = ViewController()
    window?.makeKeyAndVisible()
}

Touch and hit-testing visualization is enabled by default when creating a TouchInspectorWindow. You can change that with the following properties:

// Show the touch indicator, but not the hit-testing overlay.
window.showTouches = true
window.showHitTesting = false
You might also like...
Set of easy to use debugging tools for iOS developers & QA engineers.
Set of easy to use debugging tools for iOS developers & QA engineers.

DBDebugToolkit DBDebugToolkit is a debugging library written in Objective-C. It is meant to provide as many easily accessible tools as possible while

Chisel is a collection of LLDB commands to assist debugging iOS apps.

Chisel Chisel is a collection of LLDB commands to assist in the debugging of iOS apps. [Installation • Commands • Custom Commands • Development Workfl

Next generation debugging framework for iOS
Next generation debugging framework for iOS

Alpha is the idea of a next generation debugging framework for iOS applications. It combines multiple debugging tools built on top of a simple, unifie

iOS network debugging, like a wizard 🧙‍♂️
iOS network debugging, like a wizard 🧙‍♂️

Start debugging iOS network calls like a wizard, without extra code! Wormholy makes debugging quick and reliable. What you can do: No code to write an

Profiling / Debugging assist tools for iOS. (Memory Leak, OOM, ANR, Hard Stalling, Network, OpenGL, Time Profile ...)
Profiling / Debugging assist tools for iOS. (Memory Leak, OOM, ANR, Hard Stalling, Network, OpenGL, Time Profile ...)

MTHawkeye Readme 中文版本 MTHawkeye is profiling, debugging tools for iOS used in Meitu. It's designed to help iOS developers improve development producti

blued enhanced tweak for iOS

BLUEDHOOK 本项目支持 Blued、Blued 极速版。 非越狱机型请通过 Monkeydev 环境打包 ipa 或 dylib/deb 进行重签名,越狱机型直接安装 release deb 即可。 已知问题 重签后不支持 apns 推送 同时安装 Blued、Blued 极速版 并登录同一

Free macOS app for iOS view debugging.
Free macOS app for iOS view debugging.

Introduction You can inspect and modify views in iOS app via Lookin, just like UI Inspector in Xcode, or another app called Reveal. Official Website:h

A collection of tools for debugging, diffing, and testing your application's data structures.

Custom Dump A collection of tools for debugging, diffing, and testing your application's data structures. Motivation customDump diff XCTAssertNoDiffer

Automaticly display Log,Crash,Network,ANR,Leak,CPU,RAM,FPS,NetFlow,Folder and etc with one line of code based on Swift. Just like God opened his eyes
Automaticly display Log,Crash,Network,ANR,Leak,CPU,RAM,FPS,NetFlow,Folder and etc with one line of code based on Swift. Just like God opened his eyes

GodEye Automaticly display Log,Crash,Network,ANR,Leak,CPU,RAM,FPS,NetFlow,Folder and etc with one line of code based on Swift. Just like God opened hi

Comments
  • Small README Clarifications

    Small README Clarifications

    A couple of small clarifications in README.md:

    • I wasn't clear what you were referring to with ViewController(), so I made it more explicit
    • I missed that hit testing is also on by default, so I made that marginally more clear.
    opened by cliss 1
  • Fix Incorrect Name on Example Variable

    Fix Incorrect Name on Example Variable

    Somehow I accomplished messing up a two-line PR (#2). 🤦

    When I was originally revamping the README, I was using initialViewController as the example variable name, but then changed it to rootViewController... in only one of two places.

    This fixes that.

    opened by cliss 0
Owner
Janum Trivedi
Janum Trivedi
In-app console and debug tools for iOS developers

LocalConsole Welcome to LocalConsole! This Swift Package makes on-device debugging easy with a convenient PiP-style console that can display items in

Duraid Abdul 650 Jan 1, 2023
Customizable Console UI overlay with debug log on top of your iOS App

AEConsole Customizable Console UI overlay with debug log on top of your iOS App AEConsole is built on top of AELog, so you should probably see that fi

Marko Tadić 142 Dec 21, 2022
a iOS network debug library, monitor HTTP requests

NetworkEye README 中文 NetworkEye,a iOS network debug library,monitor HTTP requests. It can be detected HTTP request include web pages, NSURLConnection,

coderyi 1.4k Dec 31, 2022
SwiftUI iOS Debug & HotReloading in VSCode

SwiftUI iOS Debug & HotReloading in VSCode Demonstrating vscode development environment using xcodegen + HotReloading. Language Server Protocol for Sw

Mark Turner 119 Dec 27, 2022
A lightweight, one line setup, iOS / OSX network debugging library! 🦊

Netfox provides a quick look on all executed network requests performed by your iOS or OSX app. It grabs all requests - of course yours, requests from

Christos Kasketis 3.4k Dec 28, 2022
Remote network and data debugging for your native iOS app using Chrome Developer Tools

PonyDebugger PonyDebugger is a remote debugging toolset. It is a client library and gateway server combination that uses Chrome Developer Tools on you

Square 5.9k Dec 24, 2022
An in-app debugging and exploration tool for iOS

FLEX FLEX (Flipboard Explorer) is a set of in-app debugging and exploration tools for iOS development. When presented, FLEX shows a toolbar that lives

FLEXTool 13.3k Dec 31, 2022
Dotzu In-App iOS Debugging Tool With Enhanced Logging, Networking Info, Crash reporting And More.

Dotzu In-App iOS Debugging Tool With Enhanced Logging, Networking Info, Crash reporting And More. The debugger tool for iOS developer. Display logs, n

Remi ROBERT 1.8k Jan 3, 2023
A little and powerful iOS framework for intercepting HTTP/HTTPS Traffic.

A little and powerful iOS framework for intercepting HTTP/HTTPS Traffic from your app. No more messing around with proxy, certificate config. Features

Proxyman 874 Jan 6, 2023
Xray is viewDebugging tool for iOS, tvOS, watchOS and macOS

XRay XRay is view debugging tool for iOS. Currently, XRay can show all of the view hierarchies in UIKit. For SwiftUI, I'm working on it. XRay helps yo

Shawn Baek 10 Jun 10, 2022