Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

iOS/Mac OS framework for Rails

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 autogen
Octocat-spinner-32 demo
Octocat-spinner-32 doc
Octocat-spinner-32 source
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 license.md
Octocat-spinner-32 readme.md
readme.md

nsrails.com


Welcome!

NSRails is a light-weight, drop-in Objective-C framework (iOS or OS X) for simple but powerful communication with your Rails server.

What does NSRails do?

NSRails provides simple, high-level APIs that gives your Objective-C classes ActiveResource-like support. This means CRUD and other operations on your corresponding Rails objects can be called natively via Objective-C methods.

Instances will inherit methods to remotely create, read, update, or destroy a remote object:

Article *newArticle = [[Article alloc] init];
newArticle.title = @"Title";
newArticle.content = @"Some text";
[newArticle remoteCreate:&error];     //This article and its properties created right on a Rails server

Classes will inherit methods to retrieve all objects, or only certain ones:

NSArray *allArticles = [Article remoteAll:&error];
Article *articleNumber1 = [Article remoteObjectWithID:1 error:&error];

// Display your article(s)! They're ready with their properties populated directly from your remote DB

Features:

How do I get started?

It's fairly painless. Drop the source folder into your Xcode project, and see this page.

Some more resources:

  • Easily translate Rails models into Objective-C classes using autogen tool
  • Watch the screencast
  • See the Wiki
  • Browse the included demo iPhone app - it goes straight to a live Rails app at nsrails.com, so you won't even have to launch a server to get started. The source for this site is also included. Have fun and be civil!

Credits

NSRails is published under the MIT license, meaning you can use the sources however you'd like.

Thanks a lot to the SB JSON framework for JSON parsing and writing, and to ObjectiveResource for being largely the inspiration for NSRails.

Something went wrong with that request. Please try again.