Skip to content

Commit 8eef856

Browse files
committed
clean inject test
1 parent d633e0d commit 8eef856

File tree

7 files changed

+109
-194
lines changed

7 files changed

+109
-194
lines changed

InstrProfiling.h

-18
This file was deleted.

SwiftPamphletApp.xcodeproj/project.pbxproj

+2-23
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,6 @@
181181
086A5F642754C14F00FECE02 /* PlayTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 086A5F632754C14F00FECE02 /* PlayTextView.swift */; };
182182
086A5F672754C27900FECE02 /* DBHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 086A5F662754C27900FECE02 /* DBHandler.swift */; };
183183
086A5F6A2755F3BE00FECE02 /* repos.json in Resources */ = {isa = PBXBuildFile; fileRef = 086A5F692755F3BE00FECE02 /* repos.json */; };
184-
0886702E27F804010001EA81 /* module.modulemap in Sources */ = {isa = PBXBuildFile; fileRef = 0886702D27F804010001EA81 /* module.modulemap */; };
185-
0886703227FD77F90001EA81 /* Inject in Frameworks */ = {isa = PBXBuildFile; productRef = 0886703127FD77F90001EA81 /* Inject */; };
186184
088EE8F527BD24E000764525 /* PlayLinkView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 088EE8F427BD24E000764525 /* PlayLinkView.swift */; };
187185
0896FB9027BA39B100676B7F /* PlayButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0896FB8F27BA39B100676B7F /* PlayButtonView.swift */; };
188186
0896FB9227BA486900676B7F /* 145.md in Resources */ = {isa = PBXBuildFile; fileRef = 0896FB9127BA486900676B7F /* 145.md */; };
@@ -442,9 +440,7 @@
442440
086A5F632754C14F00FECE02 /* PlayTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayTextView.swift; sourceTree = "<group>"; };
443441
086A5F662754C27900FECE02 /* DBHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DBHandler.swift; sourceTree = "<group>"; };
444442
086A5F692755F3BE00FECE02 /* repos.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = repos.json; path = SwiftPamphletApp/Resource/News/repos.json; sourceTree = SOURCE_ROOT; };
445-
0886702A27F803E20001EA81 /* InstrProfiling.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InstrProfiling.h; sourceTree = "<group>"; };
446443
0886702B27F804010001EA81 /* SwiftPamphletApp-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SwiftPamphletApp-Bridging-Header.h"; sourceTree = "<group>"; };
447-
0886702D27F804010001EA81 /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = "<group>"; };
448444
088EE8F427BD24E000764525 /* PlayLinkView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayLinkView.swift; sourceTree = "<group>"; };
449445
0896FB8F27BA39B100676B7F /* PlayButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayButtonView.swift; sourceTree = "<group>"; };
450446
0896FB9127BA486900676B7F /* 145.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = 145.md; sourceTree = "<group>"; };
@@ -532,7 +528,6 @@
532528
08448F092796A83D00B61353 /* SwiftDate in Frameworks */,
533529
08BF26D02768A59A0064DDAC /* SQLite in Frameworks */,
534530
08448F4E279E8CA400B61353 /* Ink in Frameworks */,
535-
0886703227FD77F90001EA81 /* Inject in Frameworks */,
536531
08BE634027BF953A002BC6A8 /* CodeEditorView in Frameworks */,
537532
08BF26D32768A5B40064DDAC /* MarkdownUI in Frameworks */,
538533
08D107BD278826BB007B7009 /* HTMLEntities in Frameworks */,
@@ -1043,8 +1038,6 @@
10431038
086A5EFA2744E88E00FECE02 = {
10441039
isa = PBXGroup;
10451040
children = (
1046-
0886702A27F803E20001EA81 /* InstrProfiling.h */,
1047-
0886702D27F804010001EA81 /* module.modulemap */,
10481041
086A5F052744E88E00FECE02 /* SwiftPamphletApp */,
10491042
086A5F042744E88E00FECE02 /* Products */,
10501043
0886702B27F804010001EA81 /* SwiftPamphletApp-Bridging-Header.h */,
@@ -1370,7 +1363,6 @@
13701363
08448F082796A83D00B61353 /* SwiftDate */,
13711364
08448F4D279E8CA400B61353 /* Ink */,
13721365
08BE633F27BF953A002BC6A8 /* CodeEditorView */,
1373-
0886703127FD77F90001EA81 /* Inject */,
13741366
);
13751367
productName = SwiftPamphletApp;
13761368
productReference = 086A5F032744E88E00FECE02 /* 戴铭的开发小册子.app */;
@@ -1408,7 +1400,6 @@
14081400
08448F072796A83D00B61353 /* XCRemoteSwiftPackageReference "SwiftDate" */,
14091401
08448F4C279E8CA400B61353 /* XCRemoteSwiftPackageReference "ink" */,
14101402
08BE633E27BF953A002BC6A8 /* XCRemoteSwiftPackageReference "CodeEditorView" */,
1411-
0886703027FD77F90001EA81 /* XCRemoteSwiftPackageReference "Inject" */,
14121403
);
14131404
productRefGroup = 086A5F042744E88E00FECE02 /* Products */;
14141405
projectDirPath = "";
@@ -1610,7 +1601,6 @@
16101601
08BE634827C4B6A2002BC6A8 /* PlayStackView.swift in Sources */,
16111602
08BE636227C878EC002BC6A8 /* PlayLazyVStackAndLazyHStackView.swift in Sources */,
16121603
08BE634627C48C5B002BC6A8 /* PlayToggleView.swift in Sources */,
1613-
0886702E27F804010001EA81 /* module.modulemap in Sources */,
16141604
08448F41279AC1A900B61353 /* PlayMacOS.swift in Sources */,
16151605
08AEAEF7277F389300B969E2 /* RSSItemContentView.swift in Sources */,
16161606
0896FB9027BA39B100676B7F /* PlayButtonView.swift in Sources */,
@@ -1817,6 +1807,7 @@
18171807
CLANG_ENABLE_MODULES = YES;
18181808
CODE_SIGN_ENTITLEMENTS = SwiftPamphletApp/SwiftPamphletAppDebug.entitlements;
18191809
CODE_SIGN_IDENTITY = "-";
1810+
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
18201811
CODE_SIGN_STYLE = Automatic;
18211812
COMBINE_HIDPI_IMAGES = YES;
18221813
CURRENT_PROJECT_VERSION = 1;
@@ -1857,6 +1848,7 @@
18571848
CLANG_ENABLE_MODULES = YES;
18581849
CODE_SIGN_ENTITLEMENTS = SwiftPamphletApp/SwiftPamphletApp.entitlements;
18591850
CODE_SIGN_IDENTITY = "-";
1851+
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
18601852
CODE_SIGN_STYLE = Automatic;
18611853
COMBINE_HIDPI_IMAGES = YES;
18621854
CURRENT_PROJECT_VERSION = 1;
@@ -1921,14 +1913,6 @@
19211913
minimumVersion = 0.5.1;
19221914
};
19231915
};
1924-
0886703027FD77F90001EA81 /* XCRemoteSwiftPackageReference "Inject" */ = {
1925-
isa = XCRemoteSwiftPackageReference;
1926-
repositoryURL = "https://github.com/krzysztofzablocki/Inject.git";
1927-
requirement = {
1928-
kind = upToNextMajorVersion;
1929-
minimumVersion = 1.0.0;
1930-
};
1931-
};
19321916
08BE633E27BF953A002BC6A8 /* XCRemoteSwiftPackageReference "CodeEditorView" */ = {
19331917
isa = XCRemoteSwiftPackageReference;
19341918
repositoryURL = "https://github.com/mchakravarty/CodeEditorView.git";
@@ -1974,11 +1958,6 @@
19741958
package = 08448F4C279E8CA400B61353 /* XCRemoteSwiftPackageReference "ink" */;
19751959
productName = Ink;
19761960
};
1977-
0886703127FD77F90001EA81 /* Inject */ = {
1978-
isa = XCSwiftPackageProductDependency;
1979-
package = 0886703027FD77F90001EA81 /* XCRemoteSwiftPackageReference "Inject" */;
1980-
productName = Inject;
1981-
};
19821961
08BE633F27BF953A002BC6A8 /* CodeEditorView */ = {
19831962
isa = XCSwiftPackageProductDependency;
19841963
package = 08BE633E27BF953A002BC6A8 /* XCRemoteSwiftPackageReference "CodeEditorView" */;
Original file line numberDiff line numberDiff line change
@@ -1,115 +1,105 @@
11
{
2-
"object": {
3-
"pins": [
4-
{
5-
"package": "AttributedText",
6-
"repositoryURL": "https://github.com/gonzalezreal/AttributedText",
7-
"state": {
8-
"branch": null,
9-
"revision": "2dc2d7864e0fee4b524a5850d7d7cf9a7eeda0fc",
10-
"version": "1.0.0"
11-
}
12-
},
13-
{
14-
"package": "CodeEditorView",
15-
"repositoryURL": "https://github.com/mchakravarty/CodeEditorView.git",
16-
"state": {
17-
"branch": "main",
18-
"revision": "373f3ecfaabdd06918e655cf4516b046aa7e290c",
19-
"version": null
20-
}
21-
},
22-
{
23-
"package": "combine-schedulers",
24-
"repositoryURL": "https://github.com/pointfreeco/combine-schedulers",
25-
"state": {
26-
"branch": null,
27-
"revision": "4cf088c29a20f52be0f2ca54992b492c54e0076b",
28-
"version": "0.5.3"
29-
}
30-
},
31-
{
32-
"package": "Inject",
33-
"repositoryURL": "https://github.com/krzysztofzablocki/Inject.git",
34-
"state": {
35-
"branch": null,
36-
"revision": "84ebbde86df4ec7532e8bfc6ad1fe4ed2ca1114f",
37-
"version": "1.0.3"
38-
}
39-
},
40-
{
41-
"package": "Ink",
42-
"repositoryURL": "https://github.com/johnsundell/ink.git",
43-
"state": {
44-
"branch": null,
45-
"revision": "77c3d8953374a9cf5418ef0bd7108524999de85a",
46-
"version": "0.5.1"
47-
}
48-
},
49-
{
50-
"package": "MarkdownUI",
51-
"repositoryURL": "https://github.com/gonzalezreal/MarkdownUI",
52-
"state": {
53-
"branch": null,
54-
"revision": "94e07c111f1ef0a9c997d2fadac984e8bb7d7405",
55-
"version": "1.0.0"
56-
}
57-
},
58-
{
59-
"package": "NetworkImage",
60-
"repositoryURL": "https://github.com/gonzalezreal/NetworkImage",
61-
"state": {
62-
"branch": null,
63-
"revision": "f8b8ed0be39d2f4aa00a6e8d3b18a62a94eff8d8",
64-
"version": "4.0.0"
65-
}
66-
},
67-
{
68-
"package": "SQLite.swift",
69-
"repositoryURL": "https://github.com/stephencelis/SQLite.swift.git",
70-
"state": {
71-
"branch": null,
72-
"revision": "60a65015f6402b7c34b9a924f755ca0a73afeeaa",
73-
"version": "0.13.1"
74-
}
75-
},
76-
{
77-
"package": "HTMLEntities",
78-
"repositoryURL": "https://github.com/Kitura/swift-html-entities.git",
79-
"state": {
80-
"branch": null,
81-
"revision": "3686a2b931be24dd2531307f89e2f1d648c0200e",
82-
"version": "4.0.0"
83-
}
84-
},
85-
{
86-
"package": "SwiftCommonMark",
87-
"repositoryURL": "https://github.com/gonzalezreal/SwiftCommonMark",
88-
"state": {
89-
"branch": null,
90-
"revision": "ed252beaddecce28ea6363f800c773d6169011b8",
91-
"version": "1.0.0"
92-
}
93-
},
94-
{
95-
"package": "SwiftDate",
96-
"repositoryURL": "https://github.com/malcommac/SwiftDate",
97-
"state": {
98-
"branch": null,
99-
"revision": "6190d0cefff3013e77ed567e6b074f324e5c5bf5",
100-
"version": "6.3.1"
101-
}
102-
},
103-
{
104-
"package": "xctest-dynamic-overlay",
105-
"repositoryURL": "https://github.com/pointfreeco/xctest-dynamic-overlay",
106-
"state": {
107-
"branch": null,
108-
"revision": "50a70a9d3583fe228ce672e8923010c8df2deddd",
109-
"version": "0.2.1"
110-
}
2+
"originHash" : "444bf76c1a8e33e1b420e260bf0545c937e0cf4b69b77cc9417a74ab5f5a1b40",
3+
"pins" : [
4+
{
5+
"identity" : "attributedtext",
6+
"kind" : "remoteSourceControl",
7+
"location" : "https://github.com/gonzalezreal/AttributedText",
8+
"state" : {
9+
"revision" : "2dc2d7864e0fee4b524a5850d7d7cf9a7eeda0fc",
10+
"version" : "1.0.0"
11111
}
112-
]
113-
},
114-
"version": 1
12+
},
13+
{
14+
"identity" : "codeeditorview",
15+
"kind" : "remoteSourceControl",
16+
"location" : "https://github.com/mchakravarty/CodeEditorView.git",
17+
"state" : {
18+
"branch" : "main",
19+
"revision" : "373f3ecfaabdd06918e655cf4516b046aa7e290c"
20+
}
21+
},
22+
{
23+
"identity" : "combine-schedulers",
24+
"kind" : "remoteSourceControl",
25+
"location" : "https://github.com/pointfreeco/combine-schedulers",
26+
"state" : {
27+
"revision" : "4cf088c29a20f52be0f2ca54992b492c54e0076b",
28+
"version" : "0.5.3"
29+
}
30+
},
31+
{
32+
"identity" : "ink",
33+
"kind" : "remoteSourceControl",
34+
"location" : "https://github.com/johnsundell/ink.git",
35+
"state" : {
36+
"revision" : "77c3d8953374a9cf5418ef0bd7108524999de85a",
37+
"version" : "0.5.1"
38+
}
39+
},
40+
{
41+
"identity" : "markdownui",
42+
"kind" : "remoteSourceControl",
43+
"location" : "https://github.com/gonzalezreal/MarkdownUI",
44+
"state" : {
45+
"revision" : "94e07c111f1ef0a9c997d2fadac984e8bb7d7405",
46+
"version" : "1.0.0"
47+
}
48+
},
49+
{
50+
"identity" : "networkimage",
51+
"kind" : "remoteSourceControl",
52+
"location" : "https://github.com/gonzalezreal/NetworkImage",
53+
"state" : {
54+
"revision" : "f8b8ed0be39d2f4aa00a6e8d3b18a62a94eff8d8",
55+
"version" : "4.0.0"
56+
}
57+
},
58+
{
59+
"identity" : "sqlite.swift",
60+
"kind" : "remoteSourceControl",
61+
"location" : "https://github.com/stephencelis/SQLite.swift.git",
62+
"state" : {
63+
"revision" : "60a65015f6402b7c34b9a924f755ca0a73afeeaa",
64+
"version" : "0.13.1"
65+
}
66+
},
67+
{
68+
"identity" : "swift-html-entities",
69+
"kind" : "remoteSourceControl",
70+
"location" : "https://github.com/Kitura/swift-html-entities.git",
71+
"state" : {
72+
"revision" : "3686a2b931be24dd2531307f89e2f1d648c0200e",
73+
"version" : "4.0.0"
74+
}
75+
},
76+
{
77+
"identity" : "swiftcommonmark",
78+
"kind" : "remoteSourceControl",
79+
"location" : "https://github.com/gonzalezreal/SwiftCommonMark",
80+
"state" : {
81+
"revision" : "ed252beaddecce28ea6363f800c773d6169011b8",
82+
"version" : "1.0.0"
83+
}
84+
},
85+
{
86+
"identity" : "swiftdate",
87+
"kind" : "remoteSourceControl",
88+
"location" : "https://github.com/malcommac/SwiftDate",
89+
"state" : {
90+
"revision" : "6190d0cefff3013e77ed567e6b074f324e5c5bf5",
91+
"version" : "6.3.1"
92+
}
93+
},
94+
{
95+
"identity" : "xctest-dynamic-overlay",
96+
"kind" : "remoteSourceControl",
97+
"location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
98+
"state" : {
99+
"revision" : "50a70a9d3583fe228ce672e8923010c8df2deddd",
100+
"version" : "0.2.1"
101+
}
102+
}
103+
],
104+
"version" : 3
115105
}

SwiftPamphletApp/Core/FundationFunction.swift

+1-15
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import SwiftUI
1010
import Combine
1111
import Network
1212
import SwiftDate
13-
import InstrProfiling
1413

1514
// MARK: - Web
1615
func wrapperHtmlContent(content: String, codeStyle: String = "lioshi.min") -> String {
@@ -181,17 +180,4 @@ extension View {
181180
}
182181
}
183182

184-
// MARK: - 代码覆盖率
185-
func codeCoverageProfrawDump(fileName: String = "cc") {
186-
let name = "\(fileName).profraw"
187-
let fileManager = FileManager.default
188-
do {
189-
let documentDirectory = try fileManager.url(for: .documentDirectory, in: .userDomainMask, appropriateFor:nil, create:false)
190-
let filePath: NSString = documentDirectory.appendingPathComponent(name).path as NSString
191-
__llvm_profile_set_filename(filePath.utf8String)
192-
print("File at: \(String(cString: __llvm_profile_get_filename()))")
193-
__llvm_profile_write_file()
194-
} catch {
195-
print(error)
196-
}
197-
}
183+

SwiftPamphletApp/Resource/News/rssfeed.json

-14
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@
66
"siteLink":"https://www.swift.org/",
77
"feedLink":"https://www.swift.org/atom.xml"
88
},
9-
{
10-
"title":"iOS摸鱼周报",
11-
"id":2201071620,
12-
"des":"iOS 摸鱼周报",
13-
"siteLink":"https://zhangferry.com/",
14-
"feedLink":"https://zhangferry.com/atom.xml"
15-
},
169
{
1710
"title":"Michael Tsai",
1811
"id":2201111053,
@@ -62,13 +55,6 @@
6255
"siteLink":"https://ming1016.github.io",
6356
"feedLink":"https://ming1016.github.io/atom.xml"
6457
},
65-
{
66-
"title":"Swift by Sundell",
67-
"id":2112311444,
68-
"des":"Weekly Swift articles, podcasts and tips by John Sundell",
69-
"siteLink":"https://www.swiftbysundell.com",
70-
"feedLink":"https://www.swiftbysundell.com/rss"
71-
},
7258
{
7359
"title":"FIVE STARS",
7460
"id":2201071601,

0 commit comments

Comments
 (0)