我在一个ios项目中使用了Flurry本机广告集成,它之前运行良好,但突然间我发现,因为最近几天Fluurry没有提供任何回调。没有调用委托方法。
这是一个集成代码:
- (void)initFlurrySDK {
dispatch_async(dispatch_get_main_queue(), ^{
int FlurryLogLevel = FlurryLogLevelDebug;
[Flurry startSession:kFlurryAPIKEY
withSessionBuilder:[[[FlurrySessionBuilder new]
withCrashReporting:YES]
withLogLevel:FlurryLogLevel]];
NSLog(@"flurry SDK version: %@",[Flurry getFlurryAgentVersion]);
});
}
-(void)RequestFlurryad{ //calling from main thread only..
FlurryAdNative *fnativeAd = [[FlurryAdNative alloc] initWithSpace:@<ad_unit_name>];
self.nativeAd = fnativeAd;
//Assign the FlurryAdNativeDelegate
[self.nativeAd setAdDelegate:(id)self];
//UIViewController used for presentation of the full screen after the user clicks on the ad
fnativeAd.viewControllerForPresentation = [[VCManager sharedManager] topViewController].navigationController;
//Request the ad from Flurry.
[self.nativeAd fetchAd];
}
//delegate methods...
- (void) adNativeDidFetchAd:(FlurryAdNative *)nativeAd1{
}
- (void) adNative:(FlurryAdNative*) nativeAd1 adError:(FlurryAdError) adError errorDescription:(NSError*) errorDescription{
}