Skip to content

ale13jo/contentful.swift

 
 

Repository files navigation

contentful.swift

Build Status Coverage Status codebeat badge

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.

Usage

let client = Client(spaceIdentifier: "cfexampleapi", accessToken: "b4c0n73n7fu1")
client.fetchEntry("nyancat") { (result) in
    switch result {
        case let .Success(entry):
            print(entry)
        case .Error(_):
            print("Error!")
    }
}

Documentation

For further information, check out the Developer Documentation.

Installation

The Contentful Swift SDK requires Swift 2.0 and therefore Xcode 7.

CocoaPods

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'

License

Copyright (c) 2014, 2015 Contentful GmbH. See LICENSE for further details.

About

A delightful Swift interface to Contentful's content delivery API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 95.0%
  • Ruby 4.2%
  • Makefile 0.8%