Droar is a modular, single-line installation debugging window

Related tags

Debugging a
Overview

CI Status Version License Platform

Droar is a modular, single-line installation debugging window.

Overview

The idea behind Droar is simple: during app deployment stages, adding quick app configurations (switching between mock vs live, QA credential quick-login, changing http environments, etc) tend to get written and shipped straight inline with production code. Droar solves this issue by adding quick configurations that are grouped into one place, and under a single tool.

Installation

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

pod "Droar"

Start

To start Droar, add the following in the didFinishLaunchingWithOptions method of your app delegate:

import Droar

...
if nonProductionEnvironment {
    Droar.start()
}

To open, simply swipe starting from the far right side of the screen.

Configuring

Adding your own Knobs (table sections)

There are two ways to add knobs in Droar:

Static Knobs

Static knobs will always appear in Droar. Simply conform a new or existing class to DroarKnob, and use Droar.register(DroarKnob) to register an instance of it.

Dynamic Knobs

Dynamic knobs are instances of UIViewController that conform to DroarKnob. When Droar is appearing, it will search through the main window's view controller hierarchy and and find currently active/visible UIViewController's, to see if they conform to DroarKnob.

There is no need to register your view controllers as static knobs. Simply conform to DroarKnob, and Droar will pull information from them if Droar is opened on that screen.

