Tool to debug layouts directly on iOS devices: inspect layers in 3D and debug each visible view attributes

Overview

Introduction

CI Status Version License Platform

Features

  • Inspect layouts directly on iOS devices
  • Inspection could be triggered only if app is running under DEBUG build configuration, so it won't affect any other kind of the app builds (i.e. RELEASE)
  • Objective-C compatible
  • Works on all devices with iOS 11.0+

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • iOS 11.0 and higher
  • Xcode 10.3 and higher
  • Swift 5.0 and higher

Installation

LayoutInspector is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'LayoutInspector'

Usage

Layout inspection could be trigger:

  • manually whenever you want (on some actions, events, notifications etc)
LayoutInspector.shared.showLayout()
  • automatically when taking app screenshot
LayoutInspector.shared.setAutoTrigger(.screenshot)
  • automatically on device shaking
LayoutInspector.shared.setAutoTrigger(.shake)

Swift

import LayoutInspector

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        LayoutInspector.shared.setAutoTrigger(.screenshot)
        return true
    }
}

Objective-C

@import LayoutInspector;

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [LayoutInspector.shared setAutoTrigger:AutoTriggerScreenshot];
    return YES;
}

@end

Changelog

Version Description
1.2.1 ๐Ÿ“ Font attribute added to inspection pane
1.2.0 ๐Ÿ‘‹ Shake gesture added to trigger layout inspection
๐Ÿงฐ CI configuration upgrade
1.1.0 ๐ŸŽ๏ธ Swift 5.0 and ABI stability in da house
โœˆ๏ธ New build system activated
๐Ÿ”Œ Dropped iOS 10 support
1.0.0 ๐ŸŽ‰ Release 1.0
๐Ÿ‘ฎ Test coverage added
0.2.0 Pre-release: Objective-C compatibility ๐Ÿ‘ฆ
0.1.1 Pre-release: fixed Lint warnings ๐Ÿ‘ถ
0.1.0 Pre-release: initial version ๐ŸŽฌ

Author

Ihor Savynskyi
โœ‰๏ธ [email protected]
๐ŸŒŽ Twitter, LinkedIn

License

LayoutInspector is available under the MIT license. See the LICENSE file for more info.

Comments
  • It may better to remove #if DEBUG

    It may better to remove #if DEBUG

    Basically large APP will use multiple scheme and use different macro to distinguish, most of them may not in debug mode, and also we don't Introduce debug tool in release from pods, so it's no need to add #if DEBUG in func startLayoutInspection()

    opened by miku1958 3
  • add shake

    add shake

    Description

    Testing

    • [x] Tested manually
    • [x] Unit tests added
    • [ ] UI tests added
    • [x] Tests pass locally

    Pod version update

    • [x] Major
    • [ ] Minor
    • [ ] Patch
    opened by miku1958 2
  • Update Travis CI configs

    Update Travis CI configs

    Description

    • removed social_media_url from .podspec as it was causing issues when executing pod lib lint (for some reason it wasn't able to reach twitter account url)
    • updated Travis CI .yml to use latest Xcode and simulation device
    opened by isavynskyi 1
  • improve(metadata): add font attribute

    improve(metadata): add font attribute

    Description

    Added font attribute for views containing text (UILabel, UITextField, UITextView, UIButton). Font attribute won't be shown for other views

    Testing

    • [x] Tested manually
    • [ ] Unit tests added
    • [ ] UI tests added
    • [x] Tests pass locally

    Versioning

    Pod version updated in LayoutInspector.podspec

    • [ ] Major
    • [ ] Minor
    • [x] Patch
    opened by ATahhan 1
  • Update CI configuration

    Update CI configuration

    Description

    Testing

    • [x] Tested manually
    • [ ] Unit tests added
    • [ ] UI tests added
    • [x] Tests pass locally

    Versioning

    No version update (it is part of upcoming 1.2.0 release)

    opened by isavynskyi 1
  • Polish new shake gesture trigger type

    Polish new shake gesture trigger type

    Description

    This is follow up on PR https://github.com/isavynskyi/LayoutInspector/pull/18 which brought support for shake gesture

    What's new:

    • small formatting changes
    • changed way how changeAutoTrigger() implementation added to the ViewControllers

    Testing

    • [x] Tested manually
    • [ ] Unit tests added
    • [ ] UI tests added
    • [x] Tests pass locally

    Pod version update

    • [ ] Major
    • [x] Minor
    • [ ] Patch
    opened by isavynskyi 0
  • add shake autoTrigger

    add shake autoTrigger

    Description

    add a autoTrigger by shaking

    Testing

    • [x] Tested manually
    • [x] Unit tests added
    • [ ] UI tests added
    • [x] Tests pass locally

    Pod version update

    • [x] Major
    • [ ] Minor
    • [ ] Patch
    opened by miku1958 0
  • Upgrade to Swift 5

    Upgrade to Swift 5

    Description

    ๐ŸŽ๏ธ Swift 5 and ABI stability in da house โœˆ๏ธ New build system activated ๐Ÿ”Œ Dropped iOS 10 support

    Testing

    • [x] Tested manually
    • [ ] Unit tests added
    • [ ] UI tests added
    • [x] Tests pass locally

    Pod version update

    • [ ] Major
    • [x] Minor
    • [ ] Patch
    opened by isavynskyi 0
  • Fix failing ci

    Fix failing ci

    Description

    Fix of the failing CI by implicit usage of the Legacy build system Seems that -UseModernBuildSystem=NO in .yml not reliable

    Testing

    • [x] Tested manually
    • [ ] Unit tests added
    • [ ] UI tests added
    • [x] Tests pass locally

    or

    • [ ] Doesn't require any testing activities
    opened by isavynskyi 0
  • Pull request template test

    Pull request template test

    Description

    Testing

    • [ ] Tested manually
    • [ ] Unit tests added
    • [ ] UI tests added
    • [ ] Tests pass locally

    or

    • [x] Doesn't require any testing activities
    opened by isavynskyi 0
Releases(1.2.0)
Owner
Ihor Savynskyi
Ihor Savynskyi
TouchInspector - a lightweight package that helps you visualize and debug touches on iOS and iPadOS

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

Janum Trivedi 116 Jan 3, 2023
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
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
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
Network debugging made easy๏ผŒThis network debugging tool is developed based on the swift version of Wormholy.

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

null 21 Dec 14, 2022
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

Li Kai 575 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
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
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

Point-Free 631 Jan 3, 2023
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

้™ˆๅฅ•้พ™(ๅญๅพช) 3.7k Dec 23, 2022
๐Ÿ“˜A library for isolated developing UI components and automatically taking snapshots of them.

A library for isolated developing UI components and automatically taking snapshots of them. Playbook Playbook is a library that provides a sandbox for

Playbook 970 Jan 3, 2023
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
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

Dariusz Bukowski 1.2k Dec 30, 2022
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

Facebook 8.9k Jan 6, 2023
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

Dal Rupnik 733 Oct 29, 2022