Swift SDK for Contentful's Content Delivery API.
Contentful is a content management platform for web applications, mobile apps and connected devices. It allows you to create, edit & manage content in the cloud and publish it anywhere via powerful API. Contentful offers tools for managing editorial teams and enabling cooperation between organizations.
The Contentful Swift SDK hasn't reached 1.0, yet, but provides a much nicer API than using the Objective-C SDK from Swift. If you need some of the more advanced features, like offline persistence using Core Data, you have to stick to the Objective-C SDK for now. Check out our Swift example in this case.
let client = ContentfulClient(spaceIdentifier: "cfexampleapi", accessToken: "b4c0n73n7fu1")
client.fetchEntry("nyancat") { (result) in
switch result {
case let .Success(entry):
print(entry)
case .Error(_):
print("Error!")
}
}
For further information, check out the Developer Documentation.
The Contentful Swift SDK requires Swift 2.0 and therefore Xcode 7.
CocoaPods is a dependency manager for Swift, which automates and simplifies the process of using 3rd-party libraries like the Contentful Delivery API in your projects.
platform :ios, '9.0'
use_frameworks!
pod 'Contentful'
Copyright (c) 2014, 2015 Contentful GmbH. See LICENSE for further details.