Latest 0.1.4
License MIT
Platforms ios 8.0

CI Status

SwiftMagic is a tool to record log in an elegant way. You also can send the log to the specified email address by shaking the device. Easy to use

1. Example

To run the example project, clone the repo, and run pod install from the Example directory first.

2. Requirements

Xcode: 9.0

iOS: 8.0

3. Installation

SwiftMagic is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'SwiftMagic'
# or
# pod 'SwiftMagic', :git => ''

4. Usage

import SwiftMagic

let logger = Logger.shared

class AppDelegate: UIResponder, UIApplicationDelegate {

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

        // Disabled by default
        // Logger.shared.level = .none
        logger.level = .info
        logger.showThread = true
        logger.ouput = .debugerConsoleAndFile

        logger.d("Application started")
        // logger.i("information log")
        // logger.e("error log")
        // logger.d("debug log")
        // logger.w("warning log")

        return true



2018-01-13T21:20:46.149Z 💚d-<NSThread: 0x1c0261dc0>{number = 1, name = main}[AppDelegate.swift#application(_:didFinishLaunchingWithOptions:)#26]: Application started

View logs by shaking device:

Shake your device to view the logs on your test iPhone. In that page, you also can click button Send email to send the log file to specified email inbox:

5. Author

Zhihui Tang, [email protected]

6. License

SwiftMagic is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "SwiftMagic",
    "version": "0.1.4",
    "summary": "A tool box for Swift projects.",
    "description": "A tool box for Swift projects. Cheers.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Zhihui Tang": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.1.4"
    "platforms": {
        "ios": "8.0"
    "source_files": "SwiftMagic/Classes/**/*",
    "pushed_with_swift_version": "4.0"

Pin It on Pinterest

Share This