BAD_ACCESS

おもにiOS、ときどき変な電子工作、ガジェット話。

はじめてのC4!

最近気になっているiOS向けのframeworkについて手を出しついでに簡単にまとめてみます。

公式ページはこちらC4:http://www.c4ios.com/

あんまり日本語の記事を見ないので手探りではありますが、今回は概要の拙訳とHello Worldから。

なんて読むの?

おそらく"CocoaFor"と読むのではないでしょうか。

C4とは

Code, Creatively.

C4 is a brand new creative-coding framework lets you build expressive user experiences and create works of art. C4 gives you the power of the native iOS programming environment with a simplified API that lets you get down to working with media right away. Build artworks, design interfaces, explore new possibilities of working with media and interaction.

要はメディアの扱いに特化したiOS向けのフレームワークです。 openFrameworksのiOS版?といったところなのでしょうか。

To The New Ones

Creating an expressive, intuitive mobile application is hard work. C4 makes this simple by letting you build projects that already deal with a lot of boring stuff. You get to start creating gorgeous elements faster and with more ease than tackling app development on your own.

C4 will help you learn how to make things move and interact in a very short amount of time. It is designed to look and feel like a simpler version of Objective-C, so that when you're ready to venture out on your own, the step from build C4 apps to native mobile applications for iOS is tiny.

C4はObjective-C自体の複雑さを感じさせることなく、小さなステップでネイティブのアプリをつくることができます。 とにかく、つくりたいものをより早く、簡単に、ゴージャスにつくることができます。

To The Crazy Ones

If you're already a developer and you know the ins and outs of developing for mobile platforms C4 still has a lot to offer you. First, C4 approaches animation and interaction in a synthetic way so that all its media objects are consistent and similar. If you want to learn from the way we build things the API is open (you can grab it HERE). If you don't want to learn how we do things, but just get down to using the core API you can include a compiled C4 library in your own projects and take advantage of all the work we've been doing (you can pull the headers and the libC4.a file from a project built off of an Xcode template).

すでにモバイルでのアプリ開発に親しんでいる人であっても、C4から学べることは多いはず。 中身をもっと詳しく知りたい人はC4はすべてオープンになっているのでそこから色々調べていってもいいし、 とにかく手っ取り早く試したい人はライブラリごとプロジェクトにつっこんでビルドしてもいい。

Open Source

C4 is an open source project, hosted on GitHub. It has an MIT license, so it’s as open as possible.

C4のプロジェクトはGitHubにホストされていて、ライセンスはMITとなっているので、公開できるもの全てがOpen Sourceになっている。

ではさっそくHello World

C4をはじめるために以下の3つのものが必要になる。

  • Mac (OSX 10.9で試してます。)

  • Xcode (Xcode5.02で試してます。)

  • C4 (最新バージョンXcode5対応はこちらから)

今回はXcodeでの開発経験がある前提ではじめてのC4をすすめていく。

まずはC4のインストーラーを起動する。

 2013-11-20 1.04.03.png

インストール完了後、Xcodeを立ち上げる。

Xcodeの[File] > [New] > [Project...]を選択。

 2013-11-20 1.07.44.png

プロジェクトのテンプレートでC4が選択できるようになっている。

[C4 Single View Application]を選択し、適当なプロジェクト名をつけてプロジェクトを作成。

 2013-11-20 1.10.29.png

プロジェクトをビルドしてエラーが出ずに無事にシミュレーター上に以下のスプラッシュが表示されればひとまずは成功です。

iOS_2013.11.20 1.14.10.png

次回以降で、C4のサンプルを試しながら何か作っていこうと思います。

C4をはじめるにあたってfollowすべきアカウント一覧

GitHub

C4Framework

Travis Kirton

Twitter

@CocoaFor

@postfl