zixun / GodEye
- вторник, 14 марта 2017 г. в 03:11:55
Swift
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
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:
GodEye is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "GodEye"
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.
CocoaChinaPlus is an open source application wrote by swift, now the GodEye is work well in it!
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
To run the example project, clone the repo, and run pod install
from the Example directory first.
twitter: @zixun_
email: chenyl.exe@gmail.com
github: zixun
blog: 子循(SubCycle)
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:
GodEye is available under the MIT license. See the LICENSE file for more info.