项目作者: pcjbird

项目描述 :
A real time iOS log trace tool, view iOS log with pc web browser under local area network, which will automatically scroll like xcode. 一个实时的iOS日志跟踪工具,在局域网中使用 PC Web 浏览器查看 iOS 日志,它将像xcode一样自动滚动。
高级语言: Objective-C
项目地址: git://github.com/pcjbird/QuickTraceiOSLogger.git


logo

Pod Version
Pod Platform
Pod License
GitHub release
GitHub release
Website

iOSLogBrowserSDK

A real-time iOS log tracing tool that enables viewing iOS logs on a PC web browser within a local area network. The log display automatically scrolls similar to Xcode console.

一个实时的 iOS 日志追踪工具,可以在本地区域网络内通过 PC 网页浏览器查看 iOS 日志,他将类似 Xcode 控制台一样自动滚动显示日志。

特性 / Features

  1. 一边操作一边查看输出日志,实时日志跟踪,无须手动刷新。
  2. 适用所有浏览器,无需配备 Mac 电脑。
  3. 无需数据线连接电脑。
  4. 支持多台电脑同时监听日志。

演示 / Demo

安装 / Installation

方法一:iOSLogBrowserSDK is available through CocoaPods. To install it, simply add the following line to your Podfile:

  1. pod 'iOSLogBrowserSDK'
  2. pod 'Reachability'

使用 / Usage

  1. #import <XLFacility/XLFacilityMacros.h>
  2. #import <iOSLogBrowserSDK/iOSLogBrowserSDK.h>
  3. #import <Reachability/Reachability.h>
  1. @interface AppDelegate ()
  2. @property(nonatomic, assign) BOOL started;
  3. @end
  1. @implementation AppDelegate
  2. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  3. // Override point for customization after application launch.
  4. self.started = NO;
  5. Reachability* reachability = [Reachability reachabilityForLocalWiFi];
  6. if([reachability isReachable])
  7. {
  8. [self start];
  9. }
  10. __weak typeof(self) weakSelf = self;
  11. reachability.reachableBlock = ^(Reachability *reachability) {
  12. NSLog(@"%@", @"网络可用");
  13. __strong typeof(self) strongSelf = weakSelf;
  14. if(!strongSelf) return;
  15. if(strongSelf.started)
  16. {
  17. return;
  18. }
  19. [strongSelf start];
  20. };
  21. reachability.unreachableBlock = ^(Reachability *reachability) {
  22. NSLog(@"%@", @"网络不可用");
  23. };
  24. [reachability startNotifier];
  25. return YES;
  26. }
  27. -(void) start
  28. {
  29. iOSLogBrowserOption* option = [iOSLogBrowserOption defaultOption];
  30. option.suspendInBackground = YES;
  31. [iOSLogBrowserSDK startWithOption:option];
  32. XLOG_INFO(@"%@", @"您正在使用 iOS 局域网日志查看服务!");
  33. self.started = YES;
  34. }
  35. @end

⚠️ 重要提醒:

  1. 如果是在 iOS 真机设备上使用,请确保您的 App 拥有访问本地 WiFi 的权限。

关注我们 / Follow us

Twitter URL
Twitter Follow