i wrote a gps-application for the iphone and it all works fine but now i want to send the latitude and longitude to a server over the internet using the most simple way... I have a url from the server in which there are parameters for latitude and longitude. Also i want the lat. and long. to be sent every 90 seconds or so. How exactly is all of this done? Any help is much appreciated, thanks in advance!
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- how do you prevent page scroll in textarea on mobi
- Custom UITableview cell accessibility not working
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Open iOS 11 Files app via URL Scheme or some other
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- Can not export audiofiles via “open in:” from Voic
- XCode 4.5 giving me “SenTestingKit/SenTestKit.h” f
handle errors and received data using:
you need some variables set up, such as data, contentLength etc. But this is the general outline for http interaction.
You may want to put all handling stuff in a separate handler class, I changed the delegate to
self
so this is more self-contained.As for timing, use an
NSTimer
to invoke posting the data every 90 seconds:I think the above answer has the right idea - but try using ASIHTTPRequest. A great library, and it abstracts all that messy HTTP code out of your program.
Also one other thing to note - GPS coordinates every 90 seconds is going to burn down your battery very fast - are you just doing this for testing?