bennyguitar / libHN

The definitive Objective-C library for adding HackerNews to your iOS/Mac app.
MIT License
150 stars 26 forks source link

Error after update 'data parameter is nil' #32

Closed themaz closed 9 years ago

themaz commented 9 years ago

Seeing this error:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'data parameter is nil'

Seems to be originating from HNManager.m, line 279

bennyguitar commented 9 years ago

I'm initializing it with [NSData data] instead of nil now, so hopefully this won't happen again. The configuration is pretty new and I haven't tested all avenues or edge cases yet. Do you know if you have the hn.json file in your bundle?

themaz commented 9 years ago

hn.json is indeed in my bundle.

Is your change setting line 261 to:

NSData *jsonData = [NSData data];

If so, I tried this & I still get the same error.

bennyguitar commented 9 years ago

I fixed the problem in 4.0.1 - it was because the hn.json file was added as a source file and not as a resource. Should be totally good now if you pod update to the newest version.