• Stars
    star
    148
  • Rank 249,983 (Top 5 %)
  • Language
    Swift
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

Swift 5.5 Platforms iOS CocoaPods Carthage Swift Package Manager License MIT

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 first.

I wanted 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
  • Debug log on device in real time
  • Automatic row height for all log lines
  • 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
  • Share log file easily via system sharing sheet
  • Customize look as you like it

Usage

Calling Console.shared.configure(in: window) will add Console.View as a subview to your App's window and make it hidden by default. Whenever you need Console UI, you just make a shake gesture and it's there! When you no longer need it, shake again and it's gone.

The rest is up to AELog's logging functionality. Whatever is logged with it, will show up in Console.View.

// MARK: - Console configuration

func application(_ application: UIApplication,
                 didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool
{
    /// - Note: Access Console settings
    let settings = Console.shared.settings

    /// - Note: Customize Console settings like this, these are defaults:
    settings.isShakeGestureEnabled = true
    settings.backColor = UIColor.black
    settings.textColor = UIColor.white
    settings.fontSize = 12.0
    settings.rowSpacing = 4.0
    settings.opacity = 0.7

    /// - Note: Configure Console in app window (it's recommended to skip this for public release)
    Console.shared.configure(in: window)

    /// - Note: Log something with AELog
    aelog()

    return true
}
// MARK: - Additional Console API

/// - Note: Check if Console is hidden
Console.shared.isHidden

/// - Note: Toggle Console visibility
Console.shared.toggle()

/// - Note: Add any log line manually
Console.shared.addLogLine(line: "Hello!")

/// - Note: Export log file manually
Console.shared.exportLogFile { (fileURL) in
    do {
        let url = try fileURL()
        /// - Note: do something with a log file at given file URL...
    } catch {
        print(error)
    }
}

Quick Help

This should explain all the features of Console UI:

AEConsole

Feature Description
Export Log will make AELog_{timestamp}.txt file in Application Documents directory and present sharing sheet.
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.

Installation

License

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

More Repositories

1

AEXML

Swift minion for simple and lightweight XML parsing
Swift
996
star
2

AEIconizer

Sketch plugin for automatic scaling of iOS app icon artwork in all needed sizes
440
star
3

AEFlowchart

Sketch plugin for fast and convenient creation of flowcharts
377
star
4

xcode-project-renamer

Swift script for renaming Xcode project
Swift
354
star
5

AERecord

Super awesome Swift minion for Core Data (iOS, macOS, tvOS)
Swift
302
star
6

AEAccordion

Simple and lightweight UITableViewController with accordion effect (expand / collapse cells)
Swift
211
star
7

AEConicalGradient

Conical (angular) gradient for iOS written in Swift
Swift
83
star
8

TouchDemo

Demo from WWDC 2014 Session 235 - Advanced Scrollviews and Touch Handling Techniques
Swift
38
star
9

AELog

Simple, lightweight and flexible debug logging framework written in Swift
Swift
32
star
10

AEViewModel

Swift minion for convenient creation of tables and collection views
Swift
18
star
11

AEImage

Adaptive image viewer for iOS (with support for zoom, gyro motion and infinite scroll)
Swift
17
star
12

swift-greenfield

greenfield swift app project
Swift
12
star
13

AEAppVersion

Simple and Lightweight App Version Tracking for iOS written in Swift
Swift
12
star
14

AECoreDataUI

Super awesome Core Data driven UI for iOS written in Swift
Swift
11
star
15

AEDotFiles

From vanilla to personalized macOS in less than 30 minutes
Shell
11
star
16

bitrise-step-xcode-project-info

Bitrise step which extracts Xcode project information to environment variables
Shell
9
star
17

AETransition

Custom transitions for iOS - simple yet powerful
Swift
4
star
18

AESound

Convenience API for playing iOS system sounds
Swift
3
star
19

SwiftLook

Swift file viewer for iOS - it's like a QuickLook for Swift files
Swift
3
star
20

AECli

Swift package for making simple command line tools
Swift
3
star
21

AENetwork

Simple and lightweight networking in Swift
Swift
2
star
22

cs193p-matchismo

CS193p Winter 2013 - Matchismo - Card matching game
Objective-C
2
star
23

AECoreDataDemo

Demo project for AERecord and AECoreDataUI
Swift
2
star
24

swift-minions

Single-file helpers written in Swift, reusable across multiple projects
Swift
2
star
25

mappable

Swift package for simple and lightweight models mapping (with JSON support out of the box)
Swift
2
star
26

ae

command line personal assistant
Swift
1
star
27

AETool

Swift package for driving "ae" - command line personal assistant
Swift
1
star