Releases: AliSoftware/OHHTTPStubs
Fixed initializers KVO risk
- Fix #66: Use the ivar directly in initialization
Avoid Content-Length header override
Fixing some crashes
OHHTTPStubsDescriptor protocol now inherits NSObject protocol
Only change in the API:
@protocol OHHTTPStubsDescriptorhas been changed to@protocol OHHTTPStubsDescriptor <NSObject>.
Fixing #47 : Stubs not called when using Application/UI Tests
Fixing issue #47 when stubs were not called, especially when the OHHTTPStubs pod were loaded both by the application AND the test target in the Podfile (thus loaded in both the app and test bundle).
See also the dedicated article: A tricky case with Application Tests.
In details:
NSURLSessionConfiguration's swizzling (to add automatic support ofOHHTTPStubstoNSURLSession) is now done in the+loadmethod of anNSURLSessionConfigurationcategory, to be sure it is loaded (and swizzled) only once, even ifOHHTTPStubsis loaded by two different bundles.- The stubs activation of
NSURLSessionConfigurationno longer usesobjc_getClassbut uses a call to theOHHTTPStubsclass instead, which ensure that it uses the correctOHHTTPStubsclass in the current bundle instead of always using the one loaded from the main bundle.
Mac framework target
- Adding Mac framework & Mac Test Target (#44)
- Adding known limitations in README
3.0.2
- Fixed issue with cookies when
request.URLisnil(#39) - Fixed missing
-ObjCflag in Unit Tests target (that made it unable to call category methods) - Fixed Unit Tests on iOS6 (
NSURLSession-related Unit Tests now only executed when run on iOS7+ or OSX10.9+, and skipped if targeted for an earlier OS version, asNSURLSessionwas not available then)
3.0.1
Now
OHHTTPStubsautomagically works withNSURLSessionConfigurationwithout the need to enable it for everyNSURLSessionConfigurationbefore creating theNSURLSession: thedefaultSessionConfigurationandephemeralSessionConfigurationare now preconfigured automatically to work withOHHTTPStubs)
3.0.0 — Removed deprecated API
- Removed deprecated methods.
The Old API has now totally disappeared, leaving only a clean and simple API without the spam due to old deprecated methods.
Note: If you have already removed the calls to all OHHTTPStubs deprecated API in your code, you can switch to this 3.0.0 version without any further changes in your code.
This release drops the deprecated API that was still around and was obsolete since the new API introduced in 2.x.