If you conform a UINavigationController, UITabBarViewController, etc to DroarKnob (and it's currently visible/active), Droar will pull information both from it, as well as its active/visible view controller.

The DroarKnob Interface:

@objc public protocol DroarKnob {
    // Perform any setup before this knob loads (Register table cells, clear cached data, etc)
    @objc optional func droarKnobWillBeginLoading(tableView: UITableView?)
    
    // Title for this knob.  If title matches existing knob, they will be combined
    @objc func droarKnobTitle() -> String
    
    // The positioning and priorty for this knob
    @objc func droarKnobPosition() -> PositionInfo
    
    // The number of cells for this knob
    @objc func droarKnobNumberOfCells() -> Int
    
    // The cell at the specified index.  There are many pre-defined cells, just use Droar<#type#>Cell.create(), or create your own.
    @objc func droarKnobCellForIndex(index: Int, tableView: UITableView) -> DroarCell
    
    // Indicates the cell was selected.  This will not be called if `UITableViewCell.selectionStyle == .none`
    @objc optional func droarKnobIndexSelected(tableView: UITableView, selectedIndex: Int)
}

Activation Gesture

To configure the gesture that opens Droar, use the setGestureType method of Droar.

Default Knobs

You can control which of the default sections are shown using the registerDefaultKnobs method of Droar. If this isn't called, all default knobs will be displayed.

Plugins

netfox-Droar

netfox is a lightweight, one line setup, iOS / OSX network debugging library.

OHHTTPStubs-Droar

OHHTTPStubs is a library designed to stub your network requests very easily. Since this plugin requires custom customization of OHHTTPStubs, it is dependent on a fork of the OHHTPStubs.

FBMemoryProfiler-Droar

FBMemoryProfiler is an iOS library providing developer tools for browsing objects in memory over time, using FBAllocationTracker and FBRetainCycleDetector.

Writing a Plugin

Check out the guide for creating a new Droar plugin.

Author

Nathan Jangula, Myriad Mobile, [email protected]

License

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

Comments
  • Is my issue gone?

    Is my issue gone?

    This is all so new to me. I’m just starting to figure it out. Trying to investigate what was happening with my phone. Do you think I need to do more? I’m so unsure about coding. I just want my phone back. Thank you for all your help. sarah

    opened by Davidkazin 1
  • Swift version

    Swift version

    Removed 4.0 support. This was to suppress errors regarding some of the syntax I used. Alternatively I could update all of the syntax to change based on version, but removing 4.0 support let me clean up some other code.

    opened by Alarson93 0
  • Refactor

    Refactor

    This isn't a full refactor; there are definitely things that I think could still be improved.

    That said - I heavily modified our view logic such that we present a UIWindow instead of a VC to the existing window.

    opened by Alarson93 0
  • IT-148 - Droar - don’t auto-complete textfields

    IT-148 - Droar - don’t auto-complete textfields

    Added Internal Task - IT-148 Droar - don’t auto-complete textfields This is part of the DroarTextFieldCell.  Should be able to just edit that cell in the interface builder to not auto-complete textfields.

    opened by SgtJorny 0
  • 34

    34

    Addressed issue #34. Also added refresh logic. I removed autocorrect for the textfield, but decided to UNDO that change. The textfield cell works as it did before.

    opened by Alarson93 0
  • Dismissing navigation stack while Droar is open results in Droar being stuck open

    Dismissing navigation stack while Droar is open results in Droar being stuck open

    If I have the Droar open, but my nav stack is dismissed, then the Droar is stuck open. Droar.isVisible is false because the containerViewController no longer has a parent. (Thus - I assume the “parent” is a VC from the stack I dismissed)

    I was able to work around this issue by modifying the dismissalRecognizer.

        @objc private static func dismissWindow() {
    //        if Droar.isVisible {
                toggleVisibility(nil)
    //        }
        }
    

    It makes me uncomfortable that I'm toggling without knowing the view state though. Considering I am dismissing 100% of the time for this function, I should call something along the lines of dismiss - not toggle.

    While I would love to called dismissWindow from the Droar class, I noticed that those functions are just toggles that check isVisible state (thus they wouldn't work either.

        @objc public static func showWindow(completion: (()->Void)? = nil) {
            guard !isVisible else { return }
            toggleVisibility(completion)
        }
    
        @objc public static func dismissWindow(completion: (()->Void)? = nil) {
            guard isVisible else { return }
            toggleVisibility(completion)
        }
    

    So there are a couple issues at play.

    1. We should change how isVisible is determined. It shouldn't have anything to do with a parent. It should probably be based on whether or not the Droar VC is included within the frame of the UIWindow.
    2. Create more explicit show and dismiss functions. They should not be dependent on any UI state. Just set the VC offset to a reasonable value. Maybe even renamed them to open and close. Toggle should execute these functions based on UI state.
    opened by Alarson93 0
Owner
Myriad Mobile
Myriad Mobile
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
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
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
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
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
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
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
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

Paolo Musolino 2.1k Jan 8, 2023
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

meitu 1.4k Dec 29, 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
Convenient debugging button.

FunnyButton Example 在平时开发,运行期间有时候想中途看一下某个视图或变量的信息,虽说打断点是可以查看,但有时候断点调试有时候会卡住好一会才能看到(尤其是大项目经常卡很久),极度影响效率。 基于这种情况,FunnyButton就是为了能够便捷调试的全局按钮,添加好点击事件,就能随时

健了个平_(:з」∠)_ 2 Sep 20, 2022
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
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
An interactive body tracking installation

SharingElements An interactive body tracking installation Requirements Hardware requirements: MacOS computer (preferably (M1 chip)[https://en.wikipedi

Joel Gethin Lewis 15 Jun 7, 2022
Semi-automatic installation of mods for the iOS version of KOTOR 1

KOTOR 1 Mod Manager Welcome to KOTOR 1 Mod Manager (K1MM for short), a tool designed to allow easy and simple installation of mods for the iOS version

Lilly 3 Jul 11, 2022
Xcode plugin to open the GitHub page of the commit of the currently selected line in the editor window.

Show in GitHub / BitBucket Xcode plugin to open a related Github or BitBucket page directly from the Xcode editor code window. Installs easily through

Lars Schneider 242 Jul 20, 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
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
Throttle massive number of inputs in a single drop of one line API.

Icon credits: Lorc, Delapouite & contributors Throttler Throttler is a library that throttles unnecessarily repeated and massive inputs until the last

Jang Seoksoon 73 Nov 16, 2022