📱💬🚦 TinyConsole is a micro-console that can help you log and display information inside an iOS application, where having a connection to a development computer is not possible.

Overview

 text

TinyConsole

Platform iOS Carthage compatible License MIT

TinyConsole is a tiny log console to display information while using your iOS app and written in Swift.

Usage

Wrap your Main ViewController inside of a TinyConsoleController like so:

TinyConsole.createViewController(rootViewController: MyMainViewController())

Actions

Hide and Show

Shake your device to toggle the console. If you’re using the Simulator, press ⌃ ctrl-⌘ cmd-z.

Console output

// Print message
TinyConsole.print("hello")

// Print messages any color you want 
TinyConsole.print("green text", color: UIColor.green)

// Print a red error message 
TinyConsole.error("something went wrong")

// Print a marker for orientation
TinyConsole.addLine()

// Clear console
TinyConsole.clear()

Implementation Example

Instead of

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    window = UIWindow(frame: UIScreen.main.bounds)
    window?.rootViewController = MyMainViewController()
    window?.makeKeyAndVisible()
    return true
}

write

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    window = UIWindow(frame: UIScreen.main.bounds)
    window?.rootViewController = TinyConsole.createViewController(rootViewController: MyMainViewController())
    window?.makeKeyAndVisible()
    return true
}

alternatively, check out the example project included in this repository.

Demo

 text

Requirements

  • Xcode 11
  • Swift 5
  • iOS 11 or greater

Installation

Carthage

Add this to your Cartfile:

github "Cosmo/TinyConsole"

Manually

Just drag the source files into your project.

Hierarchy

 text

Core Team

Thanks

Many thanks to the contributors of this project.

Contact

Other Projects

  • BinaryKit — BinaryKit helps you to break down binary data into bits and bytes and easily access specific parts.
  • Clippy — Clippy from Microsoft Office is back and runs on macOS! Written in Swift.
  • GrammaticalNumber — Turns singular words to the plural and vice-versa in Swift.
  • HackMan — Stop writing boilerplate code yourself. Let hackman do it for you via the command line.
  • ISO8859 — Convert ISO8859 1-16 Encoded Text to String in Swift. Supports iOS, tvOS, watchOS and macOS.
  • SpriteMap — SpriteMap helps you to extract sprites out of a sprite map. Written in Swift.
  • StringCase — Converts String to lowerCamelCase, UpperCamelCase and snake_case. Tested and written in Swift.

License

TinyConsole is released under the MIT License.

