title: AdMob banner using swift in xcode 6
body: <p>I've successfully used <strong>admob</strong> in previous apps using <strong>objective c</strong> but I seem to be having problems getting this to work in <strong>swift</strong>.</p>
  
  <p>Using the following code in <code>viewDidAppear</code> will successfully show a test ad.</p>
  
  <pre><code>var adB = GADBannerView(frame:CGRectMake(0, 20, 320, 50)) // create the banner
      adB.adUnitID = "ca-app-pub-xxxxxxxx/xxxxxxx"
      adB.delegate = self
      adB.rootViewController = self
  
      var request = GADRequest()
      request.testDevices = [GAD_SIMULATOR_ID];
  
      adB.loadRequest(request)
      self.view.addSubview(adB)
  </code></pre>
  
  <p>Some help for this came from the following question:
  <a href="https://stackoverflow.com/questions/24760156/xcode-6-swift-ads-googlemobileadssdkios">xcode 6 swift ads GoogleMobileAdsSdkiOS</a></p>
  
  <p>However my issue is when I want to remove the test ads in preparation for the app store. In my previous apps the only difference I can see is that I removed the lines for "request" and have the following line instead:</p>
  
  <pre><code>[bannerView_ loadRequest:[GADRequest request]];
  </code></pre>
  
  <p>Trying this in swift:</p>
  
  <pre><code>adB.loadRequest(GADRequest().request)
  </code></pre>
  
  <p>brings up the following error:</p>
  
  <pre><code>"GADRequest does not have a member named 'request'"
  </code></pre>
  
  <p>Leaving 'request' out does not bring up any ads. Has anyone had any success with admob using swift to bring up live ads?</p>