So I have a pretty simple problem, which I have no idea how to go about (kinda of new for everything here). I am developing an iPhone app that I intend to use only myself – so think small for now :)Let’s say all my app is doing is tracking my location every hour. All I want to do, is to be able to read this information not on the iphone, say on a file on my computer. How can I send this information from my app to a personal computer? I am guessing that I will need to set up some server / database or something on my personal machine?
Can someone please help with a quick step by step on how to go about that? I literally have no clue where to start…
Thanks!
You’ll need to have a listener somewhere to send your data to. For instance, you could set up a communication class in your project which would be responsible for serving as the medium between your applications. You would then set up a listener on a server, or your machine that would listen for requests.
You can use the
NSURLConnectionobject to serve this purpose. E.g.http://example.com/service.asmx/RecordDatabeing the location and method on your web service.Here’s a generic request method I created which sets the headers as a JSON packet.
And on the back-end, on your web server, you would have a method that recieves the data. Obviously you could use any technology you wanted on the server. In this example, I’m using .NET on Mono e.g.