-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
I was trying out the 2.0-beta1 branch, when i came across this. It seems is not possible to get comments from a link.
What i wanted to do was something simple : pick a subreddit and try to get the comments of the stories on the subreddit's homepage.
[[RKClient sharedClient] subredditWithName:@"explainitlikeim5" completion:^void(id object, NSError* error){
if (!error) {
RKSubreddit *eli5 = object;
[[RKClient sharedClient] linksInSubreddit:eli5 pagination:nil completion:^void(NSArray *collection, RKPagination *pagination, NSError *error){
if(!error){
for (RKLink *link in collection) {
toLoad++;
[[RKClient sharedClient] commentsForLink:link completion:^(NSArray *comments, NSError *error) {
if (comments)
{
NSLog(@"Comments: %@", comments);
}
toLoad--;
if(toLoad == 0){
[self dispatchFetchComplete];
}
}];
}
}else{
[self dispatchError:error];
}
}];
}else{
[self dispatchError:error];
}
}];
This crashes with
2015-07-14 16:35:14.404 reli5[10672:205545] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'score is not a property of RKComment.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010a822c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010a4bbbb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010a822aca +[NSException raise:format:arguments:] + 106
3 Foundation 0x0000000109e3a98f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 reli5 0x00000001099e8af7 -[MTLJSONAdapter initWithModelClass:] + 1447
5 reli5 0x00000001099e7697 +[MTLJSONAdapter modelOfClass:fromJSONDictionary:error:] + 103
6 reli5 0x000000010998c207 +[RKObjectBuilder objectFromJSON:] + 375
7 reli5 0x000000010998068c -[RKClient(Requests) objectsFromListingResponse:] + 924
8 reli5 0x000000010997d047 __64-[RKClient(Requests) listingTaskWithPath:parameters:completion:]_block_invoke_2 + 183
9 libdispatch.dylib 0x000000010c0f9186 _dispatch_call_block_and_release + 12
10 libdispatch.dylib 0x000000010c118614 _dispatch_client_callout + 8
11 libdispatch.dylib 0x000000010c102552 _dispatch_root_queue_drain + 1768
12 libdispatch.dylib 0x000000010c103b17 _dispatch_worker_thread3 + 111
13 libsystem_pthread.dylib 0x000000010c485637 _pthread_wqthread + 729
14 libsystem_pthread.dylib 0x000000010c48340d start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels