Block not getting called from requestAttributionDetailsWithBlock

558 Views Asked by At

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);
     }
 }];
1

There are 1 best solutions below

1
Christine On BEST ANSWER

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!