Comments
  • Coloured output

    Coloured output

    Hey there,

    It would be really cool if it would support coloured text output. So for an error it'll be red, warning orange etc. Colours which I can manually define. Not sure if that would be an overkill, but I would welcome it.

    Something like this would be good enough for my purposes (the 'color' parameter being optional and defaulting to nil):

    TinyConsole.print("hello", color: UIColor.red)
    

    Thanks

    enhancement 
    opened by jyounus 9
  • shake config property and ability to explicitly set the window mode

    shake config property and ability to explicitly set the window mode

    hey @Cosmo

    great library! – been very helpful for some of my projects.

    there's a couple minor features i personally needed which i added to my fork. figured i could send a PR incase you had interest in them too. if not, no big deal to ignore.

    thanks, patrick

    opened by piemonte 4
  • Allow some more programmatically changes

    Allow some more programmatically changes

    For some cases it might me better to set the visibility of the console programmatically. So I changed consoleWindowMode to public.

    Also added another init for TinyConsoleController which uses a custom expandedHeight.

    opened by janniklorenz 4
  • iOS 8 support

    iOS 8 support

    I noticed that iOS 8 is supported now, but in the .podspec file :

    s.ios.deployment_target = '9.0'
    

    is still 9.0...

    Please update the CocoaPod repo, THX : )

    bug 
    opened by lianweiqin 3
  • Installation instructions are a little unclear

    Installation instructions are a little unclear

    Using XCode 11.4, Swift 5.2, and only either Swift Package Manager or manual framework install (we do not use Carthage nor Cocoapods), how do we install TinyConsole?

    Building from source and importing the Swift module does not work, "just including the sources" as suggested in the README also does not work.

    A minimal test case always throws the error No such module 'TinyConsole'. What's the correct way to include this library?

    opened by damienstanton 2
  • Add license scan report and status

    Add license scan report and status

    Your FOSSA integration was successful! Attached in this PR is a badge and license report to track scan status in your README.

    Below are docs for integrating FOSSA license checks into your CI:

    opened by fossabot 1
  • Use static functions instead of Shared instance

    Use static functions instead of Shared instance

    I think the usage of static functions instead of a shared instance would look a lot nicer in code.

    Instead of writing

    TinyConsole.shared.print(text : "")

    you could just write

    TinyConsole.print("").

    enhancement 
    opened by ohitsdaniel 1
  • Correct the spelling of CocoaPods in README

    Correct the spelling of CocoaPods in README

    This pull request corrects the spelling of CocoaPods 🤓 https://github.com/CocoaPods/shared_resources/tree/master/media

    Created with cocoapods-readme.

    enhancement 
    opened by ReadmeCritic 1
  • new build system support, error: Multiple commands produce

    new build system support, error: Multiple commands produce

    Hey, just wanted to say TinyConsole is a great project!

    If you're using Cocoapods and TinyConsole with the Xcode's new build system, there's a configuration problem with how the podspec specifies input sources causing this error:

    Multiple commands produce '/DerivedData/Build/Products/Debug-iphoneos/TinyConsole/TinyConsole.framework/Info.plist':
    1) Target 'TinyConsole' (project 'Pods') has copy command from '/Pods/TinyConsole/TinyConsole/Supporting Files/Info.plist' to '/DerivedData/Build/Products/Debug-iphoneos/TinyConsole/TinyConsole.framework/Info.plist'
    2) Target 'TinyConsole' (project 'Pods') has process command with output '/DerivedData/Build/Products/Debug-iphoneos/TinyConsole/TinyConsole.framework/Info.plist'
    

    📎 https://github.com/CocoaPods/CocoaPods/issues/8125

      s.source_files = "TinyConsole/**/*"
      s.exclude_files = "TinyConsole/**/*.plist"
    

    If the podspec declaration for s.source_files paths only specifies *.h and *.swift, it should fix the problem. Otherwise the Info.plist is processed as source (as opposed to a resource) and causes this error.

    opened by piemonte 0
  • [Change] support object-c to use for issue

    [Change] support object-c to use for issue

    • #import <TinyConsole/TinyConsole-Swift.h> in objective c file

    • self.window.rootViewController = [TinyConsole createViewControllerWithRootViewController:rootViewController withDefaultGestureConfiguration:YES];

    opened by JackySONE 0
  • Storyboard compatibility

    Storyboard compatibility

    Is it possible to use TinyConsole with storyboards?

    Whenever I try to set UIWindow (which wasn't set before) whenever code that comes from a storyboard outlet gets run, it crashes: Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) and the Xcode console says:

    fatal error: unexpectedly found nil while unwrapping an Optional value
    (lldb) 
    

    My guess is I can't use this with storyboards, but if that is possible please explain how.

    opened by perryprog 4
  • Status bar appearance

    Status bar appearance

    Hello! View controller-based status bar appearance does not work if I use TinyConsoleController. I think that TinyConsoleController should take view controller-based values from rootViewController

    opened by AnisovAleksey 1
Releases(2.0.1)
Owner
Devran Cosmo Uenal
I ❤️ gadgets.
Devran Cosmo Uenal
Simple Design for Swift bridge with Javascript. Also can get javascript console.log.

SDBridgeOC is here. If your h5 partner confused about how to deal with iOS and Android. This Demo maybe help. YouTube video is here. bilibili Video is

null 20 Dec 28, 2022
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
Gedatsu provide readable format about AutoLayout error console log

Gedatsu Gedatsu provide readable format about AutoLayout error console log Abstract At runtime Gedatsu hooks console log and formats it to human reada

bannzai 520 Jan 6, 2023
Gedatsu provide readable format about AutoLayout error console log

Gedatsu Gedatsu provide readable format about AutoLayout error console log Abstract At runtime Gedatsu hooks console log and formats it to human reada

bannzai 475 Jun 24, 2021
A Swift-based API for reading from & writing to the Apple System Log (more commonly known somewhat inaccurately as "the console")

CleanroomASL Notice: CleanroomASL is no longer supported The Apple System Log facility has been deprecated by Apple. As a result, we've deprecated Cle

Gilt Tech 62 Jan 29, 2022
A log should tell a story, not drown the reader in irrelevance.

StoryTeller A log should tell a story, not drown the reader in irrelevance Story Teller is an advanced logging framework that takes an entirely differ

Derek Clarkson 10 Sep 20, 2019
XCLog is a Swift extension that helps you print something in console when debugging your projects.

XCLog XCLog is a Swift extension that helps you print something in console when debugging your projects. Installation Open Xcode > File > Add Packages

null 1 Jan 9, 2022
JustLog brings logging on iOS to the next level. It supports console, file and remote Logstash logging via TCP socket with no effort. Support for logz.io available.

JustLog JustLog takes logging on iOS to the next level. It supports console, file and remote Logstash logging via TCP socket with no effort. Support f

Just Eat 509 Dec 10, 2022
Styling and coloring your XCTest logs on Xcode Console

XLTestLog Notes with Xcode 8 and XLTestLog Since Xcode 8 killed XcodeColors, the current way using XCTestLog on Xcode 8 is just plain texts with emoji

Xaree Lee 58 Feb 2, 2022
Delightful console output for Swift developers.

Rainbow adds text color, background color and style for console and command line output in Swift. It is born for cross-platform software logging in te

Wei Wang 1.7k Dec 31, 2022
This is how you can manage and share logs in iOS application.

Logging in Swift In this example, you can find how to print all the logs effciently in iOS application. Along with, you will find how to share logs fo

Nitin Aggarwal 8 Mar 1, 2022
Log every incoming notification to view them again later, also includes attachments and advanced settings to configure

Vē Natively integrated notification logger Installation Add this repository to your package manager

alexandra 43 Dec 25, 2022
A custom logger implementation and Task Local helper for swift-log

LGNLog A custom logger implementation and TaskLocal helper for Swift-Log. Why and how This package provides two and a half things (and a small bonus):

17:11 Games 0 Oct 26, 2021
Log messages to text files and share them by email or other way.

LogToFiles How to log messages to text files and share them by email or share center. 1 - Add the Log.swift file to your App 2 - Just log the messages

Miguel Chaves 0 Jan 9, 2022
Simply, Logify provides instant colorful logs to improve log tracking and bug tracing

Logify Simply, Logify provides instant colorful logs to improve log tracking and bug tracing. Why I need to use Logify? As discussed before in a lot o

Furkan KAPLAN 13 Dec 28, 2022
🍯 Awesome log aggregator for iOS

?? Awesome log aggregator for iOS

Cookpad 204 Oct 24, 2022
Puree is a log collector which provides some features like below

Puree Description Puree is a log collector which provides some features like below Filtering: Enable to interrupt process before sending log. You can

Cookpad 149 Oct 18, 2022
Automate box any value! Print log without any format control symbol! Change debug habit thoroughly!

LxDBAnything Automate box any value! Print log without any format control symbol! Change debug habit thoroughly! Installation You only need drag LxD

DeveloperLx 433 Sep 7, 2022
A logging backend for swift-log that sends logging messages to Logstash (eg. the ELK stack)

LoggingELK LoggingELK is a logging backend library for Apple's swift-log The LoggingELK library provides a logging backend for Apple's apple/swift-log

null 17 Nov 15, 2022