Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need a basic server backend for iOS app

Tags:

I'm currently developing an iOS app and have reached the point where I need to implement a server backend in order to support the core functionality. Essentially, the app deals with text strings that need to be uploaded to a server. After receiving the strings, I need the server to perform some tasks with it and then send the result of the tasks (also string-based) back to the iPhone app.

I have zero server experience and am need of some advisement as to where I should begin with this. In order to avoid financial risk, I am attempting to avoid dedicated hosting at initial launch, and so I was wondering if at-home server hosting would be at all possible for the launch and then, if the server-side component was developed appropriately, simply transfer the software to a more permanent dedicated solution if the app's usage warranted.

I have done some research and I have found Amazon S3 to be a popular iPhone app server solution due to its integration with the also popular wrapper, ASIHTTPRequest. This seems to be a more permanent hosting solution, however. In the meantime, for local app testing on a smaller scale, what would the recommended server platform be? Something along the lines of ubuntu with LAMP installed? If so, would the scripts developed on the local platform (I'm assuming in PHP) be directly transferrable to a larger-scale server for the most part?

like image 244
Harrold Kenning Avatar asked Jun 22 '11 17:06

Harrold Kenning


People also ask

Do you need a server for an iOS app?

Do you need a server for an app? The short answer to this question is yes – you will need some sort of server space in order to serve application content to customers.

Do I need a backend for my app?

Not every mobile app needs a mobile app backend to function. Self-contained apps like a drawing app, notepad, magnifier app, or invoicing app can work without a backend. These apps can store data on local storage and work offline.


1 Answers

I would go with shared hosting: http://webfaction.com or http://linode.com. It's unlikely that you're going to have so much traffic that your shared host will not be able to tolerate it. I run a few high traffic apps on Webfaction without difficulty.

From your description of the functionality in your app, it doesn't seem too complicated, and wouldn't be difficult to scale.

PHP development environment on OS X:

OS X has PHP and Apache already installed. It just needs to be enabled, this page describes the process to get it going:

http://foundationphp.com/tutorials/php_leopard.php

Alternatively you can install a package like MAMP ( http://www.mamp.info/en/index.html ), which will provide you with a full stack. (And is what I would recommend.)

The code:

As for the code, you'll more than likely use ASIHttpRequest to do a POST request to URI on your server. The script at the URI will connect to the database, store the string, and then disconnect from the database.

Less than 10 lines of code.

like image 129
peterp Avatar answered Nov 06 '22 06:11

peterp