Skip to content

Latest commit

 

History

History
110 lines (82 loc) · 4.77 KB

README.md

File metadata and controls

110 lines (82 loc) · 4.77 KB

AEConsole

Customizable Console UI overlay with debug log on top of your iOS App

Language Swift 3.0 Platforms iOS License MIT

CocoaPods Version Carthage compatible Swift Package Manager compatible

AEConsole is built on top of AELog, so you should probably see that first.

I cought myself wanting to see what's happening 'under the hood' while testing some app AFK (ex. outside).
Then I made it possible. Hope you'll like it too, happy coding!

AEConsole

Index

Features

  • All the things from AELog plus:
  • Console UI overlay on top of your App
  • See debug log directly on device in real time
  • Forward touches to your App
  • Shake to toggle Console UI
  • Filter log to find exactly what you need
  • Export log to file if you need it for later
  • Customize look as you like it
  • Covered with docs

Usage

In order to enable AEConsole you should add this one-liner in your AppDelegate's didFinishLaunchingWithOptions:

AEConsole.launch(with: self)

If AEConsole is enabled, this will add AEConsoleView as a subview to your App's window and make it hidden by default. Now, whenever you need Console UI, you just make a shake gesture and boom it's there! When you no longer need it, shake again and boom it's gone (there are no 'booms' really).

The rest is up to AELog's top-level logging function. Whatever is logged with aelog() it will show up in AEConsoleView.

In case you want to toggle Console UI via code, you can call AEConsole.toggle(), also you can check its current state via AEConsole.hidden property. So that's it about API, let's go through all the customization settings:

Settings

  1. Create AEConsole.plist file and add it to your target or create dictionary with name AEConsole in your existing Info.plist file.

  2. Configure any setting the way you want (don't forget to at least set Enabled to YES in order to make it work):

    Key Type Description
    Enabled Boolean Console UI enabled flag (defaults to NO)
    AutoStart Boolean Console UI visible on App start flag (defaults to NO)
    ShakeGesture Boolean Shake gesture enabled flag (defaults to YES)
    BackColor String Hex string for Console background color (defaults to 000000)
    TextColor String Hex string for Console text color (defaults to FFFFFF)
    FontSize Number Console UI font size (defaults to 12)
    RowHeight Number Console UI row height (defaults to 14)
    Opacity Number Console UI opacity (defaults to 0.7)

Quick Help

This should explain all the features of Console UI:

AEConsole

Feature Description
Export Log will make {timestamp}.aelog file inside your App's Documents directory.
Filter Log filter is not case sensitive.
Toggle Toolbar works for both filter and menu toolbars simultaneously.
Toggle Forward Touches when active you can interact with your App, otherwise you can interact with the log.
Toggle Auto Follow when active it will automatically scroll to the new log lines, otherwise it will stay put.
Clear Log you can't undo this.
Pan Gesture over Menu Toolbar left is more transparent, right is more opaque.

Requirements

  • Xcode 8.0+
  • iOS 9.0+

Installation

License

AEConsole is released under the MIT license. See LICENSE for details.