Skip to content

Commit 9659cc1

Browse files
committed
Minor changes and changed dependencies
+ Hacker News APIs have been moved to a different open source package that can be found here [hackernews-swift-api](https://github.com/mattrighetti/hackernews-swift-api) + Minor changes to UI + Comments fetch is not limited to 10 threads at a time to limit bandwidth usage + A "more" button has been introduced at the bottom of the comments section that will fetch other comments
1 parent 2b15b85 commit 9659cc1

17 files changed

+447
-456
lines changed

HNReader.xcodeproj/project.pbxproj

+16-46
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,10 @@
1515
330718D415D21296AA14E7CA /* HackerNewsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33071291447141A6D31E671B /* HackerNewsTests.swift */; };
1616
330719203034BDB177F28C41 /* +DateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33071B0E5439D8D207CB68F4 /* +DateTests.swift */; };
1717
33071F1C64D4742E1F947FAA /* ItemDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33071D0E5913DB91DDDBDADB /* ItemDownloader.swift */; };
18+
C91636D626AB2EFE009CECFB /* HackerNews in Frameworks */ = {isa = PBXBuildFile; productRef = C91636D526AB2EFE009CECFB /* HackerNews */; };
1819
C93F99B6267554F00046F870 /* StoryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C93F99B5267554F00046F870 /* StoryCell.swift */; };
1920
C93F99B8267557FC0046F870 /* StoryList.swift in Sources */ = {isa = PBXBuildFile; fileRef = C93F99B7267557FC0046F870 /* StoryList.swift */; };
2021
C9B58794267C153C005E0A50 /* DetailStoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9B58793267C153C005E0A50 /* DetailStoryView.swift */; };
21-
C9B83DD426A8631300036AC6 /* Comment.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9B83DD326A8631300036AC6 /* Comment.swift */; };
22-
C9B83DD726A8637D00036AC6 /* Alamofire in Frameworks */ = {isa = PBXBuildFile; productRef = C9B83DD626A8637D00036AC6 /* Alamofire */; };
23-
C9B83DD926A863C000036AC6 /* Job.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9B83DD826A863C000036AC6 /* Job.swift */; };
24-
C9B83DDB26A863D000036AC6 /* Story.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9B83DDA26A863D000036AC6 /* Story.swift */; };
2522
C9B83DDF26A8808900036AC6 /* CommentCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9B83DDE26A8808900036AC6 /* CommentCell.swift */; };
2623
C9B83DE926A8A23C00036AC6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C9B83DE826A8A23C00036AC6 /* Assets.xcassets */; };
2724
C9B83DEB26A8A76800036AC6 /* +NSTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9B83DEA26A8A76800036AC6 /* +NSTextField.swift */; };
@@ -33,11 +30,8 @@
3330
C9D0938026741BBF002CC786 /* Persistence.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9D0937F26741BBF002CC786 /* Persistence.swift */; };
3431
C9D0938326741BBF002CC786 /* HNReader.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = C9D0938126741BBF002CC786 /* HNReader.xcdatamodeld */; };
3532
C9D0939A26741BC0002CC786 /* HNReaderUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9D0939926741BC0002CC786 /* HNReaderUITests.swift */; };
36-
C9D093AC26741C25002CC786 /* Item.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9D093AB26741C25002CC786 /* Item.swift */; };
33+
C9E4364426AAE5CF002377A5 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C9E4364326AAE5CF002377A5 /* GoogleService-Info.plist */; };
3734
C9E9BCFD2674C80E001B4E19 /* AppState.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9E9BCFC2674C80E001B4E19 /* AppState.swift */; };
38-
C9E9BCFF2674CB6C001B4E19 /* HackerNewsClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9E9BCFE2674CB6C001B4E19 /* HackerNewsClient.swift */; };
39-
C9E9BD012674D007001B4E19 /* HackerNews.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9E9BD002674D007001B4E19 /* HackerNews.swift */; };
40-
C9E9BD032674D095001B4E19 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9E9BD022674D095001B4E19 /* User.swift */; };
4135
/* End PBXBuildFile section */
4236

