Skip to content

Commit

Permalink
Merge pull request #36 from HDB-Li/1.1.7
Browse files Browse the repository at this point in the history
1.1.7
  • Loading branch information
HDB-Li authored Sep 14, 2018
2 parents 73be155 + d7991d8 commit ff57b79
Show file tree
Hide file tree
Showing 92 changed files with 2,093 additions and 401 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ xcuserdata/
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
Pods/
Podfile.lock
# Pods/
# Podfile.lock

# Carthage
#
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## [1.1.7](https://github.com/HDB-Li/LLDebugTool/releases/tag/1.1.7) (09/14/2018)

### Support Swift now, More swift usage informations see [LLDebugToolSwift](https://github.com/HDB-Li/LLDebugToolSwift).

`LLDebugToolSwift` is a swift component for `LLDebugTool`, It provide the `LLog` swift class that used to log function in swift.

More changes can be viewed in [Version 1.1.7 Project](https://github.com/HDB-Li/LLDebugTool/projects/6).

#### Add

* Add `LLog.swift`, In order to solve `LLDebugToolMacros` can't work in swift.

#### Update

* Update `LLCrashHelper`, now `LLDebugTool` can crash signal correct.

## [1.1.6](https://github.com/HDB-Li/LLDebugTool/releases/tag/1.1.6) (08/31/2018)

### Fixed bug that could not catch crash information
Expand Down
4 changes: 2 additions & 2 deletions LLDebugTool.podspec
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Pod::Spec.new do |s|
s.name = "LLDebugTool"
s.version = "1.1.6"
s.version = "1.1.7"
s.summary = "LLDebugTool is a debugging tool for developers and testers that can help you analyze and manipulate data in non-xcode situations."
s.homepage = "https://github.com/HDB-Li/LLDebugTool"
s.license = "MIT"
s.author = { "HDB-Li" => "llworkinggroup@qq.com" }
s.author = { "HDB-Li" => "llworkinggroup1992@gmail.com" }
s.social_media_url = "https://github.com/HDB-Li"
s.platform = :ios, "8.0"
s.source = { :git => "https://github.com/HDB-Li/LLDebugTool.git", :tag => s.version }
Expand Down
8 changes: 4 additions & 4 deletions LLDebugTool/DebugTool/LLDebugTool.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
/**
Suspension ball window.
*/
@property (nonatomic , strong , readonly) LLWindow *window;
@property (nonatomic , strong , readonly , nonnull) LLWindow *window;

/**
Singleton to control debugTool.
@return Singleton
*/
+ (instancetype)sharedTool;
+ (instancetype _Nonnull)sharedTool;

/**
Start working.
Expand All @@ -65,7 +65,7 @@
/**
LLDebugTool's version.
*/
@property (nonatomic , copy , readonly) NSString *version;
@property (nonatomic , copy , readonly , nonnull) NSString * version;

/**
Whether is Beta.
Expand All @@ -87,6 +87,6 @@
@param onEvent Event,can filter by this.
@param message Message.
*/
- (void)logInFile:(NSString *)file function:(NSString *)function lineNo:(int)lineNo level:(LLConfigLogLevel)level onEvent:(NSString *)onEvent message:(NSString *)message, ... ;
- (void)logInFile:(NSString *_Nullable)file function:(NSString *_Nullable)function lineNo:(NSInteger)lineNo level:(LLConfigLogLevel)level onEvent:(NSString *_Nullable)onEvent message:(NSString *_Nullable)message;

@end
8 changes: 4 additions & 4 deletions LLDebugTool/DebugTool/LLDebugTool.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@

@interface LLDebugTool ()

@property (nonatomic , strong) LLWindow *window;
@property (nonatomic , strong , nonnull) LLWindow *window;

@property (nonatomic , copy) NSString *versionNumber;
@property (nonatomic , copy , nonnull) NSString *versionNumber;

@end

Expand Down Expand Up @@ -110,7 +110,7 @@ - (void)showDebugViewControllerWithIndex:(NSInteger)index {
[self.window.windowViewController showDebugViewControllerWithIndex:index];
}

- (void)logInFile:(NSString *)file function:(NSString *)function lineNo:(int)lineNo level:(LLConfigLogLevel)level onEvent:(NSString *)onEvent message:(NSString *)message, ... {
- (void)logInFile:(NSString *)file function:(NSString *)function lineNo:(NSInteger)lineNo level:(LLConfigLogLevel)level onEvent:(NSString *)onEvent message:(NSString *)message {
if (![LLConfig sharedConfig].showDebugToolLog) {
NSArray *toolEvent = @[kLLLogHelperDebugToolEvent,kLLLogHelperFailedLoadingResourceEvent];
if ([toolEvent containsObject:onEvent]) {
Expand All @@ -127,7 +127,7 @@ - (void)logInFile:(NSString *)file function:(NSString *)function lineNo:(int)lin
- (void)initial {
// Set Default
_isBetaVersion = NO;
_versionNumber = @"1.1.6";
_versionNumber = @"1.1.7";
_version = _isBetaVersion ? [_versionNumber stringByAppendingString:@"(BETA)"] : _versionNumber;

// Check version.
Expand Down
5 changes: 5 additions & 0 deletions LLDebugTool/Helper/AppHelper/LLAppHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ UIKIT_EXTERN NSString * _Nonnull const LLAppHelperTotalDataTrafficKey;
*/
- (NSMutableArray <NSArray <NSDictionary <NSString *,NSString *>*>*>*_Nonnull)appInfos;

/**
Get dynamic app infos this time.
*/
- (NSDictionary <NSString *, NSString *>*_Nonnull)dynamicAppInfos;

/**
Current cpu usage.
*/
Expand Down
11 changes: 11 additions & 0 deletions LLDebugTool/Helper/AppHelper/LLAppHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,17 @@ - (void)setEnable:(BOOL)enable {
return [[NSMutableArray alloc] initWithObjects:dynamic ,apps, devices, nil];
}

- (NSDictionary <NSString *, NSString *>*)dynamicAppInfos {
NSMutableDictionary *infos = [[NSMutableDictionary alloc] init];
for (NSDictionary *dic in [self dynamicInfos]) {
[infos addEntriesFromDictionary:dic];
}

infos[@"Disk"] = [self disk];
infos[@"Network State"] = [self networkState];
return infos;
}

- (void)updateRequestDataTraffic:(unsigned long long)requestDataTraffic responseDataTraffic:(unsigned long long)responseDataTraffic {
if ([[NSThread currentThread] isMainThread]) {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
Expand Down
8 changes: 7 additions & 1 deletion LLDebugTool/Helper/CrashHelper/LLCrashHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
// SOFTWARE.

#import <Foundation/Foundation.h>
#import "LLCrashModel.h"

/**
Catch crash or not.
Expand All @@ -33,11 +34,16 @@
@return Singleton
*/
+ (instancetype)sharedHelper;
+ (instancetype _Nonnull)sharedHelper;

/**
Set enable to catch crash.
*/
@property (nonatomic , assign , getter=isEnabled) BOOL enable;

/**
This time crash model.
*/
@property (nonatomic , strong , nullable) LLCrashModel *crashModel;

@end
Loading

0 comments on commit ff57b79

Please sign in to comment.