title: stringwithcontentsofurl file deprecated in ios 2.0 warning IOS7
body: <p>Hi in my application I'm showing the route map using google map in that its showing warning like .</p>
  
  <blockquote>
    <p>stringwithcontentsofurl  file deprecated in ios 2.0</p>
  </blockquote>
  
  <p>The code which I'm using.</p>
  
  <pre><code>   -(NSArray*) calculateRoutesFrom:(CLLocationCoordinate2D) f to: (CLLocationCoordinate2D) t {
  
          NSString* saddr = [NSString stringWithFormat:@"%f,%f", f.latitude, f.longitude];
          NSString* daddr = [NSString stringWithFormat:@"%f,%f", t.latitude, t.longitude];
  
          NSString* apiUrlStr = [NSString stringWithFormat:@"http://maps.google.com/maps?output=dragdir&amp;saddr=%@&amp;daddr=%@", saddr, daddr];
          NSURL* apiUrl = [NSURL URLWithString:apiUrlStr];
          NSLog(@"api url: %@", apiUrl);
  
          NSString *apiResponse = [NSString stringWithContentsOfURL:apiUrl];
          NSString* encodedPoints = [apiResponse stringByMatching:@"points:\\\"([^\\\"]*)\\\"" capture:1L];
  
          return [self decodePolyLine:[encodedPoints mutableCopy]];
         }
  </code></pre>
  
  <p>In the above code in a particular line.</p>
  
  <blockquote>
    <p>NSString *apiResponse = [NSString stringWithContentsOfURL:apiUrl];</p>
  </blockquote>
  
  <p>This above line its showing warning like that please tell me how to resolve this issue.</p>
  
  <p>Thanks.</p>