Inisialisasi Audience Network SDK untuk iOS

Inisialisasi eksplisit Audience Network SDK untuk iOS diperlukan.

Setelah Anda berhasil menyiapkan SDK, Anda harus menginisialisasi SDK.

  1. Buka file proyek Anda (atau workspace jika Anda menggunakan CocoaPods)
  2. Tambahkan snippet kode berikut di App Delegate Anda
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;
}