iosobjective-cattributesiad

Block not getting called from requestAttributionDetailsWithBlock


I'm desperate. I'm trying to use iAd's requestAttributionDetailsWithBlock, and it's not calling anything inside my completion handler (I'm using breakpoints in XCode and logs. Any suggestions?

    [[ADClient sharedClient] requestAttributionDetailsWithBlock:^void (NSDictionary* attributionDetails, NSError* error)
 {
     if (error == nil)
     {
         NSLog(@"Attributes found");
     }
     else
     {
         NSLog(@"Request search ads attributes failed with error: %@", error.description);
     }
 }];

Solution

  • So, I figured out the problem. My code was calling ADClient elsewhere (determineAppInstallationAttributionWithCompletionHandler) and for some reason it was blocking my requestAttributionDetailsWithBlock completion handler from executing. After I commented out the code, everything worked fine. Still not exactly sure why it works, but it does!