GPS Code not working in iPhone os 3.1
<p>I am Using the following code to get the user current location in iPhone o 3.1
but the application get crash.Did the code change in 3.1?</p>

<pre><code>CLLocationManager  *locmanager =[[CLLocationManager alloc] init];
        [locmanager  setDelegate:self]; 
        [locmanager setDesiredAccuracy:kCLLocationAccuracyBest];    
        [locmanager startUpdatingLocation];
</code></pre>
