Skip to content

Commit 2a2e6c2

Browse files
committed
Update for 1.3.7
1 parent 63463bf commit 2a2e6c2

File tree

240 files changed

+7475
-3473
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+7475
-3473
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## [1.3.7](https://github.com/HDB-Li/LLDebugToolSwift/releases/tag/1.3.7) (11/22/2019)
2+
3+
### Synchronous update
4+
5+
More update informations please see [LLDebugTool CHANGELOG](https://github.com/HDB-Li/LLDebugTool/blob/master/CHANGELOG.md).
6+
7+
Update for version 1.3.7 based on LLDebugTool. Fix error in swift.
8+
19
## [1.3.6](https://github.com/HDB-Li/LLDebugToolSwift/releases/tag/1.3.6) (11/07/2019)
210

311
### Synchronous update

LLDebugToolSwift.podspec

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "LLDebugToolSwift"
3-
s.version = "1.3.6"
3+
s.version = "1.3.7"
44
s.summary = "LLDebugTool is a debugging tool for developers and testers that can help you analyze and manipulate data in non-xcode situations."
55
s.homepage = "https://github.com/HDB-Li/LLDebugToolSwift"
66
s.license = "MIT"
@@ -10,8 +10,54 @@ Pod::Spec.new do |s|
1010
s.source = { :git => "https://github.com/HDB-Li/LLDebugToolSwift.git", :tag => s.version }
1111
s.requires_arc = true
1212
s.source_files = "LLDebugToolSwift/**/*.{h,m,swift}"
13-
# s.resources = "LLDebugToolSwift/**/*.{xib,storyboard,bundle}"
14-
s.dependency "LLDebugTool" , '1.3.6'
1513
s.swift_version = "4.0"
1614

15+
s.subspec 'Network' do |ss|
16+
ss.dependency "LLDebugTool/Network", "1.3.7"
17+
end
18+
19+
s.subspec 'Log' do |ss|
20+
ss.dependency "LLDebugTool/Log", "1.3.7"
21+
end
22+
23+
s.subspec 'Crash' do |ss|
24+
ss.dependency "LLDebugTool/Crash", "1.3.7"
25+
end
26+
27+
s.subspec 'AppInfo' do |ss|
28+
ss.dependency "LLDebugTool/AppInfo", "1.3.7"
29+
end
30+
31+
s.subspec 'Sandbox' do |ss|
32+
ss.dependency "LLDebugTool/Sandbox", "1.3.7"
33+
end
34+
35+
s.subspec 'Screenshot' do |ss|
36+
ss.dependency "LLDebugTool/Screenshot", "1.3.7"
37+
end
38+
39+
s.subspec 'Hierarchy' do |ss|
40+
ss.dependency "LLDebugTool/Hierarchy", "1.3.7"
41+
end
42+
43+
s.subspec 'Magnifier' do |ss|
44+
ss.dependency "LLDebugTool/Magnifier", "1.3.7"
45+
end
46+
47+
s.subspec 'Ruler' do |ss|
48+
ss.dependency "LLDebugTool/Ruler", "1.3.7"
49+
end
50+
51+
s.subspec 'WidgetBorder' do |ss|
52+
ss.dependency "LLDebugTool/WidgetBorder", "1.3.7"
53+
end
54+
55+
s.subspec 'Html' do |ss|
56+
ss.dependency "LLDebugTool/Html", "1.3.7"
57+
end
58+
59+
s.subspec 'Location' do |ss|
60+
ss.dependency "LLDebugTool/Location", "1.3.7"
61+
end
62+
1763
end

LLDebugToolSwift/LLog.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class LLog: NSObject {
3737
/// Log a normal message with event.
3838
public static func log(message : String? , event : String? , file : String = #file , function : String = #function , lineNumber : Int = #line) {
3939
#if DEBUG
40-
LLDebugTool.shared().log(inFile: (file as NSString).lastPathComponent, function: function, lineNo: lineNumber, level: .default, onEvent: event, message: message)
40+
LLDebugTool.shared().log(inFile: (file as NSString).lastPathComponent, function: function, lineNo: lineNumber, onEvent: event, message: message)
4141
#endif
4242
}
4343

@@ -49,7 +49,7 @@ public class LLog: NSObject {
4949
/// Log a alert message with event.
5050
public static func alertLog(message : String? , event : String? , file : String = #file , function : String = #function , lineNumber : Int = #line) {
5151
#if DEBUG
52-
LLDebugTool.shared().log(inFile: (file as NSString).lastPathComponent, function: function, lineNo: lineNumber, level: .alert, onEvent: event, message: message)
52+
LLDebugTool.shared().alertLog(inFile: (file as NSString).lastPathComponent, function: function, lineNo: lineNumber, onEvent: event, message: message)
5353
#endif
5454
}
5555

@@ -61,7 +61,7 @@ public class LLog: NSObject {
6161
/// Log a warning message with event.
6262
public static func warningLog(message : String? , event : String? , file : String = #file , function : String = #function , lineNumber : Int = #line) {
6363
#if DEBUG
64-
LLDebugTool.shared().log(inFile: (file as NSString).lastPathComponent, function: function, lineNo: lineNumber, level: .warning, onEvent: event, message: message)
64+
LLDebugTool.shared().warningLog(inFile: (file as NSString).lastPathComponent, function: function, lineNo: lineNumber, onEvent: event, message: message)
6565
#endif
6666
}
6767

@@ -73,7 +73,7 @@ public class LLog: NSObject {
7373
/// Log a error message with event.
7474
public static func errorLog(message : String? , event : String? , file : String = #file , function : String = #function , lineNumber : Int = #line) {
7575
#if DEBUG
76-
LLDebugTool.shared().log(inFile: (file as NSString).lastPathComponent, function: function, lineNo: lineNumber, level: .error, onEvent: event, message: message)
76+
LLDebugTool.shared().errorLog(inFile: (file as NSString).lastPathComponent, function: function, lineNo: lineNumber, onEvent: event, message: message)
7777
#endif
7878
}
7979

LLDebugToolSwiftDemo.xcodeproj/project.pbxproj

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
364A05B5214917E70056719F /* LLDebugToolSwiftDemoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 364A05B4214917E70056719F /* LLDebugToolSwiftDemoTests.swift */; };
1717
364A05C0214917E80056719F /* LLDebugToolSwiftDemoUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 364A05BF214917E80056719F /* LLDebugToolSwiftDemoUITests.swift */; };
1818
364A05D2214922EF0056719F /* LLog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 364A05D1214922EF0056719F /* LLog.swift */; };
19+
3652EDEA23876CD500D5D531 /* TestHtmlViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3652EDE923876CD500D5D531 /* TestHtmlViewController.swift */; };
20+
3652EDEC23876CEA00D5D531 /* CustomWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3652EDEB23876CEA00D5D531 /* CustomWebViewController.swift */; };
21+
3652EDEE23876CF600D5D531 /* TestLocationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3652EDED23876CF600D5D531 /* TestLocationViewController.swift */; };
1922
367620EF214A63B500F433EE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 367620F1214A63B500F433EE /* InfoPlist.strings */; };
2023
367620F5214A648200F433EE /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 367620F7214A648200F433EE /* Localizable.strings */; };
2124
367620FB214A6D6400F433EE /* BaseTestViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 367620FA214A6D6400F433EE /* BaseTestViewController.swift */; };
@@ -69,6 +72,9 @@
6972
364A05BF214917E80056719F /* LLDebugToolSwiftDemoUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LLDebugToolSwiftDemoUITests.swift; sourceTree = "<group>"; };
7073
364A05C1214917E80056719F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
7174
364A05D1214922EF0056719F /* LLog.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LLog.swift; sourceTree = "<group>"; };
75+
3652EDE923876CD500D5D531 /* TestHtmlViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestHtmlViewController.swift; sourceTree = "<group>"; };
76+
3652EDEB23876CEA00D5D531 /* CustomWebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomWebViewController.swift; sourceTree = "<group>"; };
77+
3652EDED23876CF600D5D531 /* TestLocationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestLocationViewController.swift; sourceTree = "<group>"; };
7278
367620F0214A63B500F433EE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
7379
367620F2214A647C00F433EE /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Main.strings"; sourceTree = "<group>"; };
7480
367620F3214A647C00F433EE /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.strings"; sourceTree = "<group>"; };
@@ -128,9 +134,9 @@
128134
364A0593214917E70056719F = {
129135
isa = PBXGroup;
130136
children = (
137+
C481AD22231BDE6A004680C1 /* LLDebugToolSwift.podspec */,
131138
C481AD1E231BDE69004680C1 /* CHANGELOG.md */,
132139
C481AD20231BDE69004680C1 /* LICENSE */,
133-
C481AD22231BDE6A004680C1 /* LLDebugToolSwift.podspec */,
134140
C481AD21231BDE69004680C1 /* README-cn.md */,
135141
C481AD1F231BDE69004680C1 /* README.md */,
136142
364A05D0214922EF0056719F /* LLDebugToolSwift */,
@@ -200,12 +206,15 @@
200206
isa = PBXGroup;
201207
children = (
202208
367620FA214A6D6400F433EE /* BaseTestViewController.swift */,
203-
367620FC214A6D8700F433EE /* TestColorStyleViewController.swift */,
204-
367620FE214A6D9400F433EE /* TestCrashViewController.swift */,
205-
36762100214A6D9F00F433EE /* TestLogViewController.swift */,
206209
36762102214A6DA800F433EE /* TestNetworkViewController.swift */,
210+
36762100214A6D9F00F433EE /* TestLogViewController.swift */,
211+
367620FE214A6D9400F433EE /* TestCrashViewController.swift */,
212+
367620FC214A6D8700F433EE /* TestColorStyleViewController.swift */,
207213
36762104214A6DB300F433EE /* TestWindowStyleViewController.swift */,
208214
36FB8E6C23409F5C00ACB6CB /* TestHierarchyViewController.swift */,
215+
3652EDE923876CD500D5D531 /* TestHtmlViewController.swift */,
216+
3652EDEB23876CEA00D5D531 /* CustomWebViewController.swift */,
217+
3652EDED23876CF600D5D531 /* TestLocationViewController.swift */,
209218
);
210219
path = DemoViewControllers;
211220
sourceTree = "<group>";
@@ -462,12 +471,15 @@
462471
buildActionMask = 2147483647;
463472
files = (
464473
367620FF214A6D9400F433EE /* TestCrashViewController.swift in Sources */,
474+
3652EDEC23876CEA00D5D531 /* CustomWebViewController.swift in Sources */,
465475
C4320D41214DFB41000CC110 /* MyService.swift in Sources */,
466476
36762105214A6DB300F433EE /* TestWindowStyleViewController.swift in Sources */,
477+
3652EDEE23876CF600D5D531 /* TestLocationViewController.swift in Sources */,
467478
367620FD214A6D8700F433EE /* TestColorStyleViewController.swift in Sources */,
468479
36762101214A6D9F00F433EE /* TestLogViewController.swift in Sources */,
469480
36FB8E6D23409F5C00ACB6CB /* TestHierarchyViewController.swift in Sources */,
470481
36762103214A6DA800F433EE /* TestNetworkViewController.swift in Sources */,
482+
3652EDEA23876CD500D5D531 /* TestHtmlViewController.swift in Sources */,
471483
364A05D2214922EF0056719F /* LLog.swift in Sources */,
472484
367620FB214A6D6400F433EE /* BaseTestViewController.swift in Sources */,
473485
364A05A2214917E70056719F /* ViewController.swift in Sources */,
@@ -671,7 +683,7 @@
671683
INFOPLIST_FILE = LLDebugToolSwiftDemo/Info.plist;
672684
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
673685
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
674-
MARKETING_VERSION = 1.3.6;
686+
MARKETING_VERSION = 1.3.7;
675687
PRODUCT_BUNDLE_IDENTIFIER = myCompany.HDB.LLDebugToolSwiftDemo;
676688
PRODUCT_NAME = "$(TARGET_NAME)";
677689
SWIFT_VERSION = 4.0;
@@ -689,7 +701,7 @@
689701
INFOPLIST_FILE = LLDebugToolSwiftDemo/Info.plist;
690702
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
691703
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
692-
MARKETING_VERSION = 1.3.6;
704+
MARKETING_VERSION = 1.3.7;
693705
PRODUCT_BUNDLE_IDENTIFIER = myCompany.HDB.LLDebugToolSwiftDemo;
694706
PRODUCT_NAME = "$(TARGET_NAME)";
695707
SWIFT_VERSION = 4.0;

LLDebugToolSwiftDemo/AppDelegate.swift

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,25 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
3333

3434
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
3535

36-
//####################### Color Style #######################//
37-
// Uncomment one of the following lines to change the color configuration.
38-
// LLConfig.shared().colorStyle = .system
39-
// LLConfig.shared().configBackgroundColor(.orange, textColor: .white, statusBarStyle: .default)
40-
41-
//####################### User Identity #######################//
42-
// Use this line to tag user. More config please see "LLConfig.h".
43-
LLConfig.shared().userIdentity = "Miss L";
44-
45-
//####################### Window Style #######################//
46-
// Uncomment one of the following lines to change the window style.
47-
// LLConfig.shared().windowStyle = .netBar
48-
49-
//####################### Features #######################//
50-
// Uncomment this line to change the available features.
51-
// LLConfig.shared().availables = .noneAppInfo
52-
53-
// ####################### Start LLDebugTool #######################//
54-
// Use this line to start working.
55-
LLDebugTool.shared().startWorking()
36+
// Start working with config.
37+
LLDebugTool.shared().startWorking { (config) in
38+
39+
//####################### Color Style #######################//
40+
// Uncomment one of the following lines to change the color configuration.
41+
// config.colorStyle = .system
42+
// config.configBackgroundColor(.orange, primaryColor: .white, statusBarStyle: .default)
43+
44+
//####################### User Identity #######################//
45+
// Use this line to tag user. More config please see "LLConfig.h".
46+
config.userIdentity = "Miss L";
47+
48+
//####################### Window Style #######################//
49+
// Uncomment one of the following lines to change the window style.
50+
// config.windowStyle = .netBar
51+
52+
//####################### Html #######################//
53+
config.defaultHtmlUrl = "https://github.com/HDB-Li/LLDebugTool";
54+
}
5655

5756
return true
5857
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
//
2+
// CustomWebViewController.swift
3+
// LLDebugToolSwiftDemo
4+
//
5+
// Created by admin10000 on 2019/11/22.
6+
//
7+
8+
import UIKit
9+
10+
import WebKit
11+
12+
class CustomWebViewController: UIViewController {
13+
14+
public var url : String?
15+
16+
private lazy var titleLabel : UILabel = {
17+
let label = UILabel()
18+
label.font = UIFont.boldSystemFont(ofSize: 20)
19+
label.textAlignment = .center
20+
label.text = NSLocalizedString("custom.html.view.controller", comment: "")
21+
return label
22+
}()
23+
24+
private lazy var webView : WKWebView = {
25+
let view = WKWebView(frame: CGRect.zero, configuration: WKWebViewConfiguration())
26+
return view
27+
}()
28+
29+
override func viewDidLoad() {
30+
super.viewDidLoad()
31+
self.view.backgroundColor = .white
32+
self.view.addSubview(self.titleLabel)
33+
self.view.addSubview(self.webView)
34+
35+
self.webView.load(URLRequest(url: URL(string: self.url != nil ? self.url! : "https://github.com/HDB-Li/LLDebugTool")!))
36+
}
37+
38+
override func viewDidLayoutSubviews() {
39+
super.viewDidLayoutSubviews()
40+
let navigationBarHeight = self.navigationController!.navigationBar.frame.height + self.navigationController!.navigationBar.frame.origin.y
41+
self.titleLabel.frame = CGRect(x: 0, y: navigationBarHeight, width: self.view.frame.width, height: 100)
42+
self.webView.frame = CGRect(x: 0, y: navigationBarHeight + 100, width: self.view.frame.width, height: self.view.frame.height - 100 - navigationBarHeight)
43+
}
44+
45+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
//
2+
// TestHtmlViewController.swift
3+
// LLDebugToolSwiftDemo
4+
//
5+
// Created by admin10000 on 2019/11/22.
6+
//
7+
8+
import UIKit
9+
10+
import LLDebugTool
11+
12+
class TestHtmlViewController: BaseTestViewController {
13+
14+
override func viewDidLoad() {
15+
super.viewDidLoad()
16+
self.title = NSLocalizedString("test.html", comment: "")
17+
}
18+
19+
// MARK: - Table view data source
20+
21+
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
22+
return 2
23+
}
24+
25+
26+
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
27+
let cell = super.tableView(tableView, cellForRowAt: indexPath)
28+
if indexPath.row == 0 {
29+
cell.textLabel?.text = NSLocalizedString("show.html", comment: "")
30+
} else if (indexPath.row == 1) {
31+
cell.textLabel?.text = NSLocalizedString("show.custom.html", comment: "")
32+
}
33+
return cell
34+
}
35+
36+
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
37+
if indexPath.row == 0 {
38+
self.testHtml()
39+
} else if (indexPath.row == 1) {
40+
self.testCustomHtmlViewController()
41+
}
42+
}
43+
44+
// MARK: - Action
45+
private func testHtml() {
46+
if LLConfig.shared().htmlViewControllerProvider != nil {
47+
LLConfig.shared().htmlViewControllerProvider = nil
48+
}
49+
LLDebugTool.shared().execute(.html)
50+
}
51+
52+
private func testCustomHtmlViewController() {
53+
if LLConfig.shared().htmlViewControllerProvider == nil {
54+
LLConfig.shared().htmlViewControllerProvider = { (url) -> UIViewController in
55+
let vc = CustomWebViewController()
56+
vc.url = url
57+
return vc
58+
}
59+
}
60+
LLDebugTool.shared().execute(.html)
61+
}
62+
63+
}

0 commit comments

Comments
 (0)