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 OHHTTPStubsDescriptor
has 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 ofOHHTTPStubs
toNSURLSession
) is now done in the+load
method of anNSURLSessionConfiguration
category, to be sure it is loaded (and swizzled) only once, even ifOHHTTPStubs
is loaded by two different bundles.- The stubs activation of
NSURLSessionConfiguration
no longer usesobjc_getClass
but uses a call to theOHHTTPStubs
class instead, which ensure that it uses the correctOHHTTPStubs
class 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.URL
isnil
(#39) - Fixed missing
-ObjC
flag 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, asNSURLSession
was not available then)
3.0.1
Now
OHHTTPStubs
automagically works withNSURLSessionConfiguration
without the need to enable it for everyNSURLSessionConfiguration
before creating theNSURLSession
: thedefaultSessionConfiguration
andephemeralSessionConfiguration
are 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
.