title: google places for iOS empty referrer
body: <p>I have been working completely fine with google maps sdk and the places api. yesterday my code was running perfectly fine. but woke up this morning, made some modifications then ran into a compiling snowball of issues which seems like an easy fix but have spent a couple hours trying to figure out what is going on. I am trying to develop an iPhone application.</p>
  
  <p>I have gone back, created a "new project" in the developer console
  regenerated a new iOS key.
  entered the new bundle ID in the info.plist
  entered the new api key in the delegate file and within the search parameter of the url.</p>
  
  <p>i am using alamofire and swiftyjson to parse the data</p>
  
  <p>but still get the same issue. </p>
  
  <blockquote>
    <p>2016-01-28 13:15:55.683 Google Maps SDK for iOS version: 1.11.21919.0</p>
    
    <p>{
      "error_message" : "This IP, site or mobile application is not authorized to use this API key. Request received from IP address "myIPAddress", with empty referer",
      "results" : [</p>
    
    <p>],
    "status" : "REQUEST_DENIED",
      "html_attributions" : [</p>
    
    <p>]
    }</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/vtzKt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vtzKt.png" alt="enter image description here"></a></p>
  
  <pre><code>func downloadRestaurantDetails(completed: DownloadComplete) {
      let URL_Search = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?"
      let API_iOSKey = "My iOS API Key"
  
      let urlString = "\(URL_Search)location=\(clLatitude),\(clLongitude)&amp;radius=\(searchRadius)&amp;types=\(searchType)&amp;key=\(API_iOSKey)"
      let url = NSURL(string: urlString)!
  
      Alamofire.request(.GET,url).responseJSON { (response) -&gt; Void in
          if let value  = response.result.value {
              let json = JSON(value)
              print(json)
  
              if let results = json["results"].array {
                  for result in results {
                      if let placeIDs = result["place_id"].string {
                          self.placeIDArray.append(placeIDs)
                      }
                  }
              }
          }
  
          completed()
  
      }
  }
  </code></pre>