The civilized way to write REST API clients for iOS / macOS
Resource.withParam(…)
no longer strips existing parameters whose value is blank. Thanks to @ligal for catching this one. (#222→#223)RemoteImageView.placeholderImage
was incorrectly marked as an @IBOutlet
, which served no useful purpose. It is now correctly marked as @IBInspectable
, which makes it possible to choose a placeholder image from the storyboard editor. Thanks to @aoge123 for pointing this out. (#220→#224):
as part of a URL path segment, per the HTTP spec. Thanks to @akaralar for discovering this one. (#212→#221)None.
A preview of Swift 4 support is available on the swift-4
branch. Please kick the tires and report any issues!
None.
A preview of Swift 4 support is available on the swift-4
branch. Kick the tires! Check out the example project on that branch for an example of using Swift 4’s JSON coding with Siesta.
RemoteImageView
now has a customizable per-view transform. Thanks @Alex293! (#131, #158)ResourceStatusOverlay
is now accessible from the outside to allow translation & customization. Thanks again, @Alex293. (#155, #158)Alamofire.DidResume
notifications. Thanks to @piv199 for tracking down this deeply buried one. (#163, #167)ResourceStatusOverlay
never to update when attached to a resource via Objective-C. (#173)None.
This is the official 1.0 release of Siesta.
Please spread the word. You shares, stars, endorsements, and suggestions help us make Siesta better.
Please let us know what you’re building. Hearing how Siesta is helping software teams succeed makes all the hard work worth it.
This release removes everything that was deprecated before 1.0.
If you hit compile errors when you upgrade to this release, trying using the pre-1.0-deprecations
tag first. That release will give you warnings and suggested renames that will help you migrate to 1.0.0.
ResourceStatusOverlay
now follows Swift 3 API conventions. (#143, #145)SiestaUI
helper lets resources automatically control the iOS network activity indicator in the status bar. Thanks to @Reedyuk for seeing this one through! (#132)repeated()
on a chained request now repeats the original request, not just the remainder of the chain. (#134)Error.Cause
members now use stronger types to report error details instead of just strings. (#138)BOSEntity.content
is now non-nullable just like its Swift counterpart Entity.content
. (#126)Workaround for Swift bug that sometimes caused self-owned observers to be prematurely deallocated. The workaround comes with a performance hit. Thanks to @kl for discovering this & vetting the fix. (#120, #121)
Please vote for the underlying Swift bug if you want that performance back!
Siesta would sometimes not call ResourceObserver.stoppedObserving(resource:)
when it should have. It now consistently calls it except in situations where it would be impossible to do so. (#122)
child(…)
, withParam(…)
, etc. (#115)InvalidURL
error cause makes them easy to spot & diagnose. Code such as RemoteImageView
that intentionally creates nil URL resources no longer generates mounds of confusing output.stoppedObservingResource:
(#118)isEquivalentTo(…)
method of ResourceObserver
is superseded by observerIdentity
. This is a little-known feature, but search your code for it! It is no longer part of the protocol, and you will not receive a deprecation warning if you are attempting to implement it. Instead, you’ll just start getting duplicate observers.stoppedObserving(…)
has changed. While the order of events reported by a Resource is still consistent — observer add & remove notifications still come in the order the observers were actually added & removed — some of those notifications are now deferred.This release moves Siesta to Swift 3. The future is here! The flying cars are no doubt imminent.
If your project needs to stick with Swift 2, use the swift-2.2
or swift-2.3
branch.
Siesta’s API has been renamed to adhere to the new Swift 3 naming guidelines (mostly, moderated by taste). You’re mostly likely to notice the lowercase enums and slight changes to parameter labels.
Siesta now also takes advantage of new language improvements. Gone is $0.config
, which was a hack to work around shortcomings in Swift 2’s inout
inference. You can now just use $0
in your configuration closures. Hooray!
For most of the renamings, you’ll see nice friendly deprecations with fixits — or at least helpful error messages. However, there are a few things the compiler will not help you with that you need to be careful of:
Three methods of ResourceObserver
with default implementations have new names to fit the new naming guidelines. Because they have default implementations, the Swift compiler will not give you any warning if you try to implement them using the old names; they will simply never be called.
You must search your code yourself for these old methods:
func resourceRequestProgress(resource: Resource, progress: Double)
func stoppedObservingResource(resource: Resource)
func isEquivalentToObserver(other: ResourceObserver) -> Bool
…and replace them with these new ones:
func resourceRequestProgress(for resource: Resource, progress: Double)
func stoppedObserving(resource: Resource)
func isEquivalentTo(observer other: ResourceObserver) -> Bool
To prevent a name clash, Siesta’s Error
is now called RequestError
. Most Siesta apps never reference this type directly. However, if yours does, it will now point at Swift’s internal Error
instead of Siesta’s, which will cause confusing error messages.
Entity
is now a generic type, Entity<T>
. You can safely change Entity
to Entity<Any>
to capture the old behavior. That includes your EntityCache
implementation.
_ =
; otherwise just wait for the next Swift release.Since this is the first release for Swift 3, it’s likely that there will be some bumps in the road. Please file issues and send pull requests for any breakages, broken doc links, or outdated sample code you find. And if things are working for you, please tweet to us at @siestaframework
and let us know the nifty things you’re building!