Git Product home page Git Product logo

contentfulxcodeplugin's Introduction

Contentful Xcode Plugin

Xcode plugin for generating Core Data models from Contentful content models.

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.

Installation

Step 1. Update Git submodules:

git submodule update --init --recursive

Step 2. Update Pods:

pod update

Step 3. Xcode > Product > Build

Building the "ContentfulPlugin" scheme will build and install the plugin.

Alternatively, download a binary build from the "releases" section and place it into $HOME/Library/Application Support/Developer/Shared/Xcode/Plug-ins, then restart Xcode.

The plugin is compatible with Xcode 7.3.1 on OS X 10.11.

Usage

The plugin adds a new "Generate Model from Contentful..." item to the "Product" menu.

This will bring up a dialog where, after providing your CMA access token, you will be able to select a space and a target from your Xcode project.

Using this information, a Core Data model for use with our CoreDataManager class will be generated and added to the specified target. The file itself will reside in the "Resources" group or in the root if that doesn't exist.

Keep in mind that your own NSManagedObject subclasses will still need to conform to the CDAPersistedAsset, CDAPersistedEntry and CDAPersistedSpace protocols as before. You will not need to provide a mapping between your content model and Core Data anymore, though, as this is derived automatically if field and property names match.

It is also required that you add content type validations for any links in your content model, as links in Core Data are always typed. If you require one link field to refer to entries of different content types, your model cannot be represented by Core Data and therefore the model generation will fail.

You can also use the model generator from the commandline:

ContentfulModelGenerator generate \
	--spaceKey=$CONTENTFUL_SPACE_KEY \
	--accessToken=$CONTENTFUL_MANAGEMENT_API_ACCESS_TOKEN

License

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

contentfulxcodeplugin's People

Contributors

neonichu avatar richarddas avatar pxlpnk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.