views:

56

answers:

2

Dear community, I am working on an iphone application which would be able to retrieve/publish information from/to a web server. I want to use out-of-the-box technology on the server side and as much built-in iphone capabilities as possible. Here are my thoughts so far:

I initially thought about using rss feeds: Writing an rss reader is quite straightforward. However I do not seem able to find information regarding the publishing of an rss article from the iphone. Does anyone have a smart idea on this point?

I then thought of setting up dedicated email accounts (once again it's a prototype app). Sending then becomes easy via the iphone. Receiving emails from within a custom iphone ap however seems pretty involved. Once again: any smart thought on this?

There are probably other ways of doing what I want which elude me. Any constructive suggestions would be very much appreciated.

A: 

It is difficult to tell precisely whether the built-in capabilities of the iOS API will do exactly what you want, however what you have described sounds like it could be accomplished quite readily by creating a Safari (browser) application, rather than worrying about custom iPhone development.

RSS feeds are typically managed on the server and consumed by the client. I can't tell from your description how the emails are involved, but again if you are processing your feeds and emails on the server, a browser based application will have everything it needs.

jbm
This could indeed be a solution. However we would ideally like our users to interact with the application without needing a connection to the internet. The other aspect is that then the development must be done on the server side instead of client. I am trying to use an "out of the box" server side and build a small client as a prototype.
MiKL
A: 

I would guess it depends on how much data you want to push back to your server. If its just a few items I would sent a request to a php page on your server and have it update a database with the info. You can use GET or POST. Not sure what the limits are but we do this with our app to get data on what movie the user has requested, the UUID and other useful data.

For example:

NSString * uId = [[UIDevice currentDevice] uniqueIdentifier];
NSString * episodeString = [URLString substringFromIndex:73]; //strip out the stuff before the enclosing folder

NSArray * episodeArray = [episodeString componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"/"]];

NSString * resVersion = episodeArray.lastObject; // get either small.mov, medium.mov or large.mov

NSString * episode = [episodeArray objectAtIndex:0];// get the enclosing folder

NSMutableURLRequest *statsRequest = [[[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:kAppStats]] autorelease];

[statsRequest setHTTPMethod:@"POST"];

NSString *requestBody = [NSString 
                          stringWithFormat:@"episode=%@&res=%@&uuid=%@",
                          [episode     stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
                          [resVersion stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
                          [uId        stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]
                          ];

[statsRequest setHTTPBody:[requestBody dataUsingEncoding:NSUTF8StringEncoding]];

NSURLConnection *statsConnection = [[NSURLConnection alloc] initWithRequest:statsRequest delegate:self];

[statsConnection start];
[statsConnection release];

This is sent to a php script that gets the data through standard POST and updates a MySQL database. Don't see why you couldn't do something similar.

Michael
I've thought about this. However I am not familiar with setting up such a server. That's why I was looking at "out of the box" solutions. I would however appreciate any pointers to learn how to setup such a PHP page on a server.
MiKL
PHP is pretty much 'out of the box' or perhaps I don't understand what you mean by that phrase.
Michael