I'm a complete noob if this involves iOS objective-c website connectivity. I want anyone to point me right direction regarding how to upload/push data (i.e. a publish) towards the website that my pal designed in Ruby on Rails.

The web site is applying Heroku's services and it is attached to a PostgreSQL database.

I determined a method to pull data in the site utilizing a JSON Parser (SBJson) with the following code:

SBJsonParser *parser = [[SBJsonParser alloc] init];
NSString *rawJSON = [[NSString alloc] initWithContentsOfURL:[NSURL URLWithString:aURL]];
anNSDictionaryObject = [[parser objectWithString:rawJSON error:nil] copy];  

I have looked all within the place but for whatever reason I can not grasp how you can upload data. Should i access the database directly? Should i upload the information within the same format when i drawn it?

I am unsure basically provided enough information but any help could be appreciated. Tell me if more details is required.

You are friend should expose a Relaxation Api in the rails application (If you're following MVC, as well as rails scaffold, then these ought to be practically built-in anyways).

Inside the iOS application you most likely wish to send an asynchronous request therefore the primary UI thread does not block. You will want to produce a NSMutableURLRequest using the publish data after which send the information with NSURLConnection sendSynchronousRequest

You have to first be sure that the web service exposes creating or upgrading objects with an API (you shouldn't need direct accessibility database). Typically in Relaxation (and Rails) the convention is by using Publish for produces and set for updates. For instance:

POST /user.json 
{ user: { name: "...", email: "..." } }


PUT /users/:id.json
{ user: { name: "...", email: "..." } }

After you have this setup in your server, make use of your JSON library to serialize your object as well as an HTTP library to do the publish in your iOS client. I suggest JSONKit and HTTPRiot because they give a simple way to communicate with Peaceful servers.

Take a look at StorageRoomApp there is a great service along with a great support. Storage Room App