1.0 beta 7: Bringing OSX-y Back
Enhancements
- Siesta now supports
OS XmacOS. Core functionality all works; UI widgets are still iOS-only. Thanks to the indefatigable @onekiloparsec for seeing this through! (#27, #56) - Configuration can now distinguish between different HTTP methods. This allows, for example, different model mappings for GET and POST responses. (#54)
- Configuration pattern matching now supports
?
to match single characters. This makes it easier to distinguish/items/
(with a trailing slash) from/items/1
. (#55) - You can now pass
NSRegularExpression
as a pattern toService.configure(…)
methods. (#47) - It is now possible to create custom pre-request validation failures via
Resource.failedRequest(…)
. This allows custom pre-validation of requests before they touch the network. Thanks, @vdka! (#44, #50) - You can now limit the number of unused resources Siesta will keep in its internal cache. (#61, #31)
- Added
@warn_unused_result
and@noescape
where appropriate throughout the API. - The code GithubBrowser example project is now a bit tidier & a better Siesta example to work from.
- Example project now uses CocoaPods instead of Carthage, and works with
pod try
. (#58)
Fixes
- Fixed #35: nil-failable blocks passed to
configureTransformer
no longer return double optionals. - Fixed #52: JSON-like content containing non-JSON data no longer causes detailed logging to crash.
- Fixed: When a resource’s last extenernal owner was deallocated, it wasn’t deallocated until a second low memory event. It’s now deallocated on the first.
- Fixed Swift 2.2 deprecations.
Breaking Changes
-
The flavor of
Service.configure(...)
that takes a predicate closure now requires awhenURLMatches:
argument label:// Before service().configure({ $0.path.hasSuffix("foo") }) { ... } // After service().configure(whenURLMatches: { $0.path.hasSuffix("foo") }) { ... }
It was not possible to add a deprecation warning for this change because the deprecated form causes an ambiguous method overloading.
-
Because it only concerned calls bridged from Objective-C,
Error.Cause.InvalidRequestMethod
has moved out of the public Swift API and into the Objective-C bridging API. -
API elements deprecated in 1.0 beta 6 have now been removed.