title: iOS Google Maps - search places
body: <p>I'm am developing an iOS map which uses Google Maps to search and display nearby pharmacies. I enabled the following API's: Geocoding API, Google Maps SDK for iOS, Places API.
  I created a Browser Key, an iOS Key, and a Server Key.</p>
  
  <pre><code>NSString *str = [NSString stringWithFormat:@"https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=%f,%f&amp;radius=500&amp;types=food&amp;name=cruise&amp;key=MY_KEY",location.coordinate.latitude, location.coordinate.longitude];
  
  NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:str]
                                            cachePolicy:NSURLRequestUseProtocolCachePolicy
                                        timeoutInterval:60.0];
  
  NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
  
  if (theConnection)
  {
      receivedData = [NSMutableData data];
  }
  </code></pre>
  
  <p>After the connection finishes and with the browser key used: </p>
  
  <blockquote>
    <p>"The provided API key is expired."</p>
  </blockquote>
  
  <p>After the connection finishes and with the app key used: </p>
  
  <blockquote>
    <p>"This IP, site or mobile application is not authorized to use this API
    key."</p>
  </blockquote>
  
  <p>What could be the problem ?</p>