Juno 0.0.2

Juno 0.0.2

Emre Onder 维护。



Juno 0.0.2

  • Emre Onder

Juno

为 iOS 平台设计的日志记录器,允许您在使用应用时查看/显示 UI 组件的所有打印日志。很酷吧?

Swift Version

集成

CocoaPods

您可以使用 CocoaPods 添加 Juno 到您的 Podfile 中进行安装。

platform :ios, '11.0'
use_frameworks!

target 'MyApp' do
  pod 'Juno', :git => 'https://github.com/emreond/Juno.git', :tag => '0.0.1'
end

运行 pod installpod update 以将 pods 集成到您的项目中。

它是如何工作的

在 AppDelegate 中的 didFinishLaunchWithOptions 函数之前初始化 Juno,使用 Juno.print() 打印日志并见证魔法!

如何使用

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    // Override point for customization after application launch.
        
    let bounds = UIScreen.main.bounds
    window = UIWindow(frame: bounds)
    let mainController = ViewController()
    window?.rootViewController = UINavigationController(rootViewController: mainController)
    window?.makeKeyAndVisible()

    #if DEBUG
    Juno()
    #endif
    return true
}
    

运行以下代码进行打印

Juno.print("控制台日志示例")

如何运行示例

只需选择 JunoExample 方案并运行!