Latest 3.0.3
Homepage https://github.com/ArtSabintsev/Magic
License MIT
Platforms ios 8.0, requires ARC
Authors

A Swift alternative for Objective-C’s DLog macro.

[CocoaPods]() [Carthage Compatible]() [SwiftPM Compatible]() [CocoaPods]() [CocoaPods]()

Background

If you’re like me, you miss seeing the filename, method name, and/or line number in your print statements in your Swift projects.

Fear not, Magic is here to bring you back to the good old days of DLog.

This extension was previously known as PrintlnMagic.

Installation

CocoaPods

For Swift 3 support:

pod 'Magic'

For Swift 2.3 support:

pod 'Magic', :git => 'https://github.com/ArtSabintsev/Magic.git', :branch => 'swift2.3'

Carthage

For Swift 3 support:

github "ArtSabintsev/Magic"

For Swift 2.3 support:

github "ArtSabintsev/Magic" "swift2.3"

Swift Package Manager

.Package(url: "https://github.com/ArtSabintsev/Magic.git", majorVersion: 3)

Setup

Replace all the print() statements in your project with magic().

Example

Before Magic, your console will display the following from print():


This is a test string.

After Magic, your console will display the following from magic():

ViewController.viewDidLoad()[17]: This is a test string.

// Where:
//     ViewController is the filename
//     viewDidLoad() is the name of the function
//     [17] is the line number

Created and maintainted by

Arthur Ariel Sabintsev

Latest podspec

{
    "name": "Magic",
    "version": "3.0.3",
    "summary": "An alternative for Swift's print() along the lines of DLog.",
    "description": "If you're like me, you miss seeing the filename, method name, and/or line number in your print() statements in your Swift projects.nnFear not, Magic is here to bring you back to the goold old days of DLog.nMagic is actively maintained by Arthur Sabintsev.",
    "homepage": "https://github.com/ArtSabintsev/Magic",
    "license": "MIT",
    "authors": {
        "Arthur Ariel Sabintsev": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/ArtSabintsev/Magic.git",
        "tag": "3.0.3"
    },
    "source_files": "Sources/",
    "requires_arc": true,
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This