How to test Facebook Audience Network ads over TestFlight?

前端 未结 4 1172
猫巷女王i
猫巷女王i 2021-02-12 20:15

I am trying to integrate Audience Network to my app. Ads work correctly on simulator and device when I deploy over XCode.

I want to distribute the build over TestFlight

4条回答
  •  忘了有多久
    2021-02-12 20:58

    I have still faced the same issue after applying the above solutions. I have resolved by adding deviceHashId:-

    FBNativeAd *nativeAd;
    static NSString *adPlacementId = @"xxxxxxxxx";
    
    - (void)showNativeAd:(UIViewController *)vc
    {
      nativeAd = [[FBNativeAd alloc] initWithPlacementID:adPlacementId];
      nativeAd.delegate = self;
    
      NSLog(@"isTestMode1: %d",[FBAdSettings isTestMode]);
      NSString *testDeviceKey = [FBAdSettings testDeviceHash];
      if (testDeviceKey) {
        [FBAdSettings addTestDevice:testDeviceKey];
      }
      [nativeAd loadAd];
    }
    

    I have some different problem if anyone have any point please reply this stack overflow link

提交回复
热议问题