• Stars
    star
    1,955
  • Rank 23,715 (Top 0.5 %)
  • Language
    Swift
  • License
    MIT License
  • Created almost 8 years ago
  • Updated about 5 years ago

Reviews

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

Repository Details

๐Ÿ“ฑ๐Ÿ’ฌ๐Ÿšฆ 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.

 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

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.

More Repositories

1

OpenSwiftUI

WIP โ€” OpenSwiftUI is an OpenSource implementation of Apple's SwiftUI DSL.
Swift
1,382
star
2

Clippy

๐Ÿ“Ž๐Ÿ’ฌ๐ŸŽ‰ Clippy from Microsoft Office is back and runs on macOS! Written in Swift.
Swift
741
star
3

HackMan

๐Ÿค–๐Ÿ”œ๐Ÿคฏ Stop writing boilerplate code yourself. Let hackman do it for you via the command line.
Swift
292
star
4

SwiftUIEmbedded

WIP โ€” SwiftUIEmbedded is an implementation of SwiftUI (based on OpenSwiftUI) for embedded and Linux devices.
Swift
111
star
5

BinaryKit

๐Ÿ’พ๐Ÿ”๐Ÿงฎ BinaryKit helps you to break down binary data into bits and bytes, easily access specific parts and write data to binary.
Swift
110
star
6

awesome-embedded-swift

โšก๏ธ๐Ÿ› ๐Ÿงฐ A curated list for Embedded and Low-Level development in the Swift programming language.
Swift
69
star
7

GrammaticalNumber

1๏ธโƒฃ๐Ÿ”œ๐Ÿ”ข Turns singular words to the plural and vice-versa in Swift.
Swift
35
star
8

SwiftUIEmbedded-Demo

WIP โ€” SwiftUIEmbedded โ€” Demo for Linux
Swift
31
star
9

ISO8859

๐ŸŒโฉ๐Ÿ“„ Convert ISO8859 1-16 Encoded Text to String in Swift. Supports iOS, tvOS, watchOS and macOS.
Swift
18
star
10

Nodes

๐ŸŒฒ๐ŸŒฟ๐ŸŒณ Nodes is a class protocol for tree data structures with multiple children. Written in Swift.
Swift
17
star
11

StringCase

๐Ÿ‘‡๐Ÿ‘†๐Ÿ Converts String to lowerCamelCase, UpperCamelCase and snake_case. Tested and written in Swift.
Swift
16
star
12

ShotPlan

A command line tool that calls your Xcode Test Plan and creates screenshots of your app automatically.
Swift
11
star
13

TransportStream

๐ŸŽฌ๐Ÿ“บ๐ŸŽž MPEG-TS (Transport Stream) Tools: Demultiplexer, CRC32, Program Specific Information (PMT PAT, NIT, CAT). Written in Swift.
Swift
10
star
14

bashtv

Hackathon Project โ€” Watch public television in your terminal. No browser needed.
Swift
8
star
15

awesome-swift-platforms

A curated list of Swift on different platforms.
Swift
4
star
16

Pixels

WIP โ€” Pixels is a low level graphics library written in Swift.
Swift
4
star
17

News-Sightseeing

Sophisticated-location-aware-news.
C#
3
star
18

bashtv-service

C#
2
star
19

PSVR_api

C#
2
star
20

ToThePoint

Hackathon Project โ€” Jump right to the interesting parts of a video. Project at mediahackday.
JavaScript
2
star
21

JSKit

A quick and dirty attempt to recreate UIKit in JavaScript
JavaScript
2
star
22

Isometric

JavaScript
1
star
23

SpriteMap

SpriteMap helps you to extract sprites out of a sprite map. Written in Swift.
Swift
1
star
24

spotify-places

Spotify places enables social playlists for bars based on the users favorite songs.
C#
1
star
25

FeedCollectionViewLayout

[WIP] ๐Ÿ“ฑ๐Ÿ“ Customizable UICollectionLayout for single and multi-column feeds.
Swift
1
star
26

Note

This is for debugging and reference only. Document Based + ReferenceFileDocument + UndoManager + Commands Example
Swift
1
star