All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning starting from 1.x releases.
All recent changes are published
4.2.0
Releases - 4.2.0 | 4.2.1 | 4.2.2 | 4.2.3 | 4.2.4 | 4.2.54.1.0
Releases - 4.1.0 | 4.1.34.0.0
Releases - 4.0.0 | 4.0.1
1.0.0
Releases - 1.0.0 | 1.0.11.0.0-betax
Releases - 1.0.0-beta1 | 1.0.0-beta2 | 1.0.0-beta3 | 1.0.0-beta4 | 1.0.0-beta5
0.10.x
Releases - 0.11.00.10.x
Releases - 0.10.0 | 0.10.1 | 0.10.20.9.x
Releases - 0.9.0 | 0.9.1 | 0.9.2 | 0.9.30.8.x
Releases - 0.8.00.7.x
Releases - 0.7.0 | 0.7.1 | 0.7.2 | 0.7.3 | 0.7.4 | 0.7.5 | 0.7.6 | 0.7.70.6.x
Releases - 0.6.0 | 0.6.10.5.x
Releases - 0.5.00.4.x
Releases - 0.4.0 | 0.4.10.3.x
Releases - 0.3.0 | 0.3.1
Released on 2020-02-18
- Setting build for external distribution
Released on 2018-12-27
- A bug in which one-to-many links could become out-of-order in #253 by @chrisozenne.
Released on 2018-12-06
- Check for protocol conformance when fetching an
EntryDecodable
by id that prevented links from being resolved.
Released on 2018-12-02
- Compiler handling of chainable query methods by adding
@discardableResult
to some methods it was missing from
Released on 2018-11-22
- All reference documentation has been improved.
Released on 2018-11-13
- A
ContentfulLogger
singleton which will log messages to the console.ContentfulLogger
can be configured with aCustomLogger
in order to use any third-party logging frameworks of your choice.
Released on 2018-11-08
4.1.1
,4.1.2
, and4.1.3
are all hotfix releases that fixed small corruptions in the Xcode project configuration.4.1.3
specifically sets the deployment version on the macOS target, even though the correct deployment version was set on the macOS framework target.
Released on 2018-11-06
- The
RichTextDocument
type which can be used inEntryDecodable
instances as a field type corresponding to rich text fields in Contentful.
- Support for iOS 8.
Released on 2018-10-25
- This release ensures that CI runs on Xcode 10 with Swift 4.2
Released on 2018-10-24
- BREAKING:
Interstellar
has been removed as a dependency of the SDK and the SDK now has its ownResult
type. If you were relying on fetch methods that returned anObservable
, you will need to update your code. - BREAKING: The syntax for many of the fetch methods on
Client
have changed. Refer to the v4 migration guide. - BREAKING:
EntryQueryable
has been renamedFieldKeysQueryable
, the required associated typeFields
has been renamedFieldKeys
to accurately reflect the type's real usage. - BREAKING:
MixedMappedArrayResponse
has been renamedMixedArrayResponse
.
- Base fetch methods for fetching data, or fetching data and deserializing any type conforming to
Swift.Decodable
have been exposed so that SDK usage is more flexible for various development strategies. Endpoint
enum andEndpointAccessible
protocol for clarity on endpoints available through the APIs and which resource types are returned from said endpoints.ResourceQueryable
protocol, whichAsset
,Entry
,ContentType
conform to; it enables querying and filtering on the API for conforming types.FlatResource
protocol which can be used if you prefer to have allsys
properties on the top level of yourEntryDecodable
. AllResource
types have a default implementation ofFlatResource
so refactoring is opt-in.
- The
DataDelegate
protocol has been removed in favor of directly fetching rawData
on your own. If you want to store JSON to disk, simply fetch it and do what you like. - The
EntryModellable
protocol is now gone. Just useEntryDecodable
.
Released on 2018-08-24
A retain cycle due to the fact that the URLSession
owned by Client
was not invalidated on client deallocation. Thanks to @edwardmp for identifying the issue and submitting a fix in #226.
Released on 2018-08-22
- A critical bug that caused the
fetchLocales(then:)
method to not pass the correct error back to it's completion handler. This bug would, for example, incorrectly pass back anSDKError
if internet connection dropped rather than passing back the properNSErrror
from Foundation.
Released on 2018-08-10
Query
andQueryOn
methods for finding entries which reference another entry (byid
) with a specific linking field.
Released on 2018-07-30
- BREAKING: PNGs can now be retrieved with
.standard
or.eight
bits as an additionalImageOption
to request PNGs from the Images API.
- Now all error responses from the API will fallback to seraializing an
SDKError
if the SDK is unable to serialize anAPIError
- BREAKING: Configuring a
Client
to interface with Content Preview API is no longer done through theClientConfiguration
type. Instead, passhost: Host.preview
to theClient
initializer. Also, you can now configure the client to use any arbitrary string host if you have whitelisted via your plan in Contentful.
Released on 2018-07-30
- Accessing fields on assets was not respecting fallback chain logic when assets were requested with a multi-locale format. This is now fixed.
Released on 2018-06-13
- An additional configuration option,
timeZone
on theClientConfiguration
to specify whichTimeZone
should be used when normalizing dates returned by the API. The default timezone is 0 seconds offset from GMT which enables serializing the exact representation the API returns rather than transforming to the current system time.
Released on 2018-04-27
- Support for using the
/sync
endpoint on non-master environments.
Released on 2018-04-16
- Typed queries prepending "fields" two times when using the select operator. Thanks to @cysp for submitting the fix in #169.
- Assets that contained media files that were not images failed to deserialize the metadata about the file properly.
null
values that were present for fields were being stored in dictionaries as a Bool with a value oftrue
. Now these values are omitted from the dictionary. The handling ofnull
values in JSON arrays has also been improved.- Date formats supported by the Contentful web app that were previously not being deserialized by the SDK's JSONDecoder
- Support for the new Environments
- Locales are now a property of
Client
and can be fetched on their own with thefetchLocales
methods. AssetProtocol
to enable data fetches for other asset data types.
- BREAKING: Upgrades project to Swift 4.1 and Xcode 9.3
- BREAKING: The interface for synchronization has been simplified.
initialSync
andnextSync
have been replaced withsync
with a default argument of an empty sync space to start an initial sync operation. - BREAKING: The SDK provided methods for creating a new
Swift.JSONDecoder
and updating it with locale information of your space or environment has changed. - BREAKING: The
LocalizationContext
property ofSpace
has been moved and is now a property ofClient
. - BREAKING:
ResourceQueryable
has been renamedEntryQueryable
for correctness and consistency.
Released on 2017-01-31
String
extension to generate an image url that didn't always prepend the "https" scheme to the url.
Released on 2017-01-25
- Support for the new query parameters to find incoming links to a specific entry or to a specific asset in a space.
- Shared
static
localization context on theClient
which caused issues if a new client connected to a different space was instantiated. - HTTP status codes not being exposed.
Released on 2017-01-09
- Instance method for mutating a query by appending a
LinkQuery
- When generating a url from the helper methods that append
ImageOptions
, the 'https' scheme will always be applied. - The
Location
type is now an Objective-C that conforms to NSCoding class so that it may be stored in CoreData as an attribute on anNSManagedObject
Released on 2017-12-19
- Accessibility identifiers for the
width
andheight
properties of theImageInfo
for anAsset
are now public so they can be used. Thanks to @ErikLuimes for the pull request: #157
Released on 2017-11-27
- Issue where
true
would be decoded toInt
with value1
when decoding JSON to[String: Any]
. The SDK now attempts to decodeBool
beforeInt
to prevent this error.
Released on 2017-11-03
- Deprecation warnings that appeared starting with Xcode9.1
- Incorrect assertion that asserted that all link were resolved since it is possible for unresolvable links to retured from CDA
- If an entry was of a content type not known to the
Client
, the SDK would enter an infinite loop.
Released on 2017-10-24
No more breaking changes will be made before 1.0.0 release. Following this point, the project will strictly adhere to Semantic Versioning.
ResourceQueryable
protocol to enable safer queries via theQueryOn
query type.SyncSpace.SyncableType
enum for specifying which Contentful types should be synced.- A description property to
ContentType
- A
ContentTypeQuery
for syncing content types. ArrayResponseError
type as a member of all array responses to inform you when your links are not resolvable because the target resources are unpubished.
- All Error types now have better debug descriptions so that the most relevant info is given to you while debugging.
- Multiple link resolution callbacks can now be stored for one link in case multiple entries are linking to the same resource.
- BREAKING: The helper methods for resolving links on the fields JSON container no longer requires passing in the current locale.
- BREAKING: The parameter names have been made consistent accross all fetch method names. The parameter signatures for all fetch methods are now:
(matching:then:)
. - BREAKING: All query initializers have been changed to static methods so that the syntax exactly matches the syntax of the instance methods.
- BREAKING: Various methods for creating and mutating queries no longer
throw
errors and so the need to call them in ado
catch
block has been obviated. - BREAKING:
QueryOperation
is now calledQuery.Operation
.
- BREAKING: All fetch methods that previously took dictionary arguments have been removed. Use fetch methods that take query types instead.
- BREAKING: Now unnecessary
QueryError
s.
Released on 2017-10-10
- BREAKING:
EntryModellable
is now calledEntryDecodable
and extendsDecodable
from the Swift 4 Foundation standard library. There are convenience methods for deserializing fields in the "fields" container for an entry. - BREAKING: The
MappedContent
type no longer exists. If requesting heterogeneous collections (by hitting "/entries" with no query paramters for intance), you will get aResult<MixedMappedArrayResponse>
and it is up to you to filter the array by the contained types.
- #132
EntryDecodable
not synthesizing arrays of links - #133
EntryDecodable
not allowing properties that are implicit optionals
Released on 2017-10-06
- Compile error due to incorrect protection level setting
Released on 2017-10-03
- API for retreiving a JSONDecoder from the SDK and configuring it with localization information from your Contentful space.
- Array's of links not being decoded.
Released on 2017-10-02
- BREAKING: The project is now compiled using Swift 4 and therefore must be developed against with Xcode 9. Backwards compatibility with Swift 3 is not possible as the SDK now uses Swift 4 features like JSON decoding via the
Decodable
protocol in Foundation. - BREAKING:
CLLocationCoordinate2D
has been replaced withLocation
type native to the SDK so that linking with CoreLocation is no longer necessary. If you have location enabled queries, you'll need to migrate your code. •Resource
is now a protocol and is no longer the base class forAsset
andEntry
.LocalizableResource
is the new base class. - ObjectMapper has been pruned and is no longer a dependency of the SDK. If managing your dependencies with Carthage, make sure to manually remove ObjectMapper if you aren't using it yourself.
Released on 2017-09-08
- Ensured all functions and instance members had an explicit protection level set.
- Xcode 8 and 9 are now tested on Travis CI for iOS, macOS, and tvOS in a matrix build. You can now rest easy knowing that if you are developing for one of these platforms, the SDK will work for you!
- The Swift playground has been migrated from it's former home to live here, with the main SDK. Instructions have been added to the README.
DataDelegate
protocol to receive callbacks from SDK which contain rawData
from fetches to the API.
Released on 2017-08-16
- Corrupt reference to AppKit extensions in xcodeproj which prevented compilation on macOS. In order to prevent future regressions, travis now runs unit tests for tvOS and macOS.
- Initializer for
ContentModel
which was implicitlyinternal
. The initializer is now exposed as public.
- Convenience methods for extracting typed values, including
Entry
s andAsset
s, fromfields
dictionaries. - Ability to make
Query
s on specific content types without conforming toEntryModellable
.
Released on 2017-08-11
- Support for installation via Swift Package Manager
Released on 2017-08-09
- BREAKING:
Modellable
protocol now splits mapping of regular (non-relationship) fields, and link fields into two separate methods.
- #108 circular link references causing recursive loops. Also, duplicate objects being mapped by the system is now fixed. Thanks to @AntonTheDev for help scoping the fix.
Released on 2017-07-26
- Project configuration so that contentful.swift may be built from source without warnings. Thanks to @brentleyjones for the help and guidance. Implications for this change are that:
- Dependencies are still managed with carthage but with the
--use-submodules
flag and the source (i.e. Carthage/Checkouts) is now tracked in git - Now travis doesn't install carthage or use it at all to build the project and Contentful.xcodeproj framework search paths are cleared.
- Dependencies are still managed with carthage but with the
- #100 enabling the usage of contentful.swift in app extensions.
- The previously private
persistenceIntegration
instance variable is now apublic var
which means it can be set anytime afterClient
initialization.
Released on 2017-07-24
String
extension methods to generate urls for the Contentful Images API.
Released on 2017-07-19
Released on 2017-07-18
- Simplified and optimized sending messages to types conforming to
PersistenceIntegration
.
Released on 2017-07-17
- Deleted Links in Contentful that were not propagating to CoreData as nullfied managed relationships.
Released on 2017-07-17
- Delta messages from
/sync
endpoint were only being sent for last page when a sync was returned on multiple pages.
Released on 2017-07-12
LocalizationContext
is now a public variable onSpace
so that SDK consumers can direclty initializeEntry
orAsset
instances from bundled JSON.
Released on 2017-06-20
- Delta messages were not always forwarded to
PersistenceIntegration
when callingClient.nextSync()
andClient.initialSync()
in #71
Released on 2017-06-19
- BREAKING: Subsequent sync is now a method on the
Client
callednextSync
rather than being a method onSyncSpace
.
PersistenceIntegration
protocol.Client
can now be initialized with apersisistenceIntegration
which will receive messages whenAsset
s &Entry
s are ready to be transformed to a persistable format and cached in persistent store such as CoreData. Note that this only works for theinitialSync
andnextSync
operations.- The
updatedAt
andcreatedAt
properties of theSys
type are now stored asDate
objects instead of asString
s. Integration
protocol to append information about external integrations to Contentul HTTP user-agent headers.- A
ContentModel
type used to contain mappedContentModellable
(user-defined types) instances rather thanEntry
&Asset
s. - Support for
initialSync
when using the Content Preview API.
Released on 2017-06-12
ImageOption
that changed background using `Fit.pad(with: Color) now generates the correct URL.- Build error for watchOS caused by file from test target being added to watch target.
Released on 2017-06-12
- Support for mirroring API fallback locale logic in the SDK for scenarios when all locales are returned (i.e. when using the
/sync
endpoint or specifinglocale=*
) - Support for HTTP rate limit headers
- Unintentionally triggered Swift errors that were thrown during JSON deserialization.
- Fixed by @loudmouth in #71
- Crash when using contentful-persistence.swift caused by missing
defaultLocale
property: Issue #68 and #65- Fixed by @sebastianludwig and @tapwork in #70.
Released on 2017-05-31
- Better support and Swifty API for Images API.
Released on 2017-05-23.
- Potential crash during sync callback due to unretained
SyncSpace
instance
Released on 2017-05-18.
- Swift'ier API for Contentful Delivery API Search Parameters
- Mechanism for mapping responses to user-defined Swift types when using
QueryOn
queries. - Improved link resolving via the new
Link
type - Swift 3.1, Xcode 8.3 support.
- BREAKING:
Contentful.Array
is now calledArrayResponse
to avoid clashing with native Swift arrays. - BREAKING:
fetch
methods no longer return tuples of(URLSessionTask?, Observable)
and now simply return the observable.
Released on 2017-02-03.
- Support for installation via Carthage on all of iOS, macOS, tvOS, & watchOS.
Released 2017-01-08.
- BREAKING: Upgrade to Swift 3 and Xcode 8. Versions of Swift < 3 and Xcode < 8 no longer supported.