diff --git a/LLDebugTool/Helper/AppHelper/LLAppHelper.h b/LLDebugTool/Components/AppInfo/Function/LLAppHelper.h similarity index 100% rename from LLDebugTool/Helper/AppHelper/LLAppHelper.h rename to LLDebugTool/Components/AppInfo/Function/LLAppHelper.h diff --git a/LLDebugTool/Helper/AppHelper/LLAppHelper.m b/LLDebugTool/Components/AppInfo/Function/LLAppHelper.m similarity index 100% rename from LLDebugTool/Helper/AppHelper/LLAppHelper.m rename to LLDebugTool/Components/AppInfo/Function/LLAppHelper.m diff --git a/LLDebugTool/UserInterface/Categories/UIDevice/UIDevice+LL_Swizzling.h b/LLDebugTool/Components/AppInfo/Function/UIDevice+LL_Swizzling.h similarity index 100% rename from LLDebugTool/UserInterface/Categories/UIDevice/UIDevice+LL_Swizzling.h rename to LLDebugTool/Components/AppInfo/Function/UIDevice+LL_Swizzling.h diff --git a/LLDebugTool/UserInterface/Categories/UIDevice/UIDevice+LL_Swizzling.m b/LLDebugTool/Components/AppInfo/Function/UIDevice+LL_Swizzling.m similarity index 100% rename from LLDebugTool/UserInterface/Categories/UIDevice/UIDevice+LL_Swizzling.m rename to LLDebugTool/Components/AppInfo/Function/UIDevice+LL_Swizzling.m diff --git a/LLDebugTool/UserInterface/Sections/AppInfo/LLAppInfoVC.h b/LLDebugTool/Components/AppInfo/UserInterface/LLAppInfoVC.h similarity index 100% rename from LLDebugTool/UserInterface/Sections/AppInfo/LLAppInfoVC.h rename to LLDebugTool/Components/AppInfo/UserInterface/LLAppInfoVC.h diff --git a/LLDebugTool/UserInterface/Sections/AppInfo/LLAppInfoVC.m b/LLDebugTool/Components/AppInfo/UserInterface/LLAppInfoVC.m similarity index 100% rename from LLDebugTool/UserInterface/Sections/AppInfo/LLAppInfoVC.m rename to LLDebugTool/Components/AppInfo/UserInterface/LLAppInfoVC.m diff --git a/LLDebugTool/Helper/CrashHelper/LLCrashHelper.h b/LLDebugTool/Components/Crash/Function/LLCrashHelper.h similarity index 100% rename from LLDebugTool/Helper/CrashHelper/LLCrashHelper.h rename to LLDebugTool/Components/Crash/Function/LLCrashHelper.h diff --git a/LLDebugTool/Helper/CrashHelper/LLCrashHelper.m b/LLDebugTool/Components/Crash/Function/LLCrashHelper.m similarity index 97% rename from LLDebugTool/Helper/CrashHelper/LLCrashHelper.m rename to LLDebugTool/Components/Crash/Function/LLCrashHelper.m index 716ec395..d88fdd1b 100644 --- a/LLDebugTool/Helper/CrashHelper/LLCrashHelper.m +++ b/LLDebugTool/Components/Crash/Function/LLCrashHelper.m @@ -26,7 +26,7 @@ #include #import "LLStorageManager.h" #import "LLCrashModel.h" -#import "LLAppHelper.h" +#import "LLRoute.h" #import "LLConfig.h" #import "LLTool.h" #import "NSObject+LL_Utils.h" @@ -153,7 +153,7 @@ - (void)unregisterCatch { - (void)saveException:(NSException *)exception { NSString *date = [LLTool stringFromDate:[NSDate date]]; - NSArray *appInfos = [[LLAppHelper sharedHelper] appInfos]; + NSArray *appInfos = [LLRoute appInfos]; if (self.crashModel) { LLCrashModel *model = [[LLCrashModel alloc] initWithName:exception.name reason:exception.reason userInfo:exception.userInfo stackSymbols:exception.callStackSymbols date:date userIdentity:[LLConfig sharedConfig].userIdentity appInfos:appInfos launchDate:[NSObject launchDate]]; @@ -326,16 +326,16 @@ void SignalHandler(int sig) NSArray *callStackSymbols = [NSThread callStackSymbols]; NSString *date = [LLTool stringFromDate:[NSDate date]]; - NSDictionary *appInfos = [[LLAppHelper sharedHelper] dynamicAppInfos]; + NSDictionary *appInfos = [LLRoute dynamicAppInfos]; LLCrashSignalModel *signalModel = [[LLCrashSignalModel alloc] initWithName:name stackSymbols:callStackSymbols date:date userIdentity:[LLConfig sharedConfig].userIdentity appInfos:appInfos]; if ([LLCrashHelper sharedHelper].crashModel) { - [[LLCrashHelper sharedHelper].crashModel updateAppInfos:[[LLAppHelper sharedHelper] appInfos]]; + [[LLCrashHelper sharedHelper].crashModel updateAppInfos:[LLRoute appInfos]]; [[LLCrashHelper sharedHelper].crashModel appendSignalModel:signalModel]; [[LLStorageManager sharedManager] updateModel:[LLCrashHelper sharedHelper].crashModel complete:^(BOOL result) { NSLog(@"Save signal model success"); } synchronous:YES]; } else { - LLCrashModel *model = [[LLCrashModel alloc] initWithName:signalModel.name reason:@"Catch Signal" userInfo:nil stackSymbols:callStackSymbols date:date userIdentity:[LLConfig sharedConfig].userIdentity appInfos:[[LLAppHelper sharedHelper] appInfos] launchDate:[NSObject launchDate]]; + LLCrashModel *model = [[LLCrashModel alloc] initWithName:signalModel.name reason:@"Catch Signal" userInfo:nil stackSymbols:callStackSymbols date:date userIdentity:[LLConfig sharedConfig].userIdentity appInfos:[LLRoute appInfos] launchDate:[NSObject launchDate]]; [model appendSignalModel:signalModel]; [LLCrashHelper sharedHelper].crashModel = model; [[LLStorageManager sharedManager] saveModel:model complete:^(BOOL result) { diff --git a/LLDebugTool/Helper/CrashHelper/LLCrashModel.h b/LLDebugTool/Components/Crash/Function/LLCrashModel.h similarity index 100% rename from LLDebugTool/Helper/CrashHelper/LLCrashModel.h rename to LLDebugTool/Components/Crash/Function/LLCrashModel.h diff --git a/LLDebugTool/Helper/CrashHelper/LLCrashModel.m b/LLDebugTool/Components/Crash/Function/LLCrashModel.m similarity index 100% rename from LLDebugTool/Helper/CrashHelper/LLCrashModel.m rename to LLDebugTool/Components/Crash/Function/LLCrashModel.m diff --git a/LLDebugTool/Helper/CrashHelper/LLCrashSignalModel.h b/LLDebugTool/Components/Crash/Function/LLCrashSignalModel.h similarity index 100% rename from LLDebugTool/Helper/CrashHelper/LLCrashSignalModel.h rename to LLDebugTool/Components/Crash/Function/LLCrashSignalModel.h diff --git a/LLDebugTool/Helper/CrashHelper/LLCrashSignalModel.m b/LLDebugTool/Components/Crash/Function/LLCrashSignalModel.m similarity index 100% rename from LLDebugTool/Helper/CrashHelper/LLCrashSignalModel.m rename to LLDebugTool/Components/Crash/Function/LLCrashSignalModel.m diff --git a/LLDebugTool/UserInterface/Sections/Crash/LLCrashCell.h b/LLDebugTool/Components/Crash/UserInterface/LLCrashCell.h similarity index 100% rename from LLDebugTool/UserInterface/Sections/Crash/LLCrashCell.h rename to LLDebugTool/Components/Crash/UserInterface/LLCrashCell.h diff --git a/LLDebugTool/UserInterface/Sections/Crash/LLCrashCell.m b/LLDebugTool/Components/Crash/UserInterface/LLCrashCell.m similarity index 100% rename from LLDebugTool/UserInterface/Sections/Crash/LLCrashCell.m rename to LLDebugTool/Components/Crash/UserInterface/LLCrashCell.m diff --git a/LLDebugTool/UserInterface/Sections/Crash/LLCrashCell.xib b/LLDebugTool/Components/Crash/UserInterface/LLCrashCell.xib similarity index 100% rename from LLDebugTool/UserInterface/Sections/Crash/LLCrashCell.xib rename to LLDebugTool/Components/Crash/UserInterface/LLCrashCell.xib diff --git a/LLDebugTool/UserInterface/Sections/Crash/LLCrashContentCell.h b/LLDebugTool/Components/Crash/UserInterface/LLCrashContentCell.h similarity index 100% rename from LLDebugTool/UserInterface/Sections/Crash/LLCrashContentCell.h rename to LLDebugTool/Components/Crash/UserInterface/LLCrashContentCell.h diff --git a/LLDebugTool/UserInterface/Sections/Crash/LLCrashContentCell.m b/LLDebugTool/Components/Crash/UserInterface/LLCrashContentCell.m similarity index 100% rename from LLDebugTool/UserInterface/Sections/Crash/LLCrashContentCell.m rename to LLDebugTool/Components/Crash/UserInterface/LLCrashContentCell.m diff --git a/LLDebugTool/UserInterface/Sections/Crash/LLCrashContentCell.xib b/LLDebugTool/Components/Crash/UserInterface/LLCrashContentCell.xib similarity index 100% rename from LLDebugTool/UserInterface/Sections/Crash/LLCrashContentCell.xib rename to LLDebugTool/Components/Crash/UserInterface/LLCrashContentCell.xib diff --git a/LLDebugTool/UserInterface/Sections/Crash/LLCrashContentVC.h b/LLDebugTool/Components/Crash/UserInterface/LLCrashContentVC.h similarity index 100% rename from LLDebugTool/UserInterface/Sections/Crash/LLCrashContentVC.h rename to LLDebugTool/Components/Crash/UserInterface/LLCrashContentVC.h diff --git a/LLDebugTool/UserInterface/Sections/Crash/LLCrashContentVC.m b/LLDebugTool/Components/Crash/UserInterface/LLCrashContentVC.m similarity index 84% rename from LLDebugTool/UserInterface/Sections/Crash/LLCrashContentVC.m rename to LLDebugTool/Components/Crash/UserInterface/LLCrashContentVC.m index 7b7ea2f5..2ca4bf23 100644 --- a/LLDebugTool/UserInterface/Sections/Crash/LLCrashContentVC.m +++ b/LLDebugTool/Components/Crash/UserInterface/LLCrashContentVC.m @@ -25,11 +25,10 @@ #import "LLSubTitleTableViewCell.h" #import "LLMacros.h" #import "LLStorageManager.h" -#import "LLNetworkVC.h" -#import "LLLogVC.h" #import "LLConfig.h" #import "LLTool.h" #import "LLCrashSignalContentVC.h" +#import "LLRoute.h" static NSString *const kCrashContentCellID = @"CrashContentCellID"; @@ -73,12 +72,10 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSString *title = self.titleArray[indexPath.row]; if ([title isEqualToString:@"Logs"]) { - LLLogVC *vc = [[LLLogVC alloc] initWithStyle:UITableViewStyleGrouped]; - vc.launchDate = self.model.launchDate; + UIViewController *vc = [LLRoute viewControllerWithName:@"LLLogVC" params:@{@"launchDate" : self.model.launchDate}]; [self.navigationController pushViewController:vc animated:YES]; } else if ([title isEqualToString:@"Network Requests"]) { - LLNetworkVC *vc = [[LLNetworkVC alloc] initWithStyle:UITableViewStyleGrouped]; - vc.launchDate = self.model.launchDate; + UIViewController *vc = [LLRoute viewControllerWithName:@"LLNetworkVC" params:@{@"launchDate" : self.model.launchDate}]; [self.navigationController pushViewController:vc animated:YES]; } else if ([title hasPrefix:@"Signal"]) { NSInteger index = 0; @@ -115,18 +112,29 @@ - (void)initial { } - (void)loadData { - __weak typeof(self) weakSelf = self; - [LLTool loadingMessage:@"Loading"]; - [[LLStorageManager sharedManager] getModels:[LLLogModel class] launchDate:_model.launchDate complete:^(NSArray *result) { - // Get log models. - __block NSArray *logs = result; - [[LLStorageManager sharedManager] getModels:[LLNetworkModel class] launchDate:weakSelf.model.launchDate complete:^(NSArray *result) { - [LLTool hideLoadingMessage]; - // Get nework requests. - NSArray *networkRequests = result; - [weakSelf updateDataWithLogs:logs networkRequests:networkRequests]; + + Class logModelClass = NSClassFromString(kLLLogModelName); + Class networkModelClass = NSClassFromString(kLLNetworkModelName); + if (logModelClass != nil && networkModelClass != nil) { + __weak typeof(self) weakSelf = self; + [LLTool loadingMessage:@"Loading"]; + [[LLStorageManager sharedManager] getModels:[LLLogModel class] launchDate:_model.launchDate complete:^(NSArray *result) { + // Get log models. + __block NSArray *logs = result; + [[LLStorageManager sharedManager] getModels:[LLNetworkModel class] launchDate:weakSelf.model.launchDate complete:^(NSArray *result) { + [LLTool hideLoadingMessage]; + // Get nework requests. + NSArray *networkRequests = result; + [weakSelf updateDataWithLogs:logs networkRequests:networkRequests]; + }]; }]; - }]; + } else if (logModelClass != nil) { + + } else if (networkModelClass != nil) { + + } else { + + } } - (void)updateDataWithLogs:(NSArray *)logs networkRequests:(NSArray *)networkRequests { diff --git a/LLDebugTool/UserInterface/Sections/Crash/LLCrashSignalContentVC.h b/LLDebugTool/Components/Crash/UserInterface/LLCrashSignalContentVC.h similarity index 100% rename from LLDebugTool/UserInterface/Sections/Crash/LLCrashSignalContentVC.h rename to LLDebugTool/Components/Crash/UserInterface/LLCrashSignalContentVC.h diff --git a/LLDebugTool/UserInterface/Sections/Crash/LLCrashSignalContentVC.m b/LLDebugTool/Components/Crash/UserInterface/LLCrashSignalContentVC.m similarity index 100% rename from LLDebugTool/UserInterface/Sections/Crash/LLCrashSignalContentVC.m rename to LLDebugTool/Components/Crash/UserInterface/LLCrashSignalContentVC.m diff --git a/LLDebugTool/UserInterface/Sections/Crash/LLCrashVC.h b/LLDebugTool/Components/Crash/UserInterface/LLCrashVC.h similarity index 100% rename from LLDebugTool/UserInterface/Sections/Crash/LLCrashVC.h rename to LLDebugTool/Components/Crash/UserInterface/LLCrashVC.h diff --git a/LLDebugTool/UserInterface/Sections/Crash/LLCrashVC.m b/LLDebugTool/Components/Crash/UserInterface/LLCrashVC.m similarity index 100% rename from LLDebugTool/UserInterface/Sections/Crash/LLCrashVC.m rename to LLDebugTool/Components/Crash/UserInterface/LLCrashVC.m diff --git a/LLDebugTool/UserInterface/Base/LLBaseModel.h b/LLDebugTool/Components/General/Function/Base/LLBaseModel.h similarity index 100% rename from LLDebugTool/UserInterface/Base/LLBaseModel.h rename to LLDebugTool/Components/General/Function/Base/LLBaseModel.h diff --git a/LLDebugTool/UserInterface/Base/LLBaseModel.m b/LLDebugTool/Components/General/Function/Base/LLBaseModel.m similarity index 100% rename from LLDebugTool/UserInterface/Base/LLBaseModel.m rename to LLDebugTool/Components/General/Function/Base/LLBaseModel.m diff --git a/LLDebugTool/UserInterface/Categories/NSObject/NSObject+LL_Utils.h b/LLDebugTool/Components/General/Function/Category/NSObject/NSObject+LL_Utils.h similarity index 100% rename from LLDebugTool/UserInterface/Categories/NSObject/NSObject+LL_Utils.h rename to LLDebugTool/Components/General/Function/Category/NSObject/NSObject+LL_Utils.h diff --git a/LLDebugTool/UserInterface/Categories/NSObject/NSObject+LL_Utils.m b/LLDebugTool/Components/General/Function/Category/NSObject/NSObject+LL_Utils.m similarity index 100% rename from LLDebugTool/UserInterface/Categories/NSObject/NSObject+LL_Utils.m rename to LLDebugTool/Components/General/Function/Category/NSObject/NSObject+LL_Utils.m diff --git a/LLDebugTool/UserInterface/Categories/NSString/NSString+LL_Utils.h b/LLDebugTool/Components/General/Function/Category/NSString/NSString+LL_Utils.h similarity index 100% rename from LLDebugTool/UserInterface/Categories/NSString/NSString+LL_Utils.h rename to LLDebugTool/Components/General/Function/Category/NSString/NSString+LL_Utils.h diff --git a/LLDebugTool/UserInterface/Categories/NSString/NSString+LL_Utils.m b/LLDebugTool/Components/General/Function/Category/NSString/NSString+LL_Utils.m similarity index 100% rename from LLDebugTool/UserInterface/Categories/NSString/NSString+LL_Utils.m rename to LLDebugTool/Components/General/Function/Category/NSString/NSString+LL_Utils.m diff --git a/LLDebugTool/UserInterface/Others/LLMacros.h b/LLDebugTool/Components/General/Function/Macros/LLMacros.h similarity index 100% rename from LLDebugTool/UserInterface/Others/LLMacros.h rename to LLDebugTool/Components/General/Function/Macros/LLMacros.h diff --git a/LLDebugTool/Components/General/Function/Route/LLRoute.h b/LLDebugTool/Components/General/Function/Route/LLRoute.h new file mode 100644 index 00000000..8d68e6e8 --- /dev/null +++ b/LLDebugTool/Components/General/Function/Route/LLRoute.h @@ -0,0 +1,83 @@ +// +// LLRoute.h +// +// Copyright (c) 2018 LLDebugTool Software Foundation (https://github.com/HDB-Li/LLDebugTool) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +#import +#import "LLConfig.h" + +// Event +FOUNDATION_EXPORT NSString * _Nonnull const kLLDebugToolEvent; +FOUNDATION_EXPORT NSString * _Nonnull const kLLFailedLoadingResourceEvent; + +// Define +FOUNDATION_EXPORT NSString * _Nonnull const kLLUseBetaAlertPrompt; +FOUNDATION_EXPORT NSString * _Nonnull const kLLOpenIssueInGithubPrompt; + +static NSString *const kLLNetworkVCName = @"LLNetworkVC"; +static NSString *const kLLLogVCName = @"LLLogVC"; +static NSString *const kLLNetworkModelName = @"LLNetworkModel"; +static NSString *const kLLLogModelName = @"LLLogModel"; + +@interface LLRoute : NSObject + +#pragma mark - DebugTool Route +/** + If LLDebugTool exists, set new availables to LLDebugTool, otherwise nothing will be done. + */ ++ (void)setNewAvailables:(LLConfigAvailableFeature)availables; + +/** + If LLDebugTool exists, LLDebugTool's window called showWindow method, otherwise nothing will be done. + */ ++ (void)showWindow; + +/** + If LLDebugTool exists, LLDebugTool's window called hideWindow method, otherwise nothing will be done. + */ ++ (void)hideWindow; + +#pragma mark - Log Route +/** + If LLLogHelper exists, LLLogHelper is called, otherwise NSLog is called. + */ ++ (void)logWithMessage:(NSString *_Nonnull)message event:(NSString *_Nullable)event; + +#pragma mark - App Route +/** + If LLAppHelper exists, LLAppHelper is called, otherwise nothing will be done. + */ ++ (void)updateRequestDataTraffic:(unsigned long long)requestDataTraffic responseDataTraffic:(unsigned long long)responseDataTraffic; + +/** + If LLAppHelper exists, LLAppHelper is called, otherwise nothing will be done. + */ ++ (NSMutableArray *>*>*_Nonnull)appInfos; + +/** + If LLAppHelper exists, LLAppHelper is called, otherwise nothing will be done. + */ ++ (NSDictionary *_Nonnull)dynamicAppInfos; + +#pragma mark - Base ++ (UIViewController *_Nullable)viewControllerWithName:(NSString *_Nonnull)name params:(NSDictionary *)params; + +@end diff --git a/LLDebugTool/Components/General/Function/Route/LLRoute.m b/LLDebugTool/Components/General/Function/Route/LLRoute.m new file mode 100644 index 00000000..5ba375fc --- /dev/null +++ b/LLDebugTool/Components/General/Function/Route/LLRoute.m @@ -0,0 +1,146 @@ +// +// LLRoute.m +// +// Copyright (c) 2018 LLDebugTool Software Foundation (https://github.com/HDB-Li/LLDebugTool) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + +#import "LLRoute.h" +#import "LLBaseViewController.h" + +#ifndef INSTALLED_LLDEBUGTOOL +#define INSTALLED_LLDEBUGTOOL (__has_include("LLDebugTool.h") || __has_include("")) +#endif + +#ifndef LL_HAS_INCLUDE_LOG_HELPER +#define LL_HAS_INCLUDE_LOG_HELPER (__has_include("LLLogHelper.h") || __has_include("")) +#endif + +#ifndef LL_HAS_INCLUDE_APP_HELPER +#define LL_HAS_INCLUDE_APP_HELPER (__has_include("LLAppHelper.h") || __has_include("")) +#endif + +#if __has_include("LLDebugTool.h") +#import "LLDebugTool.h" +#import "LLNetworkHelper.h" +#import "LLLogHelper.h" +#import "LLCrashHelper.h" +#import "LLAppHelper.h" +#import "LLScreenshotHelper.h" +#import "LLWindow.h" +#elif __has_include("") +#import "" +#import "" +#import "" +#import "" +#import "" +#import "" +#import "" +#endif + +#if __has_include("LLLogHelper.h") +#import "LLLogHelper.h" +#elif __has_include("") +#import "" +#endif + +#if __has_include("LLAppHelper.h") +#import "LLAppHelper.h" +#elif __has_include("") +#import "" +#endif + +// Event +NSString * const kLLDebugToolEvent = @"LLDebugTool"; +NSString * const kLLFailedLoadingResourceEvent = @"Resource Failed"; + +// Define +NSString * const kLLUseBetaAlertPrompt = @"You are using a Beta version, please use release version."; +NSString * const kLLOpenIssueInGithubPrompt = @" Open an issue in \"https://github.com/HDB-Li/LLDebugTool\" if you need to get more help."; + +@implementation LLRoute + ++ (void)logWithMessage:(NSString *_Nonnull)message event:(NSString *_Nullable)event { +#if LL_HAS_INCLUDE_LOG_HELPER + LLog_Alert_Event(event, message); +#else + NSLog(@"%@" , message); +#endif +} + ++ (void)setNewAvailables:(LLConfigAvailableFeature)availables { +#if INSTALLED_LLDEBUGTOOL + if ([LLDebugTool sharedTool].isWorking) { + [[LLNetworkHelper sharedHelper] setEnable:networkEnable]; + [[LLLogHelper sharedHelper] setEnable:logEnable]; + [[LLCrashHelper sharedHelper] setEnable:crashEnable]; + [[LLAppHelper sharedHelper] setEnable:appInfoEnable]; + [[LLScreenshotHelper sharedHelper] setEnable:screenshotEnable]; + } +#endif +} + ++ (void)showWindow { +#if INSTALLED_LLDEBUGTOOL + [[LLDebugTool sharedTool].window showWindow]; +#endif +} + ++ (void)hideWindow { +#if INSTALLED_LLDEBUGTOOL + [[LLDebugTool sharedTool].window hideWindow]; +#endif +} + ++ (void)updateRequestDataTraffic:(unsigned long long)requestDataTraffic responseDataTraffic:(unsigned long long)responseDataTraffic { +#if LL_HAS_INCLUDE_APP_HELPER + [[LLAppHelper sharedHelper] updateRequestDataTraffic:requestDataTraffic responseDataTraffic:responseDataTraffic]; +#endif +} + ++ (NSMutableArray *>*>*_Nonnull)appInfos { +#if LL_HAS_INCLUDE_APP_HELPER + return [[LLAppHelper sharedHelper] appInfos]; +#endif + return nil; +} + ++ (NSDictionary *_Nonnull)dynamicAppInfos { +#if LL_HAS_INCLUDE_APP_HELPER + return [[LLAppHelper sharedHelper] dynamicAppInfos]; +#endif + return nil; +} + ++ (UIViewController *_Nullable)viewControllerWithName:(NSString *_Nonnull)name params:(NSDictionary *)params { + Class cls = NSClassFromString(name); + if (cls) { + if ([cls isKindOfClass:[LLBaseViewController class]]) { + LLBaseViewController *vc = [[cls alloc] initWithStyle:UITableViewStyleGrouped]; + for (NSString *key in params) { + id value = params[key]; + [vc setValue:value forKey:key]; + } + return vc; + } + } + return nil; +} + +@end diff --git a/LLDebugTool/UserInterface/Tool/LLTool.h b/LLDebugTool/Components/General/Function/Tool/LLTool.h similarity index 100% rename from LLDebugTool/UserInterface/Tool/LLTool.h rename to LLDebugTool/Components/General/Function/Tool/LLTool.h diff --git a/LLDebugTool/UserInterface/Tool/LLTool.m b/LLDebugTool/Components/General/Function/Tool/LLTool.m similarity index 97% rename from LLDebugTool/UserInterface/Tool/LLTool.m rename to LLDebugTool/Components/General/Function/Tool/LLTool.m index fc451198..f13bb5b8 100644 --- a/LLDebugTool/UserInterface/Tool/LLTool.m +++ b/LLDebugTool/Components/General/Function/Tool/LLTool.m @@ -24,8 +24,7 @@ #import "LLTool.h" #import "LLConfig.h" #import "LLMacros.h" -#import "LLDebugToolMacros.h" -#import "LLLogHelperEventDefine.h" +#import "LLRoute.h" static LLTool *_instance = nil; @@ -132,7 +131,7 @@ + (BOOL)createDirectoryAtPath:(NSString *)path { NSError *error; [[NSFileManager defaultManager] createDirectoryAtPath:path withIntermediateDirectories:YES attributes:nil error:&error]; if (error) { - LLog_Alert_Event(kLLLogHelperDebugToolEvent, [NSString stringWithFormat:@"Create folder fail, path = %@, error = %@",path,error.description]); + [LLRoute logWithMessage:[NSString stringWithFormat:@"Create folder fail, path = %@, error = %@",path,error.description] event:kLLDebugToolEvent]; NSAssert(!error, error.description); return NO; } diff --git a/LLDebugTool/UserInterface/Base/LLBaseNavigationController.h b/LLDebugTool/Components/General/UserInterface/Base/LLBaseNavigationController.h similarity index 100% rename from LLDebugTool/UserInterface/Base/LLBaseNavigationController.h rename to LLDebugTool/Components/General/UserInterface/Base/LLBaseNavigationController.h diff --git a/LLDebugTool/UserInterface/Base/LLBaseNavigationController.m b/LLDebugTool/Components/General/UserInterface/Base/LLBaseNavigationController.m similarity index 100% rename from LLDebugTool/UserInterface/Base/LLBaseNavigationController.m rename to LLDebugTool/Components/General/UserInterface/Base/LLBaseNavigationController.m diff --git a/LLDebugTool/UserInterface/Base/LLBaseTableViewCell.h b/LLDebugTool/Components/General/UserInterface/Base/LLBaseTableViewCell.h similarity index 100% rename from LLDebugTool/UserInterface/Base/LLBaseTableViewCell.h rename to LLDebugTool/Components/General/UserInterface/Base/LLBaseTableViewCell.h diff --git a/LLDebugTool/UserInterface/Base/LLBaseTableViewCell.m b/LLDebugTool/Components/General/UserInterface/Base/LLBaseTableViewCell.m similarity index 100% rename from LLDebugTool/UserInterface/Base/LLBaseTableViewCell.m rename to LLDebugTool/Components/General/UserInterface/Base/LLBaseTableViewCell.m diff --git a/LLDebugTool/UserInterface/Base/LLBaseViewController.h b/LLDebugTool/Components/General/UserInterface/Base/LLBaseViewController.h similarity index 100% rename from LLDebugTool/UserInterface/Base/LLBaseViewController.h rename to LLDebugTool/Components/General/UserInterface/Base/LLBaseViewController.h diff --git a/LLDebugTool/UserInterface/Base/LLBaseViewController.m b/LLDebugTool/Components/General/UserInterface/Base/LLBaseViewController.m similarity index 96% rename from LLDebugTool/UserInterface/Base/LLBaseViewController.m rename to LLDebugTool/Components/General/UserInterface/Base/LLBaseViewController.m index 77241cce..b0ba3e74 100644 --- a/LLDebugTool/UserInterface/Base/LLBaseViewController.m +++ b/LLDebugTool/Components/General/UserInterface/Base/LLBaseViewController.m @@ -23,10 +23,10 @@ #import "LLBaseViewController.h" #import "LLImageNameConfig.h" -#import "LLDebugTool.h" #import "LLMacros.h" -#import "LLWindow.h" #import "LLTool.h" +#import "LLConfig.h" +#import "LLRoute.h" static NSString *const kEmptyCellID = @"emptyCellID"; @@ -38,6 +38,15 @@ @interface LLBaseViewController () @implementation LLBaseViewController +- (instancetype)init +{ + self = [super init]; + if (self) { + _style = UITableViewStyleGrouped; + } + return self; +} + - (instancetype)initWithStyle:(UITableViewStyle)style { if (self = [super init]) { _style = style; @@ -77,7 +86,7 @@ - (void)showAlertControllerWithMessage:(NSString *)message handler:(void (^)(NSI #pragma mark - Rewrite - (void)leftItemClick { - [[LLDebugTool sharedTool].window showWindow]; + [LLRoute showWindow]; [self dismissViewControllerAnimated:YES completion:nil]; } diff --git a/LLDebugTool/UserInterface/Categories/UIButton/UIButton+LL_Utils.h b/LLDebugTool/Components/General/UserInterface/Category/UIButton/UIButton+LL_Utils.h similarity index 100% rename from LLDebugTool/UserInterface/Categories/UIButton/UIButton+LL_Utils.h rename to LLDebugTool/Components/General/UserInterface/Category/UIButton/UIButton+LL_Utils.h diff --git a/LLDebugTool/UserInterface/Categories/UIButton/UIButton+LL_Utils.m b/LLDebugTool/Components/General/UserInterface/Category/UIButton/UIButton+LL_Utils.m similarity index 100% rename from LLDebugTool/UserInterface/Categories/UIButton/UIButton+LL_Utils.m rename to LLDebugTool/Components/General/UserInterface/Category/UIButton/UIButton+LL_Utils.m diff --git a/LLDebugTool/UserInterface/Categories/UIImage/UIImage+LL_Utils.h b/LLDebugTool/Components/General/UserInterface/Category/UIImage/UIImage+LL_Utils.h similarity index 100% rename from LLDebugTool/UserInterface/Categories/UIImage/UIImage+LL_Utils.h rename to LLDebugTool/Components/General/UserInterface/Category/UIImage/UIImage+LL_Utils.h diff --git a/LLDebugTool/UserInterface/Categories/UIImage/UIImage+LL_Utils.m b/LLDebugTool/Components/General/UserInterface/Category/UIImage/UIImage+LL_Utils.m similarity index 100% rename from LLDebugTool/UserInterface/Categories/UIImage/UIImage+LL_Utils.m rename to LLDebugTool/Components/General/UserInterface/Category/UIImage/UIImage+LL_Utils.m diff --git a/LLDebugTool/UserInterface/Others/FilterView/TextFieldCell/LLFilterDatePickerView.h b/LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterDatePickerView.h similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/TextFieldCell/LLFilterDatePickerView.h rename to LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterDatePickerView.h diff --git a/LLDebugTool/UserInterface/Others/FilterView/TextFieldCell/LLFilterDatePickerView.m b/LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterDatePickerView.m similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/TextFieldCell/LLFilterDatePickerView.m rename to LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterDatePickerView.m diff --git a/LLDebugTool/UserInterface/Others/FilterView/LLFilterDateView.h b/LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterDateView.h similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/LLFilterDateView.h rename to LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterDateView.h diff --git a/LLDebugTool/UserInterface/Others/FilterView/LLFilterDateView.m b/LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterDateView.m similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/LLFilterDateView.m rename to LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterDateView.m diff --git a/LLDebugTool/UserInterface/Others/FilterView/LLFilterEventView.h b/LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterEventView.h similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/LLFilterEventView.h rename to LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterEventView.h diff --git a/LLDebugTool/UserInterface/Others/FilterView/LLFilterEventView.m b/LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterEventView.m similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/LLFilterEventView.m rename to LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterEventView.m diff --git a/LLDebugTool/UserInterface/Others/FilterView/TextFieldCell/LLFilterFilePickerView.h b/LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterFilePickerView.h similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/TextFieldCell/LLFilterFilePickerView.h rename to LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterFilePickerView.h diff --git a/LLDebugTool/UserInterface/Others/FilterView/TextFieldCell/LLFilterFilePickerView.m b/LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterFilePickerView.m similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/TextFieldCell/LLFilterFilePickerView.m rename to LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterFilePickerView.m diff --git a/LLDebugTool/UserInterface/Others/FilterView/LabelCell/LLFilterLabelCell.h b/LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterLabelCell.h similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/LabelCell/LLFilterLabelCell.h rename to LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterLabelCell.h diff --git a/LLDebugTool/UserInterface/Others/FilterView/LabelCell/LLFilterLabelCell.m b/LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterLabelCell.m similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/LabelCell/LLFilterLabelCell.m rename to LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterLabelCell.m diff --git a/LLDebugTool/UserInterface/Others/FilterView/LabelCell/LLFilterLabelCell.xib b/LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterLabelCell.xib similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/LabelCell/LLFilterLabelCell.xib rename to LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterLabelCell.xib diff --git a/LLDebugTool/UserInterface/Others/FilterView/LabelCell/LLFilterLabelModel.h b/LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterLabelModel.h similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/LabelCell/LLFilterLabelModel.h rename to LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterLabelModel.h diff --git a/LLDebugTool/UserInterface/Others/FilterView/LabelCell/LLFilterLabelModel.m b/LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterLabelModel.m similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/LabelCell/LLFilterLabelModel.m rename to LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterLabelModel.m diff --git a/LLDebugTool/UserInterface/Others/FilterView/LLFilterOtherView.h b/LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterOtherView.h similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/LLFilterOtherView.h rename to LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterOtherView.h diff --git a/LLDebugTool/UserInterface/Others/FilterView/LLFilterOtherView.m b/LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterOtherView.m similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/LLFilterOtherView.m rename to LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterOtherView.m diff --git a/LLDebugTool/UserInterface/Others/FilterView/TextFieldCell/LLFilterTextFieldCell.h b/LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterTextFieldCell.h similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/TextFieldCell/LLFilterTextFieldCell.h rename to LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterTextFieldCell.h diff --git a/LLDebugTool/UserInterface/Others/FilterView/TextFieldCell/LLFilterTextFieldCell.m b/LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterTextFieldCell.m similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/TextFieldCell/LLFilterTextFieldCell.m rename to LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterTextFieldCell.m diff --git a/LLDebugTool/UserInterface/Others/FilterView/TextFieldCell/LLFilterTextFieldCell.xib b/LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterTextFieldCell.xib similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/TextFieldCell/LLFilterTextFieldCell.xib rename to LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterTextFieldCell.xib diff --git a/LLDebugTool/UserInterface/Others/FilterView/TextFieldCell/LLFilterTextFieldModel.h b/LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterTextFieldModel.h similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/TextFieldCell/LLFilterTextFieldModel.h rename to LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterTextFieldModel.h diff --git a/LLDebugTool/UserInterface/Others/FilterView/TextFieldCell/LLFilterTextFieldModel.m b/LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterTextFieldModel.m similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/TextFieldCell/LLFilterTextFieldModel.m rename to LLDebugTool/Components/General/UserInterface/Controls/LLFilterView/LLFilterTextFieldModel.m diff --git a/LLDebugTool/UserInterface/Categories/UITextField/LLNoneCopyTextField.h b/LLDebugTool/Components/General/UserInterface/Controls/LLNoneCopyTextField/LLNoneCopyTextField.h similarity index 100% rename from LLDebugTool/UserInterface/Categories/UITextField/LLNoneCopyTextField.h rename to LLDebugTool/Components/General/UserInterface/Controls/LLNoneCopyTextField/LLNoneCopyTextField.h diff --git a/LLDebugTool/UserInterface/Categories/UITextField/LLNoneCopyTextField.m b/LLDebugTool/Components/General/UserInterface/Controls/LLNoneCopyTextField/LLNoneCopyTextField.m similarity index 100% rename from LLDebugTool/UserInterface/Categories/UITextField/LLNoneCopyTextField.m rename to LLDebugTool/Components/General/UserInterface/Controls/LLNoneCopyTextField/LLNoneCopyTextField.m diff --git a/LLDebugTool/UserInterface/Categories/UISearchBar/LLSearchBar.h b/LLDebugTool/Components/General/UserInterface/Controls/LLSearchBar/LLSearchBar.h similarity index 100% rename from LLDebugTool/UserInterface/Categories/UISearchBar/LLSearchBar.h rename to LLDebugTool/Components/General/UserInterface/Controls/LLSearchBar/LLSearchBar.h diff --git a/LLDebugTool/UserInterface/Categories/UISearchBar/LLSearchBar.m b/LLDebugTool/Components/General/UserInterface/Controls/LLSearchBar/LLSearchBar.m similarity index 100% rename from LLDebugTool/UserInterface/Categories/UISearchBar/LLSearchBar.m rename to LLDebugTool/Components/General/UserInterface/Controls/LLSearchBar/LLSearchBar.m diff --git a/LLDebugTool/UserInterface/Others/LLSubTitleTableViewCell.h b/LLDebugTool/Components/General/UserInterface/Controls/LLSubTitleTableViewCell/LLSubTitleTableViewCell.h similarity index 100% rename from LLDebugTool/UserInterface/Others/LLSubTitleTableViewCell.h rename to LLDebugTool/Components/General/UserInterface/Controls/LLSubTitleTableViewCell/LLSubTitleTableViewCell.h diff --git a/LLDebugTool/UserInterface/Others/LLSubTitleTableViewCell.m b/LLDebugTool/Components/General/UserInterface/Controls/LLSubTitleTableViewCell/LLSubTitleTableViewCell.m similarity index 100% rename from LLDebugTool/UserInterface/Others/LLSubTitleTableViewCell.m rename to LLDebugTool/Components/General/UserInterface/Controls/LLSubTitleTableViewCell/LLSubTitleTableViewCell.m diff --git a/LLDebugTool/UserInterface/Others/LLSubTitleTableViewCell.xib b/LLDebugTool/Components/General/UserInterface/Controls/LLSubTitleTableViewCell/LLSubTitleTableViewCell.xib similarity index 100% rename from LLDebugTool/UserInterface/Others/LLSubTitleTableViewCell.xib rename to LLDebugTool/Components/General/UserInterface/Controls/LLSubTitleTableViewCell/LLSubTitleTableViewCell.xib diff --git a/LLDebugTool/UserInterface/Others/LLUITableViewLongPressGestureRecognizerDelegate.h b/LLDebugTool/Components/General/UserInterface/Controls/LLSubTitleTableViewCell/LLUITableViewLongPressGestureRecognizerDelegate.h similarity index 100% rename from LLDebugTool/UserInterface/Others/LLUITableViewLongPressGestureRecognizerDelegate.h rename to LLDebugTool/Components/General/UserInterface/Controls/LLSubTitleTableViewCell/LLUITableViewLongPressGestureRecognizerDelegate.h diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-app@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-app@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-app@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-app@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-app@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-app@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-app@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-app@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-avi@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-avi@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-avi@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-avi@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-avi@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-avi@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-avi@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-avi@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-cancel@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-cancel@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-cancel@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-cancel@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-cancel@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-cancel@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-cancel@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-cancel@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-clear@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-clear@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-clear@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-clear@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-clear@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-clear@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-clear@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-clear@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-close@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-close@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-close@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-close@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-close@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-close@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-close@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-close@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-crash@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-crash@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-crash@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-crash@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-crash@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-crash@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-crash@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-crash@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-css@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-css@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-css@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-css@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-css@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-css@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-css@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-css@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-doc@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-doc@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-doc@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-doc@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-doc@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-doc@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-doc@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-doc@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-done@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-done@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-done@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-done@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-done@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-done@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-done@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-done@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-edit@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-edit@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-edit@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-edit@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-edit@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-edit@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-edit@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-edit@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-folder-empty@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-folder-empty@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-folder-empty@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-folder-empty@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-folder-empty@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-folder-empty@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-folder-empty@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-folder-empty@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-folder@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-folder@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-folder@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-folder@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-folder@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-folder@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-folder@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-folder@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-gif@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-gif@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-gif@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-gif@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-gif@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-gif@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-gif@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-gif@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-html@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-html@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-html@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-html@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-html@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-html@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-html@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-html@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-jpg@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-jpg@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-jpg@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-jpg@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-jpg@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-jpg@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-jpg@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-jpg@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-js@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-js@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-js@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-js@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-js@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-js@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-js@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-js@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-line-select@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-line-select@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-line-select@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-line-select@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-line-select@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-line-select@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-line-select@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-line-select@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-line@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-line@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-line@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-line@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-line@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-line@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-line@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-line@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-log@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-log@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-log@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-log@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-log@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-log@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-log@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-log@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-mov@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-mov@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-mov@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-mov@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-mov@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-mov@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-mov@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-mov@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-mp3@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-mp3@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-mp3@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-mp3@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-mp3@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-mp3@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-mp3@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-mp3@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-network@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-network@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-network@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-network@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-network@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-network@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-network@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-network@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-pdf@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-pdf@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-pdf@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-pdf@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-pdf@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-pdf@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-pdf@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-pdf@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-pen-select@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-pen-select@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-pen-select@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-pen-select@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-pen-select@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-pen-select@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-pen-select@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-pen-select@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-pen@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-pen@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-pen@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-pen@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-pen@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-pen@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-pen@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-pen@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-png@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-png@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-png@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-png@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-png@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-png@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-png@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-png@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-rect-select@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-rect-select@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-rect-select@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-rect-select@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-rect-select@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-rect-select@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-rect-select@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-rect-select@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-rect@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-rect@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-rect@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-rect@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-rect@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-rect@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-rect@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-rect@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-round-select@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-round-select@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-round-select@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-round-select@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-round-select@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-round-select@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-round-select@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-round-select@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-round@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-round@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-round@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-round@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-round@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-round@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-round@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-round@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-sandbox@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-sandbox@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-sandbox@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-sandbox@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-sandbox@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-sandbox@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-sandbox@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-sandbox@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-arrow@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-arrow@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-arrow@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-arrow@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-big-select@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-big-select@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-big-select@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-big-select@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-big-select@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-big-select@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-big-select@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-big-select@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-big@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-big@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-big@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-big@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-big@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-big@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-big@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-big@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-blue@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-blue@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-blue@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-blue@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-blue@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-blue@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-blue@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-blue@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-gray@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-gray@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-gray@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-gray@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-gray@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-gray@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-gray@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-gray@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-green@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-green@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-green@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-green@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-green@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-green@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-green@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-green@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-medium-select@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-medium-select@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-medium-select@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-medium-select@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-medium-select@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-medium-select@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-medium-select@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-medium-select@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-medium@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-medium@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-medium@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-medium@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-medium@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-medium@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-medium@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-medium@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-red@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-red@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-red@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-red@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-red@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-red@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-red@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-red@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-small-select@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-small-select@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-small-select@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-small-select@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-small-select@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-small-select@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-small-select@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-small-select@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-small@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-small@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-small@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-small@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-small@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-small@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-small@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-small@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-triangle@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-triangle@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-triangle@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-triangle@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-triangle@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-triangle@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-triangle@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-triangle@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-white@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-white@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-white@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-white@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-white@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-white@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-white@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-white@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-yellow@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-yellow@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-yellow@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-yellow@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-yellow@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-yellow@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-selector-yellow@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-selector-yellow@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-sql@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-sql@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-sql@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-sql@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-sql@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-sql@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-sql@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-sql@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-sure@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-sure@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-sure@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-sure@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-sure@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-sure@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-sure@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-sure@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-text-select@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-text-select@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-text-select@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-text-select@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-text-select@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-text-select@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-text-select@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-text-select@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-text@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-text@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-text@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-text@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-text@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-text@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-text@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-text@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-undo-disable@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-undo-disable@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-undo-disable@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-undo-disable@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-undo-disable@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-undo-disable@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-undo-disable@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-undo-disable@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-undo@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-undo@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-undo@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-undo@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-undo@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-undo@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-undo@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-undo@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-unknown@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-unknown@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-unknown@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-unknown@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-unknown@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-unknown@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-unknown@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-unknown@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-wav@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-wav@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-wav@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-wav@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-wav@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-wav@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-wav@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-wav@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-xls@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-xls@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-xls@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-xls@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-xls@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-xls@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-xls@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-xls@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-zip@2x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-zip@2x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-zip@2x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-zip@2x.png diff --git a/LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-zip@3x.png b/LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-zip@3x.png similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLDebugTool.bundle/LL-zip@3x.png rename to LLDebugTool/Components/General/UserInterface/Resources/LLDebugTool.bundle/LL-zip@3x.png diff --git a/LLDebugTool/UserInterface/Resources/LLImageNameConfig.h b/LLDebugTool/Components/General/UserInterface/Resources/LLImageNameConfig.h similarity index 100% rename from LLDebugTool/UserInterface/Resources/LLImageNameConfig.h rename to LLDebugTool/Components/General/UserInterface/Resources/LLImageNameConfig.h diff --git a/LLDebugTool/UserInterface/Sections/Log/LLLogCell.h b/LLDebugTool/Components/Log/Function/LLLogCell.h similarity index 100% rename from LLDebugTool/UserInterface/Sections/Log/LLLogCell.h rename to LLDebugTool/Components/Log/Function/LLLogCell.h diff --git a/LLDebugTool/UserInterface/Sections/Log/LLLogCell.m b/LLDebugTool/Components/Log/Function/LLLogCell.m similarity index 100% rename from LLDebugTool/UserInterface/Sections/Log/LLLogCell.m rename to LLDebugTool/Components/Log/Function/LLLogCell.m diff --git a/LLDebugTool/UserInterface/Sections/Log/LLLogCell.xib b/LLDebugTool/Components/Log/Function/LLLogCell.xib similarity index 100% rename from LLDebugTool/UserInterface/Sections/Log/LLLogCell.xib rename to LLDebugTool/Components/Log/Function/LLLogCell.xib diff --git a/LLDebugTool/UserInterface/Sections/Log/LLLogContentVC.h b/LLDebugTool/Components/Log/Function/LLLogContentVC.h similarity index 100% rename from LLDebugTool/UserInterface/Sections/Log/LLLogContentVC.h rename to LLDebugTool/Components/Log/Function/LLLogContentVC.h diff --git a/LLDebugTool/UserInterface/Sections/Log/LLLogContentVC.m b/LLDebugTool/Components/Log/Function/LLLogContentVC.m similarity index 100% rename from LLDebugTool/UserInterface/Sections/Log/LLLogContentVC.m rename to LLDebugTool/Components/Log/Function/LLLogContentVC.m diff --git a/LLDebugTool/UserInterface/Sections/Log/LLLogVC.h b/LLDebugTool/Components/Log/Function/LLLogVC.h similarity index 100% rename from LLDebugTool/UserInterface/Sections/Log/LLLogVC.h rename to LLDebugTool/Components/Log/Function/LLLogVC.h diff --git a/LLDebugTool/UserInterface/Sections/Log/LLLogVC.m b/LLDebugTool/Components/Log/Function/LLLogVC.m similarity index 100% rename from LLDebugTool/UserInterface/Sections/Log/LLLogVC.m rename to LLDebugTool/Components/Log/Function/LLLogVC.m diff --git a/LLDebugTool/UserInterface/Others/FilterView/LLLogFilterView.h b/LLDebugTool/Components/Log/UserInterface/LLLogFilterView.h similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/LLLogFilterView.h rename to LLDebugTool/Components/Log/UserInterface/LLLogFilterView.h diff --git a/LLDebugTool/UserInterface/Others/FilterView/LLLogFilterView.m b/LLDebugTool/Components/Log/UserInterface/LLLogFilterView.m similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/LLLogFilterView.m rename to LLDebugTool/Components/Log/UserInterface/LLLogFilterView.m diff --git a/LLDebugTool/Helper/LogHelper/LLLogHelper.h b/LLDebugTool/Components/Log/UserInterface/LLLogHelper.h similarity index 100% rename from LLDebugTool/Helper/LogHelper/LLLogHelper.h rename to LLDebugTool/Components/Log/UserInterface/LLLogHelper.h diff --git a/LLDebugTool/Helper/LogHelper/LLLogHelper.m b/LLDebugTool/Components/Log/UserInterface/LLLogHelper.m similarity index 100% rename from LLDebugTool/Helper/LogHelper/LLLogHelper.m rename to LLDebugTool/Components/Log/UserInterface/LLLogHelper.m diff --git a/LLDebugTool/Helper/LogHelper/LLLogHelperEventDefine.h b/LLDebugTool/Components/Log/UserInterface/LLLogHelperEventDefine.h similarity index 100% rename from LLDebugTool/Helper/LogHelper/LLLogHelperEventDefine.h rename to LLDebugTool/Components/Log/UserInterface/LLLogHelperEventDefine.h diff --git a/LLDebugTool/Helper/LogHelper/LLLogModel.h b/LLDebugTool/Components/Log/UserInterface/LLLogModel.h similarity index 100% rename from LLDebugTool/Helper/LogHelper/LLLogModel.h rename to LLDebugTool/Components/Log/UserInterface/LLLogModel.h diff --git a/LLDebugTool/Helper/LogHelper/LLLogModel.m b/LLDebugTool/Components/Log/UserInterface/LLLogModel.m similarity index 100% rename from LLDebugTool/Helper/LogHelper/LLLogModel.m rename to LLDebugTool/Components/Log/UserInterface/LLLogModel.m diff --git a/LLDebugTool/Helper/NetworkHelper/LLNetworkHelper.h b/LLDebugTool/Components/Network/Function/LLNetworkHelper.h similarity index 100% rename from LLDebugTool/Helper/NetworkHelper/LLNetworkHelper.h rename to LLDebugTool/Components/Network/Function/LLNetworkHelper.h diff --git a/LLDebugTool/Helper/NetworkHelper/LLNetworkHelper.m b/LLDebugTool/Components/Network/Function/LLNetworkHelper.m similarity index 92% rename from LLDebugTool/Helper/NetworkHelper/LLNetworkHelper.m rename to LLDebugTool/Components/Network/Function/LLNetworkHelper.m index 32901ac7..92d934d6 100644 --- a/LLDebugTool/Helper/NetworkHelper/LLNetworkHelper.m +++ b/LLDebugTool/Components/Network/Function/LLNetworkHelper.m @@ -23,8 +23,7 @@ #import "LLNetworkHelper.h" #import "LLURLProtocol.h" -#import "LLDebugToolMacros.h" -#import "LLLogHelperEventDefine.h" +#import "LLRoute.h" static LLNetworkHelper *_instance = nil; @@ -52,7 +51,7 @@ - (void)setEnable:(BOOL)enable { #pragma mark - Primary - (void)registerLLURLProtocol { if (![NSURLProtocol registerClass:[LLURLProtocol class]]) { - LLog_Alert_Event(kLLLogHelperDebugToolEvent, @"LLNetworkHelper reigsiter URLProtocol fail."); + [LLRoute logWithMessage:@"LLNetworkHelper reigsiter URLProtocol fail." event:kLLDebugToolEvent]; } } diff --git a/LLDebugTool/Helper/NetworkHelper/LLNetworkModel.h b/LLDebugTool/Components/Network/Function/LLNetworkModel.h similarity index 100% rename from LLDebugTool/Helper/NetworkHelper/LLNetworkModel.h rename to LLDebugTool/Components/Network/Function/LLNetworkModel.h diff --git a/LLDebugTool/Helper/NetworkHelper/LLNetworkModel.m b/LLDebugTool/Components/Network/Function/LLNetworkModel.m similarity index 100% rename from LLDebugTool/Helper/NetworkHelper/LLNetworkModel.m rename to LLDebugTool/Components/Network/Function/LLNetworkModel.m diff --git a/LLDebugTool/Helper/NetworkHelper/LLURLProtocol.h b/LLDebugTool/Components/Network/Function/LLURLProtocol.h similarity index 100% rename from LLDebugTool/Helper/NetworkHelper/LLURLProtocol.h rename to LLDebugTool/Components/Network/Function/LLURLProtocol.h diff --git a/LLDebugTool/Helper/NetworkHelper/LLURLProtocol.m b/LLDebugTool/Components/Network/Function/LLURLProtocol.m similarity index 98% rename from LLDebugTool/Helper/NetworkHelper/LLURLProtocol.m rename to LLDebugTool/Components/Network/Function/LLURLProtocol.m index f862ce77..c87e5537 100644 --- a/LLDebugTool/Helper/NetworkHelper/LLURLProtocol.m +++ b/LLDebugTool/Components/Network/Function/LLURLProtocol.m @@ -26,7 +26,7 @@ #import "LLNetworkModel.h" #import "LLConfig.h" #import "LLTool.h" -#import "LLAppHelper.h" +#import "LLRoute.h" #import "NSHTTPURLResponse+LL_Utils.h" static NSString *const HTTPHandledIdentifier = @"HttpHandleIdentifier"; @@ -118,7 +118,7 @@ - (void)stopLoading { model.totalDuration = [NSString stringWithFormat:@"%fs",[[NSDate date] timeIntervalSinceDate:self.startDate]]; model.error = self.error; [[LLStorageManager sharedManager] saveModel:model complete:nil]; - [[LLAppHelper sharedHelper] updateRequestDataTraffic:model.requestDataTrafficValue responseDataTraffic:model.responseDataTrafficValue]; + [LLRoute updateRequestDataTraffic:model.requestDataTrafficValue responseDataTraffic:model.responseDataTrafficValue]; } #pragma mark - NSURLSessionDelegate diff --git a/LLDebugTool/UserInterface/Categories/NSHTTPURLResponse/NSHTTPURLResponse+LL_Utils.h b/LLDebugTool/Components/Network/Function/NSHTTPURLResponse+LL_Utils.h similarity index 100% rename from LLDebugTool/UserInterface/Categories/NSHTTPURLResponse/NSHTTPURLResponse+LL_Utils.h rename to LLDebugTool/Components/Network/Function/NSHTTPURLResponse+LL_Utils.h diff --git a/LLDebugTool/UserInterface/Categories/NSHTTPURLResponse/NSHTTPURLResponse+LL_Utils.m b/LLDebugTool/Components/Network/Function/NSHTTPURLResponse+LL_Utils.m similarity index 100% rename from LLDebugTool/UserInterface/Categories/NSHTTPURLResponse/NSHTTPURLResponse+LL_Utils.m rename to LLDebugTool/Components/Network/Function/NSHTTPURLResponse+LL_Utils.m diff --git a/LLDebugTool/Helper/NetworkHelper/NSURLSessionConfiguration+LL_Swizzling.h b/LLDebugTool/Components/Network/Function/NSURLSessionConfiguration+LL_Swizzling.h similarity index 100% rename from LLDebugTool/Helper/NetworkHelper/NSURLSessionConfiguration+LL_Swizzling.h rename to LLDebugTool/Components/Network/Function/NSURLSessionConfiguration+LL_Swizzling.h diff --git a/LLDebugTool/Helper/NetworkHelper/NSURLSessionConfiguration+LL_Swizzling.m b/LLDebugTool/Components/Network/Function/NSURLSessionConfiguration+LL_Swizzling.m similarity index 100% rename from LLDebugTool/Helper/NetworkHelper/NSURLSessionConfiguration+LL_Swizzling.m rename to LLDebugTool/Components/Network/Function/NSURLSessionConfiguration+LL_Swizzling.m diff --git a/LLDebugTool/UserInterface/Sections/Network/LLNetworkCell.h b/LLDebugTool/Components/Network/UserInterface/LLNetworkCell.h similarity index 100% rename from LLDebugTool/UserInterface/Sections/Network/LLNetworkCell.h rename to LLDebugTool/Components/Network/UserInterface/LLNetworkCell.h diff --git a/LLDebugTool/UserInterface/Sections/Network/LLNetworkCell.m b/LLDebugTool/Components/Network/UserInterface/LLNetworkCell.m similarity index 100% rename from LLDebugTool/UserInterface/Sections/Network/LLNetworkCell.m rename to LLDebugTool/Components/Network/UserInterface/LLNetworkCell.m diff --git a/LLDebugTool/UserInterface/Sections/Network/LLNetworkCell.xib b/LLDebugTool/Components/Network/UserInterface/LLNetworkCell.xib similarity index 100% rename from LLDebugTool/UserInterface/Sections/Network/LLNetworkCell.xib rename to LLDebugTool/Components/Network/UserInterface/LLNetworkCell.xib diff --git a/LLDebugTool/UserInterface/Sections/Network/LLNetworkContentVC.h b/LLDebugTool/Components/Network/UserInterface/LLNetworkContentVC.h similarity index 100% rename from LLDebugTool/UserInterface/Sections/Network/LLNetworkContentVC.h rename to LLDebugTool/Components/Network/UserInterface/LLNetworkContentVC.h diff --git a/LLDebugTool/UserInterface/Sections/Network/LLNetworkContentVC.m b/LLDebugTool/Components/Network/UserInterface/LLNetworkContentVC.m similarity index 100% rename from LLDebugTool/UserInterface/Sections/Network/LLNetworkContentVC.m rename to LLDebugTool/Components/Network/UserInterface/LLNetworkContentVC.m diff --git a/LLDebugTool/UserInterface/Others/FilterView/LLNetworkFilterView.h b/LLDebugTool/Components/Network/UserInterface/LLNetworkFilterView.h similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/LLNetworkFilterView.h rename to LLDebugTool/Components/Network/UserInterface/LLNetworkFilterView.h diff --git a/LLDebugTool/UserInterface/Others/FilterView/LLNetworkFilterView.m b/LLDebugTool/Components/Network/UserInterface/LLNetworkFilterView.m similarity index 100% rename from LLDebugTool/UserInterface/Others/FilterView/LLNetworkFilterView.m rename to LLDebugTool/Components/Network/UserInterface/LLNetworkFilterView.m diff --git a/LLDebugTool/UserInterface/Sections/Network/LLNetworkImageCell.h b/LLDebugTool/Components/Network/UserInterface/LLNetworkImageCell.h similarity index 100% rename from LLDebugTool/UserInterface/Sections/Network/LLNetworkImageCell.h rename to LLDebugTool/Components/Network/UserInterface/LLNetworkImageCell.h diff --git a/LLDebugTool/UserInterface/Sections/Network/LLNetworkImageCell.m b/LLDebugTool/Components/Network/UserInterface/LLNetworkImageCell.m similarity index 100% rename from LLDebugTool/UserInterface/Sections/Network/LLNetworkImageCell.m rename to LLDebugTool/Components/Network/UserInterface/LLNetworkImageCell.m diff --git a/LLDebugTool/UserInterface/Sections/Network/LLNetworkImageCell.xib b/LLDebugTool/Components/Network/UserInterface/LLNetworkImageCell.xib similarity index 100% rename from LLDebugTool/UserInterface/Sections/Network/LLNetworkImageCell.xib rename to LLDebugTool/Components/Network/UserInterface/LLNetworkImageCell.xib diff --git a/LLDebugTool/UserInterface/Sections/Network/LLNetworkVC.h b/LLDebugTool/Components/Network/UserInterface/LLNetworkVC.h similarity index 100% rename from LLDebugTool/UserInterface/Sections/Network/LLNetworkVC.h rename to LLDebugTool/Components/Network/UserInterface/LLNetworkVC.h diff --git a/LLDebugTool/UserInterface/Sections/Network/LLNetworkVC.m b/LLDebugTool/Components/Network/UserInterface/LLNetworkVC.m similarity index 100% rename from LLDebugTool/UserInterface/Sections/Network/LLNetworkVC.m rename to LLDebugTool/Components/Network/UserInterface/LLNetworkVC.m diff --git a/LLDebugTool/Helper/SandboxHelper/LLSandboxHelper.h b/LLDebugTool/Components/Sandbox/Function/LLSandboxHelper.h similarity index 100% rename from LLDebugTool/Helper/SandboxHelper/LLSandboxHelper.h rename to LLDebugTool/Components/Sandbox/Function/LLSandboxHelper.h diff --git a/LLDebugTool/Helper/SandboxHelper/LLSandboxHelper.m b/LLDebugTool/Components/Sandbox/Function/LLSandboxHelper.m similarity index 100% rename from LLDebugTool/Helper/SandboxHelper/LLSandboxHelper.m rename to LLDebugTool/Components/Sandbox/Function/LLSandboxHelper.m diff --git a/LLDebugTool/Helper/SandboxHelper/LLSandboxModel.h b/LLDebugTool/Components/Sandbox/Function/LLSandboxModel.h similarity index 100% rename from LLDebugTool/Helper/SandboxHelper/LLSandboxModel.h rename to LLDebugTool/Components/Sandbox/Function/LLSandboxModel.h diff --git a/LLDebugTool/Helper/SandboxHelper/LLSandboxModel.m b/LLDebugTool/Components/Sandbox/Function/LLSandboxModel.m similarity index 100% rename from LLDebugTool/Helper/SandboxHelper/LLSandboxModel.m rename to LLDebugTool/Components/Sandbox/Function/LLSandboxModel.m diff --git a/LLDebugTool/UserInterface/Sections/Sandbox/LLSandboxCell.h b/LLDebugTool/Components/Sandbox/UserInterface/LLSandboxCell.h similarity index 100% rename from LLDebugTool/UserInterface/Sections/Sandbox/LLSandboxCell.h rename to LLDebugTool/Components/Sandbox/UserInterface/LLSandboxCell.h diff --git a/LLDebugTool/UserInterface/Sections/Sandbox/LLSandboxCell.m b/LLDebugTool/Components/Sandbox/UserInterface/LLSandboxCell.m similarity index 100% rename from LLDebugTool/UserInterface/Sections/Sandbox/LLSandboxCell.m rename to LLDebugTool/Components/Sandbox/UserInterface/LLSandboxCell.m diff --git a/LLDebugTool/UserInterface/Sections/Sandbox/LLSandboxCell.xib b/LLDebugTool/Components/Sandbox/UserInterface/LLSandboxCell.xib similarity index 100% rename from LLDebugTool/UserInterface/Sections/Sandbox/LLSandboxCell.xib rename to LLDebugTool/Components/Sandbox/UserInterface/LLSandboxCell.xib diff --git a/LLDebugTool/UserInterface/Sections/Sandbox/LLSandboxVC.h b/LLDebugTool/Components/Sandbox/UserInterface/LLSandboxVC.h similarity index 100% rename from LLDebugTool/UserInterface/Sections/Sandbox/LLSandboxVC.h rename to LLDebugTool/Components/Sandbox/UserInterface/LLSandboxVC.h diff --git a/LLDebugTool/UserInterface/Sections/Sandbox/LLSandboxVC.m b/LLDebugTool/Components/Sandbox/UserInterface/LLSandboxVC.m similarity index 100% rename from LLDebugTool/UserInterface/Sections/Sandbox/LLSandboxVC.m rename to LLDebugTool/Components/Sandbox/UserInterface/LLSandboxVC.m diff --git a/LLDebugTool/UserInterface/Others/YWFilePreviewController.h b/LLDebugTool/Components/Sandbox/UserInterface/YWFilePreviewController.h similarity index 100% rename from LLDebugTool/UserInterface/Others/YWFilePreviewController.h rename to LLDebugTool/Components/Sandbox/UserInterface/YWFilePreviewController.h diff --git a/LLDebugTool/UserInterface/Others/YWFilePreviewController.m b/LLDebugTool/Components/Sandbox/UserInterface/YWFilePreviewController.m similarity index 100% rename from LLDebugTool/UserInterface/Others/YWFilePreviewController.m rename to LLDebugTool/Components/Sandbox/UserInterface/YWFilePreviewController.m diff --git a/LLDebugTool/Helper/ScreenShotHelper/LLScreenshotHelper.h b/LLDebugTool/Components/Screenshot/Function/LLScreenshotHelper.h similarity index 88% rename from LLDebugTool/Helper/ScreenShotHelper/LLScreenshotHelper.h rename to LLDebugTool/Components/Screenshot/Function/LLScreenshotHelper.h index ec7949bf..f3442ffc 100644 --- a/LLDebugTool/Helper/ScreenShotHelper/LLScreenshotHelper.h +++ b/LLDebugTool/Components/Screenshot/Function/LLScreenshotHelper.h @@ -48,4 +48,9 @@ */ - (UIImage *_Nullable)imageFromScreen; +/** + Save screenShots to sandbox. Operation in child thread and callback in main thread. + */ +- (void)saveScreenshot:(UIImage *)image name:(NSString *)name complete:(void (^ __nullable)(BOOL finished))complete; + @end diff --git a/LLDebugTool/Helper/ScreenShotHelper/LLScreenshotHelper.m b/LLDebugTool/Components/Screenshot/Function/LLScreenshotHelper.m similarity index 80% rename from LLDebugTool/Helper/ScreenShotHelper/LLScreenshotHelper.m rename to LLDebugTool/Components/Screenshot/Function/LLScreenshotHelper.m index 40b98c43..bdd2bb67 100644 --- a/LLDebugTool/Helper/ScreenShotHelper/LLScreenshotHelper.m +++ b/LLDebugTool/Components/Screenshot/Function/LLScreenshotHelper.m @@ -22,19 +22,25 @@ // SOFTWARE. #import "LLScreenshotHelper.h" -#import #import "LLScreenshotView.h" -#import "LLDebugTool.h" -#import "LLWindow.h" +#import "LLRoute.h" +#import "LLTool.h" static LLScreenshotHelper *_instance = nil; +@interface LLScreenshotHelper () + +@property (copy , nonatomic) NSString *screenshotFolderPath; + +@end + @implementation LLScreenshotHelper + (instancetype)sharedHelper { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ _instance = [[LLScreenshotHelper alloc] init]; + [_instance initial]; }); return _instance; } @@ -52,7 +58,7 @@ - (void)setEnable:(BOOL)enable { - (void)simulateTakeScreenshot { if (self.enable) { - [[LLDebugTool sharedTool].window hideWindow]; + [LLRoute hideWindow]; UIImage *image = [self imageFromScreen]; if (image) { LLScreenshotView *screenshot = [[LLScreenshotView alloc] initWithImage:image]; @@ -61,10 +67,32 @@ - (void)simulateTakeScreenshot { } } -- (nullable UIImage *)imageFromScreen { +- (UIImage *_Nullable)imageFromScreen { NSData *data = [self dataWithScreenshotInPNGFormat]; return [UIImage imageWithData:data]; } + +#pragma mark - Screenshot +- (void)saveScreenshot:(UIImage *)image name:(NSString *)name complete:(void (^ __nullable)(BOOL finished))complete { + if ([[NSThread currentThread] isMainThread]) { + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [self saveScreenshot:image name:name complete:complete]; + }); + return; + } + if (name.length == 0) { + name = [LLTool staticStringFromDate:[NSDate date]]; + } + name = [name stringByAppendingPathExtension:@"png"]; + NSString *path = [self.screenshotFolderPath stringByAppendingPathComponent:name]; + BOOL ret = [UIImagePNGRepresentation(image) writeToFile:path atomically:YES]; + + if (complete) { + dispatch_async(dispatch_get_main_queue(), ^{ + complete(ret); + }); + } +} #pragma mark - UIApplicationUserDidTakeScreenshotNotification - (void)receiveUserDidTakeScreenshotNotification:(NSNotification *)notification { @@ -72,6 +100,11 @@ - (void)receiveUserDidTakeScreenshotNotification:(NSNotification *)notification } #pragma mark - Primary +- (void)initial { + self.screenshotFolderPath = [[LLConfig sharedConfig].folderPath stringByAppendingPathComponent:@"Screenshot"]; + [LLTool createDirectoryAtPath:self.screenshotFolderPath]; +} + - (void)registerScreenshot { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveUserDidTakeScreenshotNotification:) name:UIApplicationUserDidTakeScreenshotNotification object:nil]; } diff --git a/LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotActionView.h b/LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotActionView.h similarity index 100% rename from LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotActionView.h rename to LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotActionView.h diff --git a/LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotActionView.m b/LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotActionView.m similarity index 100% rename from LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotActionView.m rename to LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotActionView.m diff --git a/LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotBaseOperation.h b/LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotBaseOperation.h similarity index 100% rename from LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotBaseOperation.h rename to LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotBaseOperation.h diff --git a/LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotBaseOperation.m b/LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotBaseOperation.m similarity index 97% rename from LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotBaseOperation.m rename to LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotBaseOperation.m index 1b1e791b..09b5a3e2 100644 --- a/LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotBaseOperation.m +++ b/LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotBaseOperation.m @@ -25,8 +25,7 @@ #import "LLImageNameConfig.h" #import "LLMacros.h" #import "LLTool.h" -#import "LLDebugToolMacros.h" -#import "LLLogHelperEventDefine.h" +#import "LLRoute.h" @interface LLScreenshotBaseOperation () @@ -79,7 +78,7 @@ - (instancetype _Nonnull)initWithSelector:(LLScreenshotSelectorModel *_Nonnull)s } - (void)drawImageView:(CGRect)rect { - LLog_Alert_Event(kLLLogHelperDebugToolEvent, [NSString stringWithFormat:@"%@ : Subclasses need to be rewritten.", NSStringFromClass(self.class)]); + [LLRoute logWithMessage:[NSString stringWithFormat:@"%@ : Subclasses need to be rewritten.", NSStringFromClass(self.class)] event:kLLDebugToolEvent]; } - (LLScreenshotSelectorAction)size { diff --git a/LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotDefine.h b/LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotDefine.h similarity index 100% rename from LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotDefine.h rename to LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotDefine.h diff --git a/LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotImageView.h b/LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotImageView.h similarity index 100% rename from LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotImageView.h rename to LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotImageView.h diff --git a/LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotImageView.m b/LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotImageView.m similarity index 100% rename from LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotImageView.m rename to LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotImageView.m diff --git a/LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotSelectorModel.h b/LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotSelectorModel.h similarity index 100% rename from LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotSelectorModel.h rename to LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotSelectorModel.h diff --git a/LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotSelectorModel.m b/LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotSelectorModel.m similarity index 100% rename from LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotSelectorModel.m rename to LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotSelectorModel.m diff --git a/LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotSelectorView.h b/LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotSelectorView.h similarity index 100% rename from LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotSelectorView.h rename to LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotSelectorView.h diff --git a/LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotSelectorView.m b/LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotSelectorView.m similarity index 100% rename from LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotSelectorView.m rename to LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotSelectorView.m diff --git a/LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotToolbar.h b/LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotToolbar.h similarity index 100% rename from LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotToolbar.h rename to LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotToolbar.h diff --git a/LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotToolbar.m b/LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotToolbar.m similarity index 100% rename from LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotToolbar.m rename to LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotToolbar.m diff --git a/LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotView.h b/LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotView.h similarity index 100% rename from LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotView.h rename to LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotView.h diff --git a/LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotView.m b/LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotView.m similarity index 96% rename from LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotView.m rename to LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotView.m index 3fef8ae6..21cc56db 100644 --- a/LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenshotView.m +++ b/LLDebugTool/Components/Screenshot/UserInterface/LLScreenshotView.m @@ -26,11 +26,10 @@ #import "LLScreenshotBaseOperation.h" #import "LLScreenshotImageView.h" #import "LLScreenshotToolbar.h" -#import "LLStorageManager.h" -#import "LLDebugTool.h" -#import "LLWindow.h" +#import "LLScreenshotHelper.h" #import "LLMacros.h" #import "LLTool.h" +#import "LLRoute.h" @interface LLScreenshotView () @@ -57,7 +56,7 @@ - (void)show { UIWindow *window = [UIApplication sharedApplication].delegate.window; self.frame = CGRectMake(0, LL_SCREEN_HEIGHT, LL_SCREEN_WIDTH, LL_SCREEN_HEIGHT); [window addSubview:self]; - [[LLDebugTool sharedTool].window hideWindow]; + [LLRoute hideWindow]; [UIView animateWithDuration:0.25 delay:0 usingSpringWithDamping:0.7 initialSpringVelocity:5.0 options:UIViewAnimationOptionCurveEaseInOut animations:^{ self.frame = CGRectMake(0, 0, LL_SCREEN_WIDTH, LL_SCREEN_HEIGHT); } completion:^(BOOL finished) { @@ -71,7 +70,7 @@ - (void)hide { self.frame = CGRectMake(0, LL_SCREEN_HEIGHT, LL_SCREEN_WIDTH, LL_SCREEN_HEIGHT); } completion:^(BOOL finished) { [self removeFromSuperview]; - [[LLDebugTool sharedTool].window showWindow]; + [LLRoute showWindow]; [[NSNotificationCenter defaultCenter] removeObserver:self]; }]; } @@ -104,7 +103,7 @@ - (void)doConfirmAction:(NSString *)name { self.toolBar.hidden = YES; UIImage *image = [self convertViewToImage:self.imageView]; if (image) { - [[LLStorageManager sharedManager] saveScreenshot:image name:name complete:nil]; + [[LLScreenshotHelper sharedHelper] saveScreenshot:image name:name complete:nil]; if ([PHPhotoLibrary authorizationStatus] == PHAuthorizationStatusAuthorized) { UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil); [LLTool toastMessage:@"Save image in sandbox and album."]; diff --git a/LLDebugTool/Helper/StorageManager/LLStorageManager.h b/LLDebugTool/Components/StorageManager/LLStorageManager.h similarity index 62% rename from LLDebugTool/Helper/StorageManager/LLStorageManager.h rename to LLDebugTool/Components/StorageManager/LLStorageManager.h index dfe1c1d3..26ec73df 100644 --- a/LLDebugTool/Helper/StorageManager/LLStorageManager.h +++ b/LLDebugTool/Components/StorageManager/LLStorageManager.h @@ -23,9 +23,7 @@ #import #import -#import "LLLogModel.h" -#import "LLNetworkModel.h" -#import "LLCrashModel.h" +#import "LLStorageModel.h" typedef void(^LLStorageManagerBoolBlock)(BOOL result); typedef void(^LLStorageManagerArrayBlock)(NSArray * _Nullable result); @@ -95,13 +93,6 @@ typedef void(^LLStorageManagerArrayBlock)(NSArray * _Nullable */ - (void)removeModels:(NSArray *_Nullable)models complete:(LLStorageManagerBoolBlock _Nullable)complete synchronous:(BOOL)synchronous; -#pragma mark - Screen Shot - -/** - Save screenShots to sandbox. Operation in child thread and callback in main thread. - */ -- (void)saveScreenshot:(UIImage *_Nonnull)image name:(NSString *_Nullable)name complete:(LLStorageManagerBoolBlock _Nullable)complete; - #pragma mark - Table /** @@ -116,71 +107,11 @@ typedef void(^LLStorageManagerArrayBlock)(NSArray * _Nullable - (void)clearDatabaseWithComplete:(LLStorageManagerBoolBlock _Nullable)complete; - (void)clearDatabaseWithComplete:(LLStorageManagerBoolBlock _Nullable)complete synchronous:(BOOL)synchronous; -#pragma mark - -- (void)updateDatabaseWithVersion:(NSString *_Nonnull)version complete:(LLStorageManagerBoolBlock _Nullable)complete; - -#pragma mark - DEPRECATED -/** - Save a crash model to database. - */ -- (BOOL)saveCrashModel:(LLCrashModel *_Nonnull)model DEPRECATED_MSG_ATTRIBUTE("Use saveModel:complete: to replace"); - -/** - Get all crash models in database(this time). If nothing, it will return an emtpy array. - */ -- (NSArray *_Nonnull)getAllCrashModel DEPRECATED_MSG_ATTRIBUTE("Use getModels:complete: to replace."); - -/** - According to the models to remove the crash models where happened in dataBase. - If any one fails, it returns to NO, and any failure will not affect others. - */ -- (BOOL)removeCrashModels:(NSArray *_Nonnull)models DEPRECATED_MSG_ATTRIBUTE("Use removeModels:complete: to replace"); - -/** - Save a network model to database. - */ -- (BOOL)saveNetworkModel:(LLNetworkModel *_Nonnull)model DEPRECATED_MSG_ATTRIBUTE("Use saveModel:complete: to replace"); - -/** - Get all network models in database(this time). If nothing, it will return an emtpy array. - */ -- (NSArray *_Nonnull)getAllNetworkModels DEPRECATED_MSG_ATTRIBUTE("Use getModels:complete: to replace."); +#pragma mark - Database update. /** - Get the network models in database via launchDate. If nothing, it will return an emtpy array. + Update database while table is changed. */ -- (NSArray *_Nonnull)getAllNetworkModelsWithLaunchDate:(NSString *_Nullable)launchDate DEPRECATED_MSG_ATTRIBUTE("Use getModels:launchDate:complete: to replace."); - -/** - According to the models to remove the network models where happened in dataBase. - If any one fails, it returns to NO, and any failure will not affect others. - */ -- (BOOL)removeNetworkModels:(NSArray *_Nonnull)models DEPRECATED_MSG_ATTRIBUTE("Use removeModels:complete: to replace"); - -/** - Save a log model to database. - */ -- (BOOL)saveLogModel:(LLLogModel *_Nonnull)model DEPRECATED_MSG_ATTRIBUTE("Use saveModel:complete: to replace"); - -/** - Get all log models in database(this time). If nothing, it will return an emtpy array. - */ -- (NSArray *_Nonnull)getAllLogModels DEPRECATED_MSG_ATTRIBUTE("Use getModels:complete: to replace."); - -/** - Get the log models in database via launchDate. If nothing, it will return an emtpy array. - */ -- (NSArray *_Nonnull)getAllLogModelsWithLaunchDate:(NSString *_Nullable)launchDate DEPRECATED_MSG_ATTRIBUTE("Use getModels:launchDate:complete: to replace."); - -/** - According to the models to remove the log models where happened in dataBase. - If any one fails, it returns to NO, and any failure will not affect others. - */ -- (BOOL)removeLogModels:(NSArray *_Nonnull)models DEPRECATED_MSG_ATTRIBUTE("Use removeModels:complete: to replace"); - -/** - Save screenShots to sandbox. - */ -- (BOOL)saveScreenshot:(UIImage *_Nonnull)image name:(NSString *_Nullable)name DEPRECATED_MSG_ATTRIBUTE("Use saveScreenshot:name:complete: to replace"); +- (void)updateDatabaseWithVersion:(NSString *_Nonnull)version complete:(LLStorageManagerBoolBlock _Nullable)complete; @end diff --git a/LLDebugTool/Helper/StorageManager/LLStorageManager.m b/LLDebugTool/Components/StorageManager/LLStorageManager.m similarity index 81% rename from LLDebugTool/Helper/StorageManager/LLStorageManager.m rename to LLDebugTool/Components/StorageManager/LLStorageManager.m index 7799f215..14fdd7b0 100644 --- a/LLDebugTool/Helper/StorageManager/LLStorageManager.m +++ b/LLDebugTool/Components/StorageManager/LLStorageManager.m @@ -25,8 +25,8 @@ #import #import "NSObject+LL_Utils.h" #import "LLTool.h" -#import "LLDebugToolMacros.h" -#import "LLLogHelperEventDefine.h" +#import "LLConfig.h" +#import "LLRoute.h" static LLStorageManager *_instance = nil; @@ -48,8 +48,6 @@ @interface LLStorageManager () @property (copy , nonatomic) NSString *folderPath; -@property (copy , nonatomic) NSString *screenshotFolderPath; - @end @implementation LLStorageManager @@ -213,23 +211,6 @@ - (void)removeModels:(NSArray *)models complete:(LLStorageMana [self performBoolComplete:complete param:@(ret) synchronous:synchronous]; } -#pragma mark - Screenshot -- (void)saveScreenshot:(UIImage *)image name:(NSString *)name complete:(LLStorageManagerBoolBlock)complete { - if ([[NSThread currentThread] isMainThread]) { - dispatch_async(_queue, ^{ - [self saveScreenshot:image name:name complete:complete]; - }); - return; - } - if (name.length == 0) { - name = [LLTool staticStringFromDate:[NSDate date]]; - } - name = [name stringByAppendingPathExtension:@"png"]; - NSString *path = [self.screenshotFolderPath stringByAppendingPathComponent:name]; - BOOL ret = [UIImagePNGRepresentation(image) writeToFile:path atomically:YES]; - [self performBoolComplete:complete param:@(ret) synchronous:NO]; -} - #pragma mark - Table - (void)clearTable:(Class)cls complete:(LLStorageManagerBoolBlock)complete { [self clearTable:cls complete:complete synchronous:NO]; @@ -360,16 +341,26 @@ - (BOOL)initDatabase { self.folderPath = [LLConfig sharedConfig].folderPath; [LLTool createDirectoryAtPath:self.folderPath]; - self.screenshotFolderPath = [self.folderPath stringByAppendingPathComponent:@"Screenshot"]; - [LLTool createDirectoryAtPath:self.screenshotFolderPath]; - NSString *filePath = [self.folderPath stringByAppendingPathComponent:@"LLDebugTool.db"]; _dbQueue = [FMDatabaseQueue databaseQueueWithPath:filePath]; - BOOL ret1 = [self registerClass:[LLCrashModel class]]; - BOOL ret2 = [self registerClass:[LLNetworkModel class]]; - BOOL ret3 = [self registerClass:[LLLogModel class]]; + BOOL ret1 = YES; + BOOL ret2 = YES; + BOOL ret3 = YES; + +#if LL_HAS_INCLUDE_CRASH_MODEL + ret1 = [self registerClass:[LLCrashModel class]]; +#endif + +#if LL_HAS_INCLUDE_NETWORK_MODEL + ret2 = [self registerClass:[LLNetworkModel class]]; +#endif + +#if LL_HAS_INCLUDE_LLLOGMODEL + ret3 = [self registerClass:[LLLogModel class]]; +#endif + return ret1 && ret2 && ret3; } @@ -385,13 +376,13 @@ - (void)reloadLogModelTable { return; } - +#if LL_HAS_INCLUDE_CRASH_MODEL __block NSArray *crashModels = @[]; - [self getModels:[LLLogModel class] launchDate:nil storageIdentity:nil complete:^(NSArray *result) { + [self getModels:[LLCrashModel class] launchDate:nil storageIdentity:nil complete:^(NSArray *result) { crashModels = result; } synchronous:YES]; - + NSMutableArray *launchDates = [[NSMutableArray alloc] initWithObjects:[NSObject launchDate], nil]; for (LLCrashModel *model in crashModels) { if (model.launchDate.length) { @@ -399,27 +390,32 @@ - (void)reloadLogModelTable { } } [self removeLogModelAndNetworkModelNotIn:launchDates]; - +#endif } - (BOOL)removeLogModelAndNetworkModelNotIn:(NSArray *)launchDates { - __block BOOL ret = NO; - __block BOOL ret2 = NO; + __block BOOL ret = YES; + __block BOOL ret2 = YES; [_dbQueue inDatabase:^(FMDatabase * _Nonnull db) { - NSError *error; +#if LL_HAS_INCLUDE_NETWORK_MODEL + NSError *error1; NSString *logTableName = [self tableNameFromClass:[LLLogModel class]]; NSString *launchDateString = [self convertArrayToSQL:launchDates]; - ret = [db executeUpdate:[NSString stringWithFormat:@"DELETE FROM %@ WHERE %@ NOT IN %@;",logTableName,kLaunchDateColumn,launchDateString] values:nil error:&error]; + ret = [db executeUpdate:[NSString stringWithFormat:@"DELETE FROM %@ WHERE %@ NOT IN %@;",logTableName,kLaunchDateColumn,launchDateString] values:nil error:&error1]; if (!ret) { - [self log:[NSString stringWithFormat:@"Remove launch log fail, error = %@",error]]; + [self log:[NSString stringWithFormat:@"Remove launch log fail, error = %@",error1]]; } - +#endif +#if LL_HAS_INCLUDE_LOG_MODEL + NSError *error2; NSString *networkTableName = [self tableNameFromClass:[LLNetworkModel class]]; - ret2 = [db executeUpdate:[NSString stringWithFormat:@"DELETE FROM %@ WHERE %@ NOT IN %@;",networkTableName,kLaunchDateColumn,launchDateString] values:nil error:&error]; + ret2 = [db executeUpdate:[NSString stringWithFormat:@"DELETE FROM %@ WHERE %@ NOT IN %@;",networkTableName,kLaunchDateColumn,launchDateString] values:nil error:&error2]; if (!ret2) { - [self log:[NSString stringWithFormat:@"Remove launch network fail, error = %@",error]]; + [self log:[NSString stringWithFormat:@"Remove launch network fail, error = %@",error2]]; } +#endif }]; + return ret && ret2; } @@ -472,7 +468,7 @@ - (void)performArrayComplete:(LLStorageManagerArrayBlock)complete param:(NSArray - (void)log:(NSString *)message { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - LLog_Alert_Event(kLLLogHelperDebugToolEvent, message); + [LLRoute logWithMessage:message event:kLLDebugToolEvent]; }); } @@ -531,98 +527,4 @@ - (void)saveOrUpdateModel:(LLStorageModel *_Nonnull)model complete:(LLStorageMan [self performBoolComplete:complete param:@(ret) synchronous:synchronous]; } -#pragma mark - DEPRECATED -- (BOOL)saveCrashModel:(LLCrashModel *)model { - __block BOOL ret = YES; - [self saveModel:model complete:^(BOOL result) { - ret = result; - } synchronous:YES]; - return ret; -} - -- (NSArray *)getAllCrashModel { - __block NSArray *datas = @[]; - [self getModels:[LLCrashModel class] launchDate:nil storageIdentity:nil complete:^(NSArray *result) { - datas = result; - } synchronous:YES]; - return datas; -} - -- (BOOL)removeCrashModels:(NSArray *)models { - __block BOOL ret = YES; - [self removeModels:models complete:^(BOOL result) { - ret = result; - } synchronous:YES]; - return ret; -} - -- (BOOL)saveNetworkModel:(LLNetworkModel *)model { - __block BOOL ret = YES; - [self saveModel:model complete:^(BOOL result) { - ret = result; - } synchronous:YES]; - return ret; -} - -- (NSArray *)getAllNetworkModels { - __block NSArray *datas = @[]; - [self getModels:[LLNetworkModel class] launchDate:[NSObject launchDate] storageIdentity:nil complete:^(NSArray *result) { - datas = result; - } synchronous:YES]; - return datas; -} - -- (NSArray *)getAllNetworkModelsWithLaunchDate:(NSString *)launchDate { - __block NSArray *datas = @[]; - [self getModels:[LLNetworkModel class] launchDate:launchDate storageIdentity:nil complete:^(NSArray *result) { - datas = result; - } synchronous:YES]; - return datas; -} - -- (BOOL)removeNetworkModels:(NSArray *)models { - __block BOOL ret = YES; - [self removeModels:models complete:^(BOOL result) { - ret = result; - } synchronous:YES]; - return ret; -} - -- (BOOL)saveLogModel:(LLLogModel *)model { - __block BOOL ret = YES; - [self saveModel:model complete:^(BOOL result) { - ret = result; - } synchronous:YES]; - return ret; -} - -- (NSArray *)getAllLogModels { - __block NSArray *datas = @[]; - [self getModels:[LLLogModel class] launchDate:[NSObject launchDate] storageIdentity:nil complete:^(NSArray *result) { - datas = result; - } synchronous:YES]; - return datas; -} - -- (NSArray *)getAllLogModelsWithLaunchDate:(NSString *)launchDate { - __block NSArray *datas = @[]; - [self getModels:[LLLogModel class] launchDate:launchDate storageIdentity:nil complete:^(NSArray *result) { - datas = result; - } synchronous:YES]; - return datas; -} - -- (BOOL)removeLogModels:(NSArray *)models { - __block BOOL ret = YES; - [self removeModels:models complete:^(BOOL result) { - ret = result; - } synchronous:YES]; - return ret; -} - -- (BOOL)saveScreenshot:(UIImage *)image name:(NSString *)name { - [self saveScreenshot:image name:name complete:nil]; - return YES; -} - @end diff --git a/LLDebugTool/Helper/StorageManager/LLStorageModel.h b/LLDebugTool/Components/StorageManager/LLStorageModel.h similarity index 100% rename from LLDebugTool/Helper/StorageManager/LLStorageModel.h rename to LLDebugTool/Components/StorageManager/LLStorageModel.h diff --git a/LLDebugTool/Helper/StorageManager/LLStorageModel.m b/LLDebugTool/Components/StorageManager/LLStorageModel.m similarity index 100% rename from LLDebugTool/Helper/StorageManager/LLStorageModel.m rename to LLDebugTool/Components/StorageManager/LLStorageModel.m diff --git a/LLDebugTool/Config/LLConfig.h b/LLDebugTool/Config/LLConfig.h index adb22403..6e2e328c 100644 --- a/LLDebugTool/Config/LLConfig.h +++ b/LLDebugTool/Config/LLConfig.h @@ -63,7 +63,7 @@ typedef NS_ENUM(NSUInteger, LLConfigLogLevel) { /** Window style. Decide how the Window displays. - + - LLConfigWindowSuspensionBall: Show as a suspension ball. Moveable and clickable. - LLConfigWindowPowerBar: Show at power bar. Unmoveable but clickable. - LLConfigWindowNetBar: Show at network bar. Unmoveable but clickable. @@ -76,7 +76,7 @@ typedef NS_ENUM(NSUInteger, LLConfigWindowStyle) { /** Log style for [LLDebugTool logInFile...]. Customize the log you want. - + - LLConfigLogDetail: Show all detail info. Contain event, file, line, func, date and desc. - LLConfigLogFileFuncDesc : Show with event, file, func and desc. - LLConfigLogFileDesc : Show with event, file and desc. @@ -93,7 +93,7 @@ typedef NS_ENUM(NSUInteger, LLConfigLogStyle) { /** Customize available Features. - + - LLConfigAvailableNetwork: Network functions available. - LLConfigAvailableLog: Log functions avalable. - LLConfigAvailableCrash: Crash functions available. @@ -120,8 +120,8 @@ typedef NS_OPTIONS(NSUInteger, LLConfigAvailableFeature) { LLConfigAvailableNoneScreenshot = 0xFF - (1 << 5), }; -UIKIT_EXTERN NSNotificationName _Nonnull const LLConfigDidUpdateColorStyleNotificationName; -UIKIT_EXTERN NSNotificationName _Nonnull const LLConfigDidUpdateWindowStyleNotificationName; +FOUNDATION_EXPORT NSNotificationName _Nonnull const LLConfigDidUpdateColorStyleNotificationName; +FOUNDATION_EXPORT NSNotificationName _Nonnull const LLConfigDidUpdateWindowStyleNotificationName; /** Config file. Must config properties before [LLDebugTool enable]. diff --git a/LLDebugTool/Config/LLConfig.m b/LLDebugTool/Config/LLConfig.m index f05b3815..76dd6258 100644 --- a/LLDebugTool/Config/LLConfig.m +++ b/LLDebugTool/Config/LLConfig.m @@ -22,14 +22,7 @@ // SOFTWARE. #import "LLConfig.h" -#import "LLLogHelperEventDefine.h" -#import "LLDebugToolMacros.h" -#import "LLDebugTool.h" -#import "LLNetworkHelper.h" -#import "LLLogHelper.h" -#import "LLCrashHelper.h" -#import "LLAppHelper.h" -#import "LLScreenshotHelper.h" +#import "LLRoute.h" static LLConfig *_instance = nil; @@ -82,13 +75,7 @@ - (void)setAvailables:(LLConfigAvailableFeature)availables { _availables = availables; } // Start or close features. - if ([LLDebugTool sharedTool].isWorking) { - [[LLNetworkHelper sharedHelper] setEnable:networkEnable]; - [[LLLogHelper sharedHelper] setEnable:logEnable]; - [[LLCrashHelper sharedHelper] setEnable:crashEnable]; - [[LLAppHelper sharedHelper] setEnable:appInfoEnable]; - [[LLScreenshotHelper sharedHelper] setEnable:screenshotEnable]; - } + [LLRoute setNewAvailables:availables]; } } @@ -115,10 +102,10 @@ - (void)initial { NSString *imageBundlePath = [[NSBundle bundleForClass:self.class] pathForResource:@"LLDebugTool" ofType:@"bundle"]; _imageBundle = [NSBundle bundleWithPath:imageBundlePath]; if (!_XIBBundle) { - LLog_Warning_Event(kLLLogHelperFailedLoadingResourceEvent, [@"Failed to load the XIB bundle," stringByAppendingString:kLLLogHelperOpenIssueInGithub]); + [LLRoute logWithMessage:[@"Failed to load the XIB bundle," stringByAppendingString:kLLOpenIssueInGithubPrompt] event:kLLFailedLoadingResourceEvent]; } if (!_imageBundle) { - LLog_Warning_Event(kLLLogHelperFailedLoadingResourceEvent, [@"Failed to load the image bundle," stringByAppendingString:kLLLogHelperOpenIssueInGithub]); + [LLRoute logWithMessage:[@"Failed to load the XIB bundle," stringByAppendingString:kLLOpenIssueInGithubPrompt] event:kLLFailedLoadingResourceEvent]; } // Set date formatter string. diff --git a/LLDebugTool/LLDebug.h b/LLDebugTool/DebugTool/PublicHeader/LLDebug.h similarity index 100% rename from LLDebugTool/LLDebug.h rename to LLDebugTool/DebugTool/PublicHeader/LLDebug.h diff --git a/LLDebugTool/DebugTool/LLDebugTool.h b/LLDebugTool/DebugTool/PublicHeader/LLDebugTool.h similarity index 100% rename from LLDebugTool/DebugTool/LLDebugTool.h rename to LLDebugTool/DebugTool/PublicHeader/LLDebugTool.h diff --git a/LLDebugTool/DebugTool/LLDebugTool.m b/LLDebugTool/DebugTool/PublicHeader/LLDebugTool.m similarity index 100% rename from LLDebugTool/DebugTool/LLDebugTool.m rename to LLDebugTool/DebugTool/PublicHeader/LLDebugTool.m diff --git a/LLDebugTool/DebugTool/LLDebugToolMacros.h b/LLDebugTool/DebugTool/PublicHeader/LLDebugToolMacros.h similarity index 100% rename from LLDebugTool/DebugTool/LLDebugToolMacros.h rename to LLDebugTool/DebugTool/PublicHeader/LLDebugToolMacros.h diff --git a/LLDebugTool/UserInterface/Sections/Window/LLWindow.h b/LLDebugTool/DebugTool/UserInterface/LLWindow.h similarity index 100% rename from LLDebugTool/UserInterface/Sections/Window/LLWindow.h rename to LLDebugTool/DebugTool/UserInterface/LLWindow.h diff --git a/LLDebugTool/UserInterface/Sections/Window/LLWindow.m b/LLDebugTool/DebugTool/UserInterface/LLWindow.m similarity index 100% rename from LLDebugTool/UserInterface/Sections/Window/LLWindow.m rename to LLDebugTool/DebugTool/UserInterface/LLWindow.m diff --git a/LLDebugTool/UserInterface/Sections/Window/LLWindowViewController.h b/LLDebugTool/DebugTool/UserInterface/LLWindowViewController.h similarity index 100% rename from LLDebugTool/UserInterface/Sections/Window/LLWindowViewController.h rename to LLDebugTool/DebugTool/UserInterface/LLWindowViewController.h diff --git a/LLDebugTool/UserInterface/Sections/Window/LLWindowViewController.m b/LLDebugTool/DebugTool/UserInterface/LLWindowViewController.m similarity index 100% rename from LLDebugTool/UserInterface/Sections/Window/LLWindowViewController.m rename to LLDebugTool/DebugTool/UserInterface/LLWindowViewController.m diff --git a/LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenShotView.m b/LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenShotView.m deleted file mode 100644 index 3fef8ae6..00000000 --- a/LLDebugTool/UserInterface/Others/ScreenShotView/LLScreenShotView.m +++ /dev/null @@ -1,194 +0,0 @@ -// -// LLScreenshotView.m -// -// Copyright (c) 2018 LLDebugTool Software Foundation (https://github.com/HDB-Li/LLDebugTool) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -#import "LLScreenshotView.h" -#import -#import "LLScreenshotBaseOperation.h" -#import "LLScreenshotImageView.h" -#import "LLScreenshotToolbar.h" -#import "LLStorageManager.h" -#import "LLDebugTool.h" -#import "LLWindow.h" -#import "LLMacros.h" -#import "LLTool.h" - -@interface LLScreenshotView () - -@property (nonatomic , strong , nonnull) LLScreenshotImageView *imageView; - -@property (nonatomic , strong , nonnull) LLScreenshotToolbar *toolBar; - -@property (nonatomic , assign) CGRect originalImageFrame; - -@property (nonatomic , copy , nonnull) NSString *name; - -@end - -@implementation LLScreenshotView - -- (instancetype)initWithImage:(UIImage *)image { - if (self = [super initWithFrame:[UIScreen mainScreen].bounds]) { - [self initialWithImage:image]; - } - return self; -} - -- (void)show { - UIWindow *window = [UIApplication sharedApplication].delegate.window; - self.frame = CGRectMake(0, LL_SCREEN_HEIGHT, LL_SCREEN_WIDTH, LL_SCREEN_HEIGHT); - [window addSubview:self]; - [[LLDebugTool sharedTool].window hideWindow]; - [UIView animateWithDuration:0.25 delay:0 usingSpringWithDamping:0.7 initialSpringVelocity:5.0 options:UIViewAnimationOptionCurveEaseInOut animations:^{ - self.frame = CGRectMake(0, 0, LL_SCREEN_WIDTH, LL_SCREEN_HEIGHT); - } completion:^(BOOL finished) { - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShowNotification:) name:UIKeyboardWillShowNotification object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHideNotification:) name:UIKeyboardWillHideNotification object:nil]; - }]; -} - -- (void)hide { - [UIView animateWithDuration:0.25 delay:0 usingSpringWithDamping:0.7 initialSpringVelocity:5.0 options:UIViewAnimationOptionCurveEaseInOut animations:^{ - self.frame = CGRectMake(0, LL_SCREEN_HEIGHT, LL_SCREEN_WIDTH, LL_SCREEN_HEIGHT); - } completion:^(BOOL finished) { - [self removeFromSuperview]; - [[LLDebugTool sharedTool].window showWindow]; - [[NSNotificationCenter defaultCenter] removeObserver:self]; - }]; -} - -- (void)cancelAction { - [self hide]; -} - -- (void)confirmAction { - self.hidden = YES; - __weak __block typeof(self) weakSelf = self; - __block UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Note" message:@"Enter the image name" preferredStyle:UIAlertControllerStyleAlert]; - [alert addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) { - textField.text = weakSelf.name; - }]; - UIAlertAction *cancel = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { - weakSelf.hidden = NO; - }]; - UIAlertAction *confirm = [UIAlertAction actionWithTitle:@"Confirm" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { - weakSelf.hidden = NO; - [weakSelf doConfirmAction:alert.textFields.firstObject.text]; - }]; - [alert addAction:cancel]; - [alert addAction:confirm]; - - [[UIApplication sharedApplication].delegate.window.rootViewController presentViewController:alert animated:YES completion:nil]; -} - -- (void)doConfirmAction:(NSString *)name { - self.toolBar.hidden = YES; - UIImage *image = [self convertViewToImage:self.imageView]; - if (image) { - [[LLStorageManager sharedManager] saveScreenshot:image name:name complete:nil]; - if ([PHPhotoLibrary authorizationStatus] == PHAuthorizationStatusAuthorized) { - UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil); - [LLTool toastMessage:@"Save image in sandbox and album."]; - } else { - [LLTool toastMessage:@"Save image in sandbox."]; - } - [self hide]; - } else { - self.toolBar.hidden = NO; - [LLTool toastMessage:@"Save image failed."]; - } -} - -#pragma mark - NSNotification -- (void)keyboardWillShowNotification:(NSNotification *)notifi { - NSDictionary *userInfo = notifi.userInfo; - CGFloat duration = [userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue]; - CGRect endFrame = [userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue]; - if ([self.imageView.currentOperation isKindOfClass:[LLScreenshotTextOperation class]]) { - LLScreenshotTextOperation *operation = (LLScreenshotTextOperation *)self.imageView.currentOperation; - CGFloat y = operation.textView.frame.origin.y + self.originalImageFrame.origin.y; - CGFloat gap = y - endFrame.origin.y + 100; - if (gap > 0) { - [UIView animateWithDuration:duration animations:^{ - CGRect oriRect = self.imageView.frame; - self.imageView.frame = CGRectMake(oriRect.origin.x, self.originalImageFrame.origin.y - gap, oriRect.size.width, oriRect.size.height); - }]; - } - } -} - -- (void)keyboardWillHideNotification:(NSNotification *)notifi { - NSDictionary *userInfo = notifi.userInfo; - CGFloat duration = [userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue]; - if (!CGRectEqualToRect(self.imageView.frame, self.originalImageFrame)) { - [UIView animateWithDuration:duration animations:^{ - self.imageView.frame = self.originalImageFrame; - }]; - } -} - -#pragma mark - Primary -- (void)initialWithImage:(UIImage *)image { - self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5]; - self.name = [LLTool staticStringFromDate:[NSDate date]]; - - CGFloat rate = 0.1; - CGFloat toolBarHeight = 80; - CGFloat imgViewWidth = (1 - rate * 2) * LL_SCREEN_WIDTH; - CGFloat imgViewHeight = (1 - rate * 2) * LL_SCREEN_HEIGHT; - CGFloat imgViewTop = (rate * 2 * LL_SCREEN_HEIGHT - toolBarHeight) / 2.0; - // Init ImageView - self.imageView = [[LLScreenshotImageView alloc] initWithFrame:CGRectMake(rate * LL_SCREEN_WIDTH, imgViewTop, imgViewWidth, imgViewHeight)]; - self.originalImageFrame = self.imageView.frame; - self.imageView.image = image; - [self addSubview:self.imageView]; - - // Init Controls - self.toolBar = [[LLScreenshotToolbar alloc] initWithFrame:CGRectMake(self.imageView.frame.origin.x, self.imageView.frame.origin.y + self.imageView.frame.size.height + 10, self.imageView.frame.size.width, toolBarHeight)]; - self.toolBar.delegate = self; - [self addSubview:self.toolBar]; -} - -- (UIImage *)convertViewToImage:(UIView *)view{ - CGSize size = view.bounds.size; - UIGraphicsBeginImageContextWithOptions(size, YES, [UIScreen mainScreen].scale); - [view.layer renderInContext:UIGraphicsGetCurrentContext()]; - UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); - UIGraphicsEndImageContext(); - return image; -} - -#pragma mark - LLScreenshotToolbarDelegate -- (void)LLScreenshotToolbar:(LLScreenshotToolbar *)toolBar didSelectedAction:(LLScreenshotAction)action selectorModel:(LLScreenshotSelectorModel *)selectorModel { - if (action <= LLScreenshotActionText) { - self.imageView.currentAction = action; - self.imageView.currentSelectorModel = selectorModel; - } else if (action == LLScreenshotActionBack) { - [self.imageView removeLastOperation]; - } else if (action == LLScreenshotActionCancel) { - [self cancelAction]; - } else if (action == LLScreenshotActionConfirm) { - [self confirmAction]; - } -} - -@end diff --git a/LLDebugToolSwift/LLog.swift b/LLDebugToolSwift/LLog.swift index 40b18923..7d5a9c13 100644 --- a/LLDebugToolSwift/LLog.swift +++ b/LLDebugToolSwift/LLog.swift @@ -22,63 +22,65 @@ // SOFTWARE. import UIKit + +#if DEBUG import LLDebugTool +#endif public class LLog: NSObject { /// Log a normal message. public static func log(message : String? , file : String = #file , function : String = #function , lineNumber : Int = #line) { - #if DEBUG - LLDebugTool.shared().log(inFile: (file as NSString).lastPathComponent, function: function, lineNo: lineNumber, level: LLConfigLogLevel.default, onEvent: nil, message: message) - #endif + self.log(message: message, event: nil) } /// Log a normal message with event. public static func log(message : String? , event : String? , file : String = #file , function : String = #function , lineNumber : Int = #line) { #if DEBUG - LLDebugTool.shared().log(inFile: (file as NSString).lastPathComponent, function: function, lineNo: lineNumber, level: LLConfigLogLevel.default, onEvent: event, message: message) + self.privateLog(message: message, event: event, file: file, function: function, lineNumber: lineNumber, level: .default) #endif } /// Log a alert message. public static func alertLog(message : String? , file : String = #file , function : String = #function , lineNumber : Int = #line) { - #if DEBUG - LLDebugTool.shared().log(inFile: (file as NSString).lastPathComponent, function: function, lineNo: lineNumber, level: LLConfigLogLevel.alert, onEvent: nil, message: message) - #endif + self.alertLog(message: message, event: nil) } /// Log a alert message with event. public static func alertLog(message : String? , event : String? , file : String = #file , function : String = #function , lineNumber : Int = #line) { #if DEBUG - LLDebugTool.shared().log(inFile: (file as NSString).lastPathComponent, function: function, lineNo: lineNumber, level: LLConfigLogLevel.alert, onEvent: event, message: message) + self.privateLog(message: message, event: event, file: file, function: function, lineNumber: lineNumber, level: .alert) #endif } /// Log a warning message. public static func warningLog(message : String? , file : String = #file , function : String = #function , lineNumber : Int = #line) { - #if DEBUG - LLDebugTool.shared().log(inFile: (file as NSString).lastPathComponent, function: function, lineNo: lineNumber, level: LLConfigLogLevel.warning, onEvent: nil, message: message) - #endif + self.warningLog(message: message, event: nil) } /// Log a warning message with event. public static func warningLog(message : String? , event : String? , file : String = #file , function : String = #function , lineNumber : Int = #line) { #if DEBUG - LLDebugTool.shared().log(inFile: (file as NSString).lastPathComponent, function: function, lineNo: lineNumber, level: LLConfigLogLevel.warning, onEvent: event, message: message) + self.privateLog(message: message, event: event, file: file, function: function, lineNumber: lineNumber, level: .warning) #endif } /// Log a error message. public static func errorLog(message : String? , file : String = #file , function : String = #function , lineNumber : Int = #line) { - #if DEBUG - LLDebugTool.shared().log(inFile: (file as NSString).lastPathComponent, function: function, lineNo: lineNumber, level: LLConfigLogLevel.error, onEvent: nil, message: message) - #endif + self.errorLog(message: message, event: nil) } /// Log a error message with event. public static func errorLog(message : String? , event : String? , file : String = #file , function : String = #function , lineNumber : Int = #line) { #if DEBUG - LLDebugTool.shared().log(inFile: (file as NSString).lastPathComponent, function: function, lineNo: lineNumber, level: LLConfigLogLevel.error, onEvent: event, message: message) + self.privateLog(message: message, event: event, file: file, function: function, lineNumber: lineNumber, level: .error) + #endif + } + + /// Private log. + private static func privateLog(message : String? , event : String? , file : String , function : String , lineNumber : Int , level : LLConfigLogLevel) { + #if DEBUG + LLDebugTool.shared().log(inFile: (file as NSString).lastPathComponent, function: function, lineNo: lineNumber, level: level, onEvent: event, message: message) #endif }