Inicializar el SDK de Audience Network para iOS

La inicialización explícita del SDK de Audience Network para iOS es obligatoria.

Una vez que configures correctamente el SDK, debes inicializarlo.

  1. Abre tu archivo de proyecto (o tu espacio de trabajo, si usas CocoaPods).
  2. Agrega el siguiente fragmento de código en tu delegado de la app.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

	FBAudienceNetworkAds.initialize(with: nil, completionHandler: nil)

	// Pass user's consent after acquiring it. For sample app purposes, this is set to YES.
	FBAdSettings.setAdvertiserTrackingEnabled(true)

	// Your app initialization logic goes here...
	return true
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary<NSString *, id> *)launchOptions
{
[FBAudienceNetworkAds initializeWithSettings:nil completionHandler:nil];

// Pass user's consent after acquiring it. For sample app purposes, this is set to YES.
[FBAdSettings setAdvertiserTrackingEnabled:YES];

// Your app initialization logic goes here...

return YES;
}