rnystrom / hackernewsreader Goto Github PK
View Code? Open in Web Editor NEWA small, read-only app for Hacker News.
A small, read-only app for Hacker News.
just crash when to open it , even can't get into the main screen.
the iOS is 13.1.2 .
and not only me ,i think many people have the same problem.
Main Thread Checker detected invalid usage of UIKit on a background thread:
Classes/ViewControllers/HNCommentViewController.m:
runtime: UI API called from background thread: -[UIView bounds] must be used from main thread only
Inside of [dataCoordinator:didUpdateObject:]
CGFloat width = CGRectGetWidth(self.view.bounds) - insets.left - insets.right;
I'm getting a crash (on a fresh copy built from source) when tapping on a link in the comments that leads to another comment (e.g. something like https://news.ycombinator.com/item?id=10313519). Here's the console output I get:
2017-01-02 12:21:52.161 HackerNewsReader[16004:213228] Nodes was nil.
2017-01-02 12:21:52.162 HackerNewsReader[16004:213228] Nodes was nil.
2017-01-02 12:21:52.164 HackerNewsReader[16004:213228] *** Assertion failure in -[HNFeedParser postFromTitleNode:detailNode:rank:queries:], /Users/saagarjha/Downloads/HackerNewsReader/HackerNewsReader/Classes/Networking/HNFeedParser.m:46
2017-01-02 12:21:52.168 HackerNewsReader[16004:213228] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: titleNode != nil'
*** First throw call stack:
(
0 CoreFoundation 0x00000001083d1d4b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000107e3321e objc_exception_throw + 48
2 CoreFoundation 0x00000001083d5e42 +[NSException raise:format:arguments:] + 98
3 Foundation 0x00000001079c866d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 HackerNewsReader 0x0000000106ffb2f5 -[HNFeedParser postFromTitleNode:detailNode:rank:queries:] + 405
5 HackerNewsReader 0x0000000106fe47ca -[HNPageParser parseDataFromResponse:queries:] + 970
6 HackerNewsReader 0x0000000107004ec1 __37-[HNDataCoordinator fetchWithParams:]_block_invoke_2 + 561
7 HackerNewsReader 0x0000000106fe8aee __40-[HNService fetchParameters:completion:]_block_invoke + 158
8 HackerNewsReader 0x0000000106fe9483 __54-[HNService performRequest:withParameters:completion:]_block_invoke.77 + 243
9 CFNetwork 0x000000010ab7dccc __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 19
10 CFNetwork 0x000000010ab7d578 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 308
11 Foundation 0x00000001079359ad __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
12 Foundation 0x000000010793568f -[NSBlockOperation main] + 101
13 Foundation 0x0000000107933d8c -[__NSOperationInternal _start:] + 672
14 Foundation 0x000000010792fccf __NSOQSchedule_f + 201
15 libdispatch.dylib 0x000000010bbb00cd _dispatch_client_callout + 8
16 libdispatch.dylib 0x000000010bb8de17 _dispatch_queue_serial_drain + 236
17 libdispatch.dylib 0x000000010bb8eb4b _dispatch_queue_invoke + 1073
18 libdispatch.dylib 0x000000010bb91385 _dispatch_root_queue_drain + 720
19 libdispatch.dylib 0x000000010bb91059 _dispatch_worker_thread3 + 123
20 libsystem_pthread.dylib 0x000000010bf5f712 _pthread_wqthread + 1299
21 libsystem_pthread.dylib 0x000000010bf5f1ed start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Since this doesn't happen in the App Store version, I'm guessing that one of the Pods broke something when it updated.
It appears that HackerNewsReader caches the comments from every post–however, I don't see any way that this cache is cleared. Is this the intended behavior? I'm asking because the app's "Documents and Data" (i.e. the comments cache) has ballooned to around 30 megabytes and contains the comments from over 800 posts.
Seems like when hidesBarsOnSwipe
and hidesBarsOnTap
is true on the nav controller and therefore the bars are hidden in the HNWebViewController
it's not possible to swipe back anymore.
On that note, I think the most straightforward way would be to push through with the SFSafariViewController(#12) as imho it would be a better web experience in general.
Web content "hidden" status bar view is laid out wrong when changing orientations.
Link to the issue.
Upon inspecting the response from hacker news, it does look like it's successfully returning the correct HTML.
I feel like this may have something to do with the new features released today.
Be able to favorite posts. Add a new tab w/ a collection of favorites. We should store posts on disk (but not comments or web content). Then when you tap on them we load content. After loading content, we should update the local version of the post and store the new version on disk.
missing some header file
UIViewController+STORYBOARD.h
HNABOUTCONTROLLER.h
We should have user profiles that you can view by tapping on the user headers in comments. Also need to figure out the appropriate way to tap on a user from the post they submitted.
Profiles should have:
This would be great, although we would lose the comment button 😅
UISearchDisplayController
with UISearchController
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.