luisobo / Nocilla

Testing HTTP requests has never been easier. Nocilla: Stunning HTTP stubbing for iOS and Mac OS X.
https://twitter.com/luisobo
MIT License
1.84k stars 172 forks source link

LSNSURLSessionHook throws NSInternalInconsistencyException on iOS 8 as load method unable to instantiate class __NSCFURLSessionConfiguration #74

Closed nikita-leonov closed 9 years ago

nikita-leonov commented 10 years ago

Apparently __NSCFURLSessionConfiguration is not available in iOS 8 as - (void)swizzleSelector:(SEL)selector fromClass:(Class)original toClass:(Class)stub called with nil, that cause throwing of exception.

nikita-leonov commented 10 years ago

Ok, I just found pull request #70 that should be ok for me. Looking forward for normal release with this pull request included.

darend commented 10 years ago

Is there an ETA to make a release that incorporates this?

sansari commented 10 years ago

I'm wondering the same thing... Just got XCode 6 and all tests now fail with this exception. Any updates on it?

sansari commented 10 years ago

Looks like it was pulled into master yesterday, but the Cocoapods spec file is still at the 0.8.1 version from 8 months ago

luisobo commented 10 years ago

This is correct. I'm kinda busy right now. You can point to :head in your Podfile and that will do the trick. I'm hoping to spend some time with this early next week.

Best

El jueves, 11 de septiembre de 2014, Salman Ansari notifications@github.com escribió:

Looks like it was pulled into master yesterday, but the Cocoapods spec file is still at the 0.8.1 version from 8 months ago

— Reply to this email directly or view it on GitHub https://github.com/luisobo/Nocilla/issues/74#issuecomment-55325449.

squarefrog commented 10 years ago

@luisobo if you have someone you trust, you can add them as an author to your Cocopod using trunk. That way if you are busy they can always submit the new Pod for you. There are some security features, like for example if you attempt to change the repo location the Pod will be reject. It should be pretty safe.

Give me a shout or any of the Cocoapods Core Team if you'd like more advice.

shortstuffsushi commented 10 years ago

Hi all,

Not sure what the status is on this, but I pulled the most recent version from Github (including the #70 fix), and I'm still getting the following error: failed: caught "NSInternalInconsistencyException", "Couldn't load NSURLSession hook."

In my environment (XCode 6, iOS 8.0 Simulator, Deployment Target 7.0), the class __NSCFURLSessionConfiguration doesn't seem to exist. The NSURLSessionConfiguration does though, and with that replaced, the tests are succeeding.

Any thoughts?

Legoless commented 10 years ago

I have the same situation, still cannot get through this. Any more information available on this issue?

squarefrog commented 9 years ago

This pull seemed to fix it for me https://github.com/luisobo/Nocilla/commit/761efceaaf351be76c5bae999cf26f9acfb5925f

shortstuffsushi commented 9 years ago

Yes, that would fix the issue. Does @luisobo have plans to release a newer version of Nocilla to Cocoapods at some point? Seems the last release was at the end of January, and there have been a number of changes since then.

danilNil commented 9 years ago

I got same issue and pull request fix that. I just wanted to add one more comment to encourage @luisobo to merge that PR.

luisobo commented 9 years ago

0.8.2 released. :tada:

squarefrog commented 9 years ago

:balloon:

shortstuffsushi commented 9 years ago

Thanks Luis :+1:

danilNil commented 9 years ago

Thanks!