Skip to content

Commit

Permalink
Components
Browse files Browse the repository at this point in the history
  • Loading branch information
HDB-Li committed Sep 21, 2018
1 parent 7af5091 commit 6cce426
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 7 deletions.
60 changes: 55 additions & 5 deletions LLDebugTool.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,64 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/HDB-Li/LLDebugTool.git", :tag => s.version }
s.requires_arc = true
s.public_header_files = "LLDebugTool/DebugTool/PublicHeader/*.h" , "LLDebugTool/Config/*.h"
s.source_files = "LLDebugTool/**/*.{h,m}"
s.resources = "LLDebugTool/**/*.{xib,storyboard,bundle}"
s.source_files = "LLDebugTool/**/*.{h,m}"
s.resources = "LLDebugTool/**/*.{xib,storyboard,bundle}"
s.dependency "FMDB"

s.subspec 'Network' do |ss|
ss.source_files = "LLDebugTool/Config/*.{h,m}" , "LLDebugTool/Components/{General,Network,StorageManager}/**/*.{h,m}"
ss.resources = "LLDebugTool/Components/{General,Network,StorageManager}/**/*.{xib,storyboard,bundle}"
ss.dependency "FMDB"
ss.source_files = "LLDebugTool/Components/Network/**/*.{h,m}"
ss.resources = "LLDebugTool/Components/Network/**/*.{xib,storyboard,bundle}"
ss.public_header_files = "LLDebugTool/Components/Network/**/*.h"
ss.dependency "LLDebugTool/StorageManager"
end

s.subspec 'Log' do |ss|
ss.source_files = "LLDebugTool/Components/Log/**/*.{h,m}"
ss.resources = "LLDebugTool/Components/Log/**/*.{xib,storyboard,bundle}"
ss.public_header_files = "LLDebugTool/Components/Log/**/*.h"
ss.dependency "LLDebugTool/StorageManager"
end

s.subspec 'Crash' do |ss|
ss.source_files = "LLDebugTool/Components/Crash/**/*.{h,m}"
ss.resources = "LLDebugTool/Components/Crash/**/*.{xib,storyboard,bundle}"
ss.public_header_files = "LLDebugTool/Components/Crash/**/*.h"
ss.dependency "LLDebugTool/StorageManager"
end

s.subspec 'AppInfo' do |ss|
ss.source_files = "LLDebugTool/Components/AppInfo/**/*.{h,m}"
# ss.resources = "LLDebugTool/Components/AppInfo/**/*.{xib,storyboard,bundle}"
ss.public_header_files = "LLDebugTool/Components/AppInfo/**/*.h"
ss.dependency "LLDebugTool/General"
end

s.subspec 'Sandbox' do |ss|
ss.source_files = "LLDebugTool/Components/Sandbox/**/*.{h,m}"
ss.resources = "LLDebugTool/Components/Sandbox/**/*.{xib,storyboard,bundle}"
ss.public_header_files = "LLDebugTool/Components/Sandbox/**/*.h"
ss.dependency "LLDebugTool/General"
end

s.subspec 'Screenshot' do |ss|
ss.source_files = "LLDebugTool/Components/Screenshot/**/*.{h,m}"
# ss.resources = "LLDebugTool/Components/Screenshot/**/*.{xib,storyboard,bundle}"
ss.public_header_files = "LLDebugTool/Components/Screenshot/**/*.h"
ss.dependency "LLDebugTool/General"
end

s.subspec 'StorageManager' do |ss|
ss.source_files = "LLDebugTool/Components/StorageManager/**/*.{h,m}"
# ss.resources = "LLDebugTool/Components/StorageManager/**/*.{xib,storyboard,bundle}"
ss.public_header_files = "LLDebugTool/Components/StorageManager/**/*.h"
ss.dependency "FMDB"
ss.dependency "LLDebugTool/General"
end

s.subspec 'General' do |ss|
ss.source_files = "LLDebugTool/Config/*.{h,m}" , "LLDebugTool/Components/General/**/*.{h,m}"
ss.resources = "LLDebugTool/Components/General/**/*.{xib,storyboard,bundle}"
ss.public_header_files = "LLDebugTool/Config/*.h" , "LLDebugTool/Components/General/**/*.h"
end

end
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@
#ifndef LLDebugToolMacros_h
#define LLDebugToolMacros_h

#if __has_include("LLDebugTool.h") || __has_include("<LLDebugTool.h>")

#if __has_include("LLDebugTool.h")
#import "LLDebugTool.h"
#else
#import "<LLDebugTool.h>"
#endif

#define LLog(fmt, ...) [LLSharedDebugTool logInFile:[[NSString stringWithUTF8String:__FILE__] lastPathComponent] function:NSStringFromSelector(_cmd) lineNo:__LINE__ level:LLConfigLogLevelDefault onEvent:nil message:(fmt, ##__VA_ARGS__)]
#define LLog_Event(event , fmt , ...) [LLSharedDebugTool logInFile:[[NSString stringWithUTF8String:__FILE__] lastPathComponent] function:NSStringFromSelector(_cmd) lineNo:__LINE__ level:LLConfigLogLevelDefault onEvent:event message:(fmt, ##__VA_ARGS__)]
Expand All @@ -35,6 +41,24 @@
#define LLog_Error(fmt, ...) [LLSharedDebugTool logInFile:[[NSString stringWithUTF8String:__FILE__] lastPathComponent] function:NSStringFromSelector(_cmd) lineNo:__LINE__ level:LLConfigLogLevelError onEvent:nil message:(fmt, ##__VA_ARGS__)]
#define LLog_Error_Event(event, fmt , ...) [LLSharedDebugTool logInFile:[[NSString stringWithUTF8String:__FILE__] lastPathComponent] function:NSStringFromSelector(_cmd) lineNo:__LINE__ level:LLConfigLogLevelError onEvent:event message:(fmt, ##__VA_ARGS__)]

#elif __has_include("LLLogHelper.h") || __has_include("<LLLogHelper.h>")

#if __has_include("LLLogHelper.h")
#import "LLLogHelper.h"
#else
#import "<LLLogHelper.h>"
#endif

#define LLog(fmt, ...) [[LLLogHelper sharedHelper] logInFile:[[NSString stringWithUTF8String:__FILE__] lastPathComponent] function:NSStringFromSelector(_cmd) lineNo:__LINE__ level:LLConfigLogLevelDefault onEvent:nil message:(fmt, ##__VA_ARGS__)]
#define LLog_Event(event , fmt , ...) [[LLLogHelper sharedHelper] logInFile:[[NSString stringWithUTF8String:__FILE__] lastPathComponent] function:NSStringFromSelector(_cmd) lineNo:__LINE__ level:LLConfigLogLevelDefault onEvent:event message:(fmt, ##__VA_ARGS__)]
#define LLog_Alert(fmt, ...) [[LLLogHelper sharedHelper] logInFile:[[NSString stringWithUTF8String:__FILE__] lastPathComponent] function:NSStringFromSelector(_cmd) lineNo:__LINE__ level:LLConfigLogLevelAlert onEvent:nil message:(fmt, ##__VA_ARGS__)]
#define LLog_Alert_Event(event, fmt , ...) [[LLLogHelper sharedHelper] logInFile:[[NSString stringWithUTF8String:__FILE__] lastPathComponent] function:NSStringFromSelector(_cmd) lineNo:__LINE__ level:LLConfigLogLevelAlert onEvent:event message:(fmt, ##__VA_ARGS__)]
#define LLog_Warning(fmt, ...) [[LLLogHelper sharedHelper] logInFile:[[NSString stringWithUTF8String:__FILE__] lastPathComponent] function:NSStringFromSelector(_cmd) lineNo:__LINE__ level:LLConfigLogLevelWarning onEvent:nil message:(fmt, ##__VA_ARGS__)]
#define LLog_Warning_Event(event, fmt , ...) [[LLLogHelper sharedHelper] logInFile:[[NSString stringWithUTF8String:__FILE__] lastPathComponent] function:NSStringFromSelector(_cmd) lineNo:__LINE__ level:LLConfigLogLevelWarning onEvent:event message:(fmt, ##__VA_ARGS__)]
#define LLog_Error(fmt, ...) [[LLLogHelper sharedHelper] logInFile:[[NSString stringWithUTF8String:__FILE__] lastPathComponent] function:NSStringFromSelector(_cmd) lineNo:__LINE__ level:LLConfigLogLevelError onEvent:nil message:(fmt, ##__VA_ARGS__)]
#define LLog_Error_Event(event, fmt , ...) [[LLLogHelper sharedHelper] logInFile:[[NSString stringWithUTF8String:__FILE__] lastPathComponent] function:NSStringFromSelector(_cmd) lineNo:__LINE__ level:LLConfigLogLevelError onEvent:event message:(fmt, ##__VA_ARGS__)]

#endif
/*
// If you only use LLDebugTool in Debug environment, you can copy the following part to your PCH file to resolve most Release environment errors.
Expand Down
4 changes: 2 additions & 2 deletions LLDebugToolDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,13 @@
C44F410D2152AA7000153F46 /* LLAppInfoVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LLAppInfoVC.m; sourceTree = "<group>"; };
C44F410E2152AA7000153F46 /* LLAppInfoVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LLAppInfoVC.h; sourceTree = "<group>"; };
C44F41112152AA7000153F46 /* LLDebugTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LLDebugTool.m; sourceTree = "<group>"; };
C44F41122152AA7000153F46 /* LLDebugToolMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LLDebugToolMacros.h; sourceTree = "<group>"; };
C44F41132152AA7000153F46 /* LLDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LLDebug.h; sourceTree = "<group>"; };
C44F41142152AA7000153F46 /* LLDebugTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LLDebugTool.h; sourceTree = "<group>"; };
C44F41162152AA7000153F46 /* LLWindowViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LLWindowViewController.h; sourceTree = "<group>"; };
C44F41172152AA7000153F46 /* LLWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LLWindow.m; sourceTree = "<group>"; };
C44F41182152AA7000153F46 /* LLWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LLWindow.h; sourceTree = "<group>"; };
C44F41192152AA7000153F46 /* LLWindowViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LLWindowViewController.m; sourceTree = "<group>"; };
C4F8C661215533E800B07016 /* LLDebugToolMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LLDebugToolMacros.h; sourceTree = "<group>"; };
D1B877316C71C92C11DF5A9A /* libPods-LLDebugToolDemoTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-LLDebugToolDemoTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -382,6 +382,7 @@
369D09292153853A001C9D4B /* LLLogHelper.m */,
369D09242153853A001C9D4B /* LLLogModel.h */,
369D09282153853A001C9D4B /* LLLogModel.m */,
C4F8C661215533E800B07016 /* LLDebugToolMacros.h */,
369D09262153853A001C9D4B /* LLLogHelperEventDefine.h */,
);
path = Function;
Expand Down Expand Up @@ -945,7 +946,6 @@
C44F41132152AA7000153F46 /* LLDebug.h */,
C44F41142152AA7000153F46 /* LLDebugTool.h */,
C44F41112152AA7000153F46 /* LLDebugTool.m */,
C44F41122152AA7000153F46 /* LLDebugToolMacros.h */,
);
path = PublicHeader;
sourceTree = "<group>";
Expand Down

0 comments on commit 6cce426

Please sign in to comment.