title: Integrating Google IMA to my application, not working
body: <p>i've trying to integrate google IMA sdk into my application in order to view a preRoll advertisement, following Google IMA's guide, here's what i did:</p>
  
  <pre><code>    - (IMASettings *) createIMASettings {
      IMASettings *settings = [[IMASettings alloc] init];
      settings.ppid = @"IMA_PPID_0";
      settings.language = @"en";
      return settings;
  }
  
  
  - (void)createAdsLoader {
     // self.adsLoader = [[IMAAdsLoader alloc] initWithSettings:[self createIMASettings]];
      self.adsLoader = [[IMAAdsLoader alloc] initWithSettings:[self createIMASettings]];
      self.adsLoader.delegate = self;
      [self requestAds];
  }
  
  - (void)requestAds {
      NSString *adTag = @"http://pubads.g.doubleclick.net/gampad/ads?env=vp&amp;gdfp_req=1&amp;impl=s&amp;output=xml_vast2&amp;iu=/12215557/nawa3em-house-video-preroll&amp;sz=640x360&amp;unviewed_position_start=1&amp;url=http://www.nawa3em.com&amp;correlator=1292013319811";
      IMAAdsRequest *request =
      [[IMAAdsRequest alloc] initWithAdTagUrl:adTag
                               companionSlots:nil
                                  userContext:nil];
      [self.adsLoader requestAdsWithRequest:request];
  }
  - (void)adsLoader:(IMAAdsLoader *)loader adsLoadedWithData:(IMAAdsLoadedData *)adsLoadedData {
      // Loading was successful.
      NSLog(@"Ad loading successful!");
      self.adsManager = adsLoadedData.adsManager;
      self.adsManager.delegate =  self;
      [self.adsManager initializeWithContentPlayhead:nil adsRenderingSettings:nil];
      self.adsManager.adView.frame = self.theTest.bounds;
      [self.theTest addSubview:self.adsManager.adView];
  }
  
  - (void)adsLoader:(IMAAdsLoader *)loader failedWithErrorData:(IMAAdLoadingErrorData *)adErrorData {
      // Loading failed, log it.
      NSLog(@"Ad loading error: %@", adErrorData.adError);
  }
  
  - (void)adsManager:(IMAAdsManager *)adsManager didReceiveAdEvent:(IMAAdEvent *)event {
      NSLog(@"Received ad event.");
      // Perform different actions based on the event type.
      if (event.type == kIMAAdEvent_STARTED) {
          NSLog(@"Ad has started.");
      }
  }
  
  - (void)adsManager:(IMAAdsManager *)adsManager didReceiveAdError:(IMAAdError *)error {
      // There was an error while playing the ad.
      NSLog(@"Error during ad playback: %@", error);
  }
  
  // Optional: receive updates about individual ad progress.
  - (void)adDidProgressToTime:(NSTimeInterval)mediaTime totalTime:(NSTimeInterval)totalTime {
      // This can be very noisy log - called 5 times a second.
      NSLog(@"Current ad time: %lf", mediaTime);
  }
  </code></pre>
  
  <p>After trying so many ways, i can't get it work!! it always replies the same error in the app Log 
  2013-12-02 15:07:09.944 ima[948:907] Error during ad playback: 
  2013-12-02 15:07:09.946 ima[948:907] Relayout
  2013-12-02 15:07:09.965 ima[948:907] Received ad event.</p>
  
  <p>knowing that the ad tag url am giving is working after trying it in google's sample application, please i need some help folks !!</p>