Initialiser le SDK Audience Network pour iOS

L’initialisation explicite du SDK Audience Network pour iOS est requise.

Après avoir configuré le SDK, vous devez l’initialiser.

  1. Ouvrez votre fichier de projet (ou votre espace de travail si vous utilisez CocoaPods).
  2. Ajoutez l’extrait de code ci-dessous à votre App Delegate.
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;
}