Home

Awesome

<p align="center"> <img src="./design/image/logo.png" width="1000" height="250"/> </p>

GodEye

Version License Platform Carthage compatible

Automaticly display Log,Crash,Network,ANR,Leak,CPU,RAM,FPS,NetFlow,Folder and etc with one line of code based on Swift. Just like God opened his eyes.

中文文档

It's so huge that I split it into several independent components:

Features

Characteristics

Preview

<img src="./design/image/preview_meitu_1.jpg" width="100%"/>

Book and Principle

I has wrote a book named 《iOS监控编程》,each chapter records the course function of the implementation details and the way to explore.sorry for english friends,this book wrote by chineses.

<p align="center"> <img src="./design/image/cover.jpg" width=45%/> </p>

Installation

CocoaPods

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

pod "GodEye"

Not build in Release

First, add configurations in Podfile.

pod 'GodEye', '~> 1.0.0', :configurations => ['Debug']

Then, find Other Swift Flags in your target's Build Settings,add DEBUG in Debug scheme.

Finally, add DEBUG macro in makeEye:

#if DEBUG 
    GodEye.makeEye(with: self.window!)
#endif

Carthage

Or, if you’re using Carthage, add GodEye to your Cartfile:

github "zixun/GodEye"

Add GodEye to Embed Frameworks

On your application targets’ “General” settings tab, in the “Embed Frameworks” section, drag and drop GodEye.framework from the Carthage/Build folder on disk.

Add Dependency to Linked Frameworks and Libraries

On your application targets’ “General” settings tab, in the “Linked Frameworks and Libraries” section, drag and drop the dependency framework used in GodEye from the Carthage/Build folder on disk.

<p align="center"> <img src="./design/image/dependency.jpg" width="683" height="429"/> </p>

Add Run Script

On your application targets’ “Build Phases” settings tab, click the “+” icon and choose “New Run Script Phase”. Create a Run Script in which you specify your shell (ex: /bin/sh), add the following contents to the script area below the shell:

/usr/local/bin/carthage copy-frameworks

and add the paths to the frameworks you want to use under “Input Files”:

<p align="center"> <img src="./design/image/runscript.jpg" width="690" height="565"/> </p>

OpenSource Application Use GodEye

CocoaChinaPlus is an open source application wrote by swift, now the GodEye is work well in it!

Usage

import at AppDelegate:

import GodEye

making GodEye at application:didFinishLaunchingWithOptions:

GodEye.makeEye(with:self.window!)

well, make GodEye with one line code as above will use default configuration.We also can custom our configuration:

let configuration = Configuration()
configuration.command.add(command: "test", description: "test command") { () -> (String) in
    return "this is test command result"
}
configuration.command.add(command: "info", description: "print test info") { () -> (String) in
    return "info"
}
    
GodEye.makeEye(with: self.window!, configuration: configuration)

the example above is custom command configuration, we also can custom control and switch configuration.see detail at ControlConfiguration and SwitchConfiguration

Example

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

Author

twitter: @zixun_

email: chenyl.exe@gmail.com

github: zixun

blog: 子循(SubCycle)

Thanks

First is Github, it gives me a lot of ideas and inspiration, and even ready-made code:

Secondly is StackOverFlow, it answers a lot of problems encountered in the author's writing and development,here are a few images of deep:

Finally, thanks to several great blog:

License

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