What I did was using a NSTimer to call sendGPS every 10 minutes, What I can't figure out is why when the timer calls for the first time, the php script writes to the mySql database, but the subsequence calls, do not write any more, I am wondering if it's something wrong with this code, or the problem with th webserver configuration or something wrong with the php script?
Second, this is very easy to pinpoint. Does your PHP script receive a message from your app on subsequent times, try logging this, if it does, then the problem is on the server side, if not, then it's in the app code.
The problem seems to be timer related but I just don't know what it is, if I make a sequence of calls to the sendGPS a lot of [self sendGPS]s from ViewDidLoad, every single one is recorded in MySQL, once I put it in the timer
only the first time is recorded, I tried different time interval, from 1.0 to 10.0
the result is the same.
The problem seems to be timer related but I just don't know what it is, if I make a sequence of calls to the sendGPS a lot of [self sendGPS]s from ViewDidLoad, every single one is recorded in MySQL, once I put it in the timer
only the first time is recorded, I tried different time interval, from 1.0 to 10.0
the result is the same.
Post your timer setup code....
Have you put an NSLog() or a breakpoint in your sendGPS() function to make sure it's actually getting called multiple times?
__________________
Highlight PDF text like no other app: iHighlight (now available for iPad and iPhone!)
-----
Create iPhone lists with no typing: Insta-List
-----
Make spelling fun, and create your own tests: iWillSpell
-----
A fast, elegant flashlight app: Insta-Light
-----
where do you set up the timer? Is it set to repeat=YES?
Yes and yes,
@MattW yes, at the beginning of the selector, I have a NSLog(@"Sending URL");
In the debug log, it shows the selector was called at the intended time interval.