4337
/* Begin PBXContainerItemProxy section */
@@ -68,10 +62,8 @@
6862
33071EEBE46634E658582AE3 /* ItemTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ItemTests.swift; sourceTree = "<group>"; };
6963
C93F99B5267554F00046F870 /* StoryCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoryCell.swift; sourceTree = "<group>"; };
7064
C93F99B7267557FC0046F870 /* StoryList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoryList.swift; sourceTree = "<group>"; };
65+
C9505D3426AB2FAC00D2A27D /* HackerNews */ = {isa = PBXFileReference; lastKnownFileType = folder; name = HackerNews; path = ../HackerNews; sourceTree = "<group>"; };
7166
C9B58793267C153C005E0A50 /* DetailStoryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailStoryView.swift; sourceTree = "<group>"; };
72-
C9B83DD326A8631300036AC6 /* Comment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Comment.swift; sourceTree = "<group>"; };
73-
C9B83DD826A863C000036AC6 /* Job.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Job.swift; sourceTree = "<group>"; };
74-
C9B83DDA26A863D000036AC6 /* Story.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Story.swift; sourceTree = "<group>"; };
7567
C9B83DDE26A8808900036AC6 /* CommentCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommentCell.swift; sourceTree = "<group>"; };
7668
C9B83DE826A8A23C00036AC6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
7769
C9B83DEA26A8A76800036AC6 /* +NSTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "+NSTextField.swift"; sourceTree = "<group>"; };
@@ -90,19 +82,16 @@
9082
C9D0939526741BC0002CC786 /* HNReaderUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HNReaderUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
9183
C9D0939926741BC0002CC786 /* HNReaderUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HNReaderUITests.swift; sourceTree = "<group>"; };
9284
C9D0939B26741BC0002CC786 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
93-
C9D093AB26741C25002CC786 /* Item.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Item.swift; sourceTree = "<group>"; };
85+
C9E4364326AAE5CF002377A5 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../../../Downloads/GoogleService-Info.plist"; sourceTree = "<group>"; };
9486
C9E9BCFC2674C80E001B4E19 /* AppState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppState.swift; sourceTree = "<group>"; };
95-
C9E9BCFE2674CB6C001B4E19 /* HackerNewsClient.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HackerNewsClient.swift; sourceTree = "<group>"; };
96-
C9E9BD002674D007001B4E19 /* HackerNews.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HackerNews.swift; sourceTree = "<group>"; };
97-
C9E9BD022674D095001B4E19 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = "<group>"; };
9887
/* End PBXFileReference section */
9988

10089
/* Begin PBXFrameworksBuildPhase section */
10190
C9D0937026741BBE002CC786 /* Frameworks */ = {
10291
isa = PBXFrameworksBuildPhase;
10392
buildActionMask = 2147483647;
10493
files = (
105-
C9B83DD726A8637D00036AC6 /* Alamofire in Frameworks */,
94+
C91636D626AB2EFE009CECFB /* HackerNews in Frameworks */,
10695
);
10796
runOnlyForDeploymentPostprocessing = 0;
10897
};
@@ -171,6 +160,7 @@
171160
C9D0936A26741BBE002CC786 = {
172161
isa = PBXGroup;
173162
children = (
163+
C9505D3426AB2FAC00D2A27D /* HackerNews */,
174164
C9D0937526741BBE002CC786 /* HNReader */,
175165
C9D0938D26741BC0002CC786 /* HNReaderTests */,
176166
C9D0939826741BC0002CC786 /* HNReaderUITests */,
@@ -191,10 +181,10 @@
191181
C9D0937526741BBE002CC786 /* HNReader */ = {
192182
isa = PBXGroup;
193183
children = (
184+
C9E4364326AAE5CF002377A5 /* GoogleService-Info.plist */,
194185
C9B83DE826A8A23C00036AC6 /* Assets.xcassets */,
195186
C9D093AA26741BFD002CC786 /* HNClient */,
196187
C9D093A926741BF6002CC786 /* ViewModel */,
197-
C9D093A826741BF0002CC786 /* Model */,
198188
C9D093A726741BE1002CC786 /* View */,
199189
C9D0937626741BBE002CC786 /* HNReaderApp.swift */,
200190
C9D0937F26741BBF002CC786 /* Persistence.swift */,
@@ -246,18 +236,6 @@
246236
path = View;
247237
sourceTree = "<group>";
248238
};
249-
C9D093A826741BF0002CC786 /* Model */ = {
250-
isa = PBXGroup;
251-
children = (
252-
C9D093AB26741C25002CC786 /* Item.swift */,
253-
C9E9BD022674D095001B4E19 /* User.swift */,
254-
C9B83DD326A8631300036AC6 /* Comment.swift */,
255-
C9B83DD826A863C000036AC6 /* Job.swift */,
256-
C9B83DDA26A863D000036AC6 /* Story.swift */,
257-
);
258-
path = Model;
259-
sourceTree = "<group>";
260-
};
261239
C9D093A926741BF6002CC786 /* ViewModel */ = {
262240
isa = PBXGroup;
263241
children = (
@@ -270,8 +248,6 @@
270248
C9D093AA26741BFD002CC786 /* HNClient */ = {
271249
isa = PBXGroup;
272250
children = (
273-
C9E9BCFE2674CB6C001B4E19 /* HackerNewsClient.swift */,
274-
C9E9BD002674D007001B4E19 /* HackerNews.swift */,
275251
33071D0E5913DB91DDDBDADB /* ItemDownloader.swift */,
276252
33071CD8B451FE700B64F387 /* ItemCache.swift */,
277253
);
@@ -295,7 +271,7 @@
295271
);
296272
name = HNReader;
297273
packageProductDependencies = (
298-
C9B83DD626A8637D00036AC6 /* Alamofire */,
274+
C91636D526AB2EFE009CECFB /* HackerNews */,
299275
);
300276
productName = HNReader;
301277
productReference = C9D0937326741BBE002CC786 /* HNReader.app */;
@@ -369,7 +345,7 @@
369345
);
370346
mainGroup = C9D0936A26741BBE002CC786;
371347
packageReferences = (
372-
C9B83DD526A8637D00036AC6 /* XCRemoteSwiftPackageReference "Alamofire" */,
348+
C91636D426AB2EFE009CECFB /* XCRemoteSwiftPackageReference "HackerNews" */,
373349
);
374350
productRefGroup = C9D0937426741BBE002CC786 /* Products */;
375351
projectDirPath = "";
@@ -388,6 +364,7 @@
388364
buildActionMask = 2147483647;
389365
files = (
390366
C9B83DE926A8A23C00036AC6 /* Assets.xcassets in Resources */,
367+
C9E4364426AAE5CF002377A5 /* GoogleService-Info.plist in Resources */,
391368
C9D0937E26741BBF002CC786 /* Preview Assets.xcassets in Resources */,
392369
);
393370
runOnlyForDeploymentPostprocessing = 0;
@@ -414,26 +391,19 @@
414391
buildActionMask = 2147483647;
415392
files = (
416393
C9B83DEB26A8A76800036AC6 /* +NSTextField.swift in Sources */,
417-
C9D093AC26741C25002CC786 /* Item.swift in Sources */,
418394
C9D0938026741BBF002CC786 /* Persistence.swift in Sources */,
419395
C9D0937926741BBE002CC786 /* HomeView.swift in Sources */,
420396
C93F99B6267554F00046F870 /* StoryCell.swift in Sources */,
421397
C93F99B8267557FC0046F870 /* StoryList.swift in Sources */,
422398
C9E9BCFD2674C80E001B4E19 /* AppState.swift in Sources */,
423399
C9D0938326741BBF002CC786 /* HNReader.xcdatamodeld in Sources */,
424-
C9E9BD032674D095001B4E19 /* User.swift in Sources */,
425-
C9E9BCFF2674CB6C001B4E19 /* HackerNewsClient.swift in Sources */,
426400
C9B83DEF26A8AF4A00036AC6 /* +String.swift in Sources */,
427-
C9E9BD012674D007001B4E19 /* HackerNews.swift in Sources */,
428401
C9D0937726741BBE002CC786 /* HNReaderApp.swift in Sources */,
429402
330713D3016ED410AFD53FDF /* ItemListViewModel.swift in Sources */,
430-
C9B83DDB26A863D000036AC6 /* Story.swift in Sources */,
431403
330711A9216E762026AF98A0 /* +Date.swift in Sources */,
432404
C9B58794267C153C005E0A50 /* DetailStoryView.swift in Sources */,
433-
C9B83DD426A8631300036AC6 /* Comment.swift in Sources */,
434405
33071F1C64D4742E1F947FAA /* ItemDownloader.swift in Sources */,
435406
3307147AB95F03650FC40B97 /* ItemCache.swift in Sources */,
436-
C9B83DD926A863C000036AC6 /* Job.swift in Sources */,
437407
C9B83DDF26A8808900036AC6 /* CommentCell.swift in Sources */,
438408
C9B83DED26A8ACD000036AC6 /* LoadingCircle.swift in Sources */,
439409
);
@@ -769,21 +739,21 @@
769739
/* End XCConfigurationList section */
770740

771741
/* Begin XCRemoteSwiftPackageReference section */
772-
C9B83DD526A8637D00036AC6 /* XCRemoteSwiftPackageReference "Alamofire" */ = {
742+
C91636D426AB2EFE009CECFB /* XCRemoteSwiftPackageReference "HackerNews" */ = {
773743
isa = XCRemoteSwiftPackageReference;
774-
repositoryURL = "https://github.com/Alamofire/Alamofire.git";
744+
repositoryURL = "file:///Users/matt/Developer/HackerNews";
775745
requirement = {
776746
kind = upToNextMajorVersion;
777-
minimumVersion = 5.4.3;
747+
minimumVersion = 1.0.1;
778748
};
779749
};
780750
/* End XCRemoteSwiftPackageReference section */
781751

782752
/* Begin XCSwiftPackageProductDependency section */
783-
C9B83DD626A8637D00036AC6 /* Alamofire */ = {
753+
C91636D526AB2EFE009CECFB /* HackerNews */ = {
784754
isa = XCSwiftPackageProductDependency;
785-
package = C9B83DD526A8637D00036AC6 /* XCRemoteSwiftPackageReference "Alamofire" */;
786-
productName = Alamofire;
755+
package = C91636D426AB2EFE009CECFB /* XCRemoteSwiftPackageReference "HackerNews" */;
756+
productName = HackerNews;
787757
};
788758
/* End XCSwiftPackageProductDependency section */
789759

HNReader.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

+112-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,120 @@
22
"object": {
33
"pins": [
44
{
5-
"package": "Alamofire",
6-
"repositoryURL": "https://github.com/Alamofire/Alamofire.git",
5+
"package": "abseil",
6+
"repositoryURL": "https://github.com/firebase/abseil-cpp-SwiftPM.git",
77
"state": {
88
"branch": null,
9-
"revision": "f96b619bcb2383b43d898402283924b80e2c4bae",
10-
"version": "5.4.3"
9+
"revision": "fffc3c2729be5747390ad02d5100291a0d9ad26a",
10+
"version": "0.20200225.4"
11+
}
12+
},
13+
{
14+
"package": "BoringSSL-GRPC",
15+
"repositoryURL": "https://github.com/firebase/boringssl-SwiftPM.git",
16+
"state": {
17+
"branch": null,
18+
"revision": "734a8247442fde37df4364c21f6a0085b6a36728",
19+
"version": "0.7.2"
20+
}
21+
},
22+
{
23+
"package": "Firebase",
24+
"repositoryURL": "https://github.com/firebase/firebase-ios-sdk.git",
25+
"state": {
26+
"branch": null,
27+
"revision": "7e08e6e2948461493261049cefb6e77728cb3743",
28+
"version": "8.4.0"
29+
}
30+
},
31+
{
32+
"package": "GoogleAppMeasurement",
33+
"repositoryURL": "https://github.com/google/GoogleAppMeasurement.git",
34+
"state": {
35+
"branch": null,
36+
"revision": "06e74ef7ee7326e1af724d462091eed1e5c6fb4a",
37+
"version": "8.3.1"
38+
}
39+
},
40+
{
41+
"package": "GoogleDataTransport",
42+
"repositoryURL": "https://github.com/google/GoogleDataTransport.git",
43+
"state": {
44+
"branch": null,
45+
"revision": "9e79fd8deddbef5646fbb5dbb3eaf963e338f007",
46+
"version": "9.1.0"
47+
}
48+
},
49+
{
50+
"package": "GoogleUtilities",
51+
"repositoryURL": "https://github.com/google/GoogleUtilities.git",
52+
"state": {
53+
"branch": null,
54+
"revision": "beb713a16b50a4df3162b3f3ecdeffa16b74b773",
55+
"version": "7.5.0"
56+
}
57+
},
58+
{
59+
"package": "gRPC",
60+
"repositoryURL": "https://github.com/firebase/grpc-SwiftPM.git",
61+
"state": {
62+
"branch": null,
63+
"revision": "fb405dd2c7901485f7e158b24e3a0a47e4efd8b5",
64+
"version": "1.28.4"
65+
}
66+
},
67+
{
68+
"package": "GTMSessionFetcher",
69+
"repositoryURL": "https://github.com/google/gtm-session-fetcher.git",
70+
"state": {
71+
"branch": null,
72+
"revision": "424886f9336a71891aa81852d0c2c08d807d21aa",
73+
"version": "1.6.1"
74+
}
75+
},
76+
{
77+
"package": "HackerNews",
78+
"repositoryURL": "/Users/matt/Developer/HackerNews",
79+
"state": {
80+
"branch": null,
81+
"revision": "677384e7294f466193ac0af6a62bd28f182123dc",
82+
"version": "1.0.1"
83+
}
84+
},
85+
{
86+
"package": "leveldb",
87+
"repositoryURL": "https://github.com/firebase/leveldb.git",
88+
"state": {
89+
"branch": null,
90+
"revision": "0706abcc6b0bd9cedfbb015ba840e4a780b5159b",
91+
"version": "1.22.2"
92+
}
93+
},
94+
{
95+
"package": "nanopb",
96+
"repositoryURL": "https://github.com/firebase/nanopb.git",
97+
"state": {
98+
"branch": null,
99+
"revision": "7ee9ef9f627d85cbe1b8c4f49a3ed26eed216c77",
100+
"version": "2.30908.0"
101+
}
102+
},
103+
{
104+
"package": "Promises",
105+
"repositoryURL": "https://github.com/google/promises.git",
106+
"state": {
107+
"branch": null,
108+
"revision": "611337c330350c9c1823ad6d671e7f936af5ee13",
109+
"version": "2.0.0"
110+
}
111+
},
112+
{
113+
"package": "SwiftProtobuf",
114+
"repositoryURL": "https://github.com/apple/swift-protobuf.git",
115+
"state": {
116+
"branch": null,
117+
"revision": "1f62db409f2c9b0223a3f68567b4a01333aae778",
118+
"version": "1.17.0"
11119
}
12120
}
13121
]

0 commit comments

Comments
 (0)