-1

I want to send lat long after 30 sec....

for that i am using,

if (theDiff > 30.0f || myDate == nil){
        //do your webservices stuff here
        NSLog(@"Location get ===================");
        double lat =  newLocation.coordinate.latitude;
        double longt = newLocation.coordinate.longitude;


        NSString *ids = [NSString stringWithFormat:@"%d",[[NSUserDefaults standardUserDefaults]integerForKey:CURRENT_USERID]];
        ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:UPDATE_LATLONG]];

        [request setPostValue:[NSNumber numberWithDouble: lat] forKey:@"latitude"];
        [request setPostValue:[NSNumber numberWithDouble: longt] forKey:@"longitude"];
        [request setPostValue:ids forKey:@"userid"];
        [request startSynchronous];

        NSString *XMLResponseString = [request responseString];
        NSLog(@"XMLResponseString %@",XMLResponseString);
        [request release];

            NSLog(@"lat = %.6f",lat);
            NSLog(@"long = %.6f",longt);
        NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
        [prefs setObject:lastDate forKey:@"myDateKey"];
        [prefs synchronize];
    }

but is gives error...

2012-03-01 15:01:43.352 BiiMe[1638:207] +[NSString stringwithFormat:]: unrecognized selector sent to class 0x447fd8
sharedlibrary apply-load-rules all
(gdb)

what did i mistake?

Siten
  • 4,515
  • 9
  • 39
  • 64

1 Answers1

1

Please try and use more CodeSense feature.

It's stringWithFormat: not stringwithFormat:

Hope this helps you.

Parth Bhatt
  • 19,381
  • 28
  • 133
  • 216
Mathieu Hausherr
  • 3,485
  • 23
  • 30