iOS용 Audience Network SDK 초기화

iOS Audience Network SDK를 명시적으로 초기화해야 합니다.

SDK를 설정하고 나면 SDK를 초기화해야 합니다.

  1. 프로젝트 파일을 엽니다(CocoaPods를 사용하고 있는 경우 워크스페이스를 엽니다).
  2. 앱 델리게이트에 다음 코드 조각을 추가합니다.
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;
}