https://github.com/pcjbird/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 控制台一样自动滚动显示日志。
https://github.com/pcjbird/ioslogbrowsersdk
automatically browser console developer-tools ios local-area-network log logger monitor pc real-time realtime scroll tester tool trace viewer web xcode
Last synced: 6 months ago
JSON representation
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 控制台一样自动滚动显示日志。
- Host: GitHub
- URL: https://github.com/pcjbird/ioslogbrowsersdk
- Owner: pcjbird
- License: mit
- Created: 2018-03-22T02:31:08.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-11-18T09:27:34.000Z (over 1 year ago)
- Last Synced: 2025-03-19T14:49:20.852Z (about 1 year ago)
- Topics: automatically, browser, console, developer-tools, ios, local-area-network, log, logger, monitor, pc, real-time, realtime, scroll, tester, tool, trace, viewer, web, xcode
- Language: Objective-C
- Homepage: https://pcjbird.github.io/iOSLogBrowserSDK/
- Size: 1.78 MB
- Stars: 24
- Watchers: 5
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://cocoapods.org/pods/iOSLogBrowserSDK)
[](https://cocoapods.org/pods/iOSLogBrowserSDK)
[]()
[](https://github.com/pcjbird/iOSLogBrowserSDK/releases)
[](https://github.com/pcjbird/iOSLogBrowserSDK/releases)
[](https://pcjbird.github.io)
# 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:
```ruby
pod 'iOSLogBrowserSDK'
pod 'Reachability'
```
## 使用 / Usage
```objc
#import
#import
#import
```
```objc
@interface AppDelegate ()
@property(nonatomic, assign) BOOL started;
@end
```
```objc
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
self.started = NO;
Reachability* reachability = [Reachability reachabilityForLocalWiFi];
if([reachability isReachable])
{
[self start];
}
__weak typeof(self) weakSelf = self;
reachability.reachableBlock = ^(Reachability *reachability) {
NSLog(@"%@", @"网络可用");
__strong typeof(self) strongSelf = weakSelf;
if(!strongSelf) return;
if(strongSelf.started)
{
return;
}
[strongSelf start];
};
reachability.unreachableBlock = ^(Reachability *reachability) {
NSLog(@"%@", @"网络不可用");
};
[reachability startNotifier];
return YES;
}
-(void) start
{
iOSLogBrowserOption* option = [iOSLogBrowserOption defaultOption];
option.suspendInBackground = YES;
[iOSLogBrowserSDK startWithOption:option];
XLOG_INFO(@"%@", @"您正在使用 iOS 局域网日志查看服务!");
self.started = YES;
}
@end
```
⚠️ 重要提醒:
1. 如果是在 iOS 真机设备上使用,请确保您的 App 拥有访问本地 WiFi 的权限。
## 关注我们 / Follow us
[](https://twitter.com/intent/tweet?text=https://github.com/pcjbird/QuickTraceiOSLogger)
[](https://twitter.com/pcjbird)
