GADMobileAds 클래스는 Google 모바일 광고 SDK에서 수집하는 특정 정보를 관리하기 위한 전체 설정을 제공합니다.
동영상 광고 볼륨 조절
앱에 자체적인 볼륨 조절 기능(예: 맞춤 음악 또는 음향효과
볼륨)이 있는 경우, Google 모바일 광고 SDK에 앱 볼륨 정보를 공개하면
동영상 광고에 앱 볼륨 설정을 적용할 수 있습니다. 이를 통해 사용자가 놀라지 않는 범위의 오디오 볼륨으로
동영상 광고가 게재됩니다.
볼륨 버튼 또는 OS 수준 볼륨 슬라이더를 통해 조절되는
기기 볼륨은 기기 오디오 출력 볼륨을 결정합니다. 그러나 앱의 경우 기기 볼륨에 대한 비율로 정의되는 자체 볼륨을 조절해
오디오 환경을 맞춤설정할 수 있습니다.
앱 오프닝, 배너, 전면 광고, 보상형 광고, 보상형 전면 광고 형식의 경우 applicationVolume 속성을 설정하여 Google 모바일 광고 SDK에 상대적인 앱 볼륨을 보고할 수 있습니다. 유효한 광고 볼륨 값의 범위는
0.0 (무음)~1.0 (현재 기기 볼륨)입니다. 다음은 SDK에 상대적인 앱 볼륨을 보고하는 방법의 예입니다.
Swift
funcviewDidLoad(){super.viewDidLoad()// Set app volume to be half of the current device volume.MobileAds.shared.applicationVolume=0.5...}
Objective-C
-(void)viewDidLoad{[superviewDidLoad];// Set app volume to be half of the current device volume.GADMobileAds.sharedInstance.applicationVolume=0.5;...}
앱 오프닝, 배너, 전면 광고, 보상형, 보상형 전면 광고 형식의 경우 applicationMuted 속성을 설정하여 앱 볼륨이 음소거되었음을 Google 모바일 광고 SDK에 알릴 수 있습니다.
Swift
MobileAds.shared.applicationMuted=true
Objective-C
GADMobileAds.sharedInstance.applicationMuted=YES;
기본적으로 applicationVolume은 1 (현재 기기 볼륨)로 설정되고 applicationMuted는 NO로 설정됩니다.
네이티브 광고
숨기기 설정을 제어하는 방법은 GADVideoOptions을 참고하세요. 네이티브 광고의 경우 맞춤 볼륨 설정이 지원되지 않습니다.
오디오 세션
오디오 세션을 통해 앱의 오디오 동작에 대한 개발자의 의도를 시스템에 반영할 수 있습니다. 오디오 세션에 대한 자세한 내용은 Apple의 오디오 세션 프로그래밍 가이드를 참고하세요.
Google 모바일 광고 SDK 오디오를 관리하는 데 사용할 수 있는 옵션은 audioVideoManager 속성을 사용하는 것입니다.
앱에서 오디오를 사용하지 않으면 이러한 API를 사용할 필요가 없습니다.
Google 모바일 광고 SDK에서는 오디오를 재생할 때 오디오 세션 카테고리를 자동으로 관리합니다. 앱에서 오디오를 재생하고 Google 모바일 광고 SDK에서 오디오를 재생하는 방법과 시기를
더욱 상세하게 조정하려는 경우 이러한 API를 사용할 수 있습니다.
다음은 앱이 위의 API를 사용하여 음악을 재생할 때 권장하는 방식의 간단한 코드 샘플입니다.
Swift
funcsetUp(){MobileAds.shared.audioVideoManager.delegate=selfMobileAds.shared.audioVideoManager.audioSessionIsApplicationManaged=false}// MARK: - GADAudioVideoManagerDelegatefuncaudioVideoManagerWillPlayAudio(_audioVideoManager:GADAudioVideoManager){// The Google Mobile Ads SDK is notifying your app that it will play audio. You// could optionally pause music depending on your apps design.MyAppObject.shared.pauseAllMusic()}funcaudioVideoManagerDidStopPlayingAudio(_audioVideoManager:GADAudioVideoManager){// The Google Mobile Ads SDK is notifying your app that it has stopped playing// audio. Depending on your design, you could resume music here.MyAppObject.shared.resumeAllMusic()}
Objective-C
-(void)setUp{GADMobileAds.sharedInstance.audioVideoManager.delegate=self;GADMobileAds.sharedInstance.audioVideoManager.audioSessionIsApplicationManaged=NO;}#pragma mark - GADAudioVideoManagerDelegate-(void)audioVideoManagerWillPlayAudio:(GADAudioVideoManager*)audioVideoManager{// Google Mobile Ads SDK is notifying your app that it will play audio. You// could optionally pause music depending on your apps design.[MyAppObject.sharedInstancepauseAllMusic];}-(void)audioVideoManagerDidStopPlayingAudio:(GADAudioVideoManager*)audioVideoManager{// Google Mobile Ads SDK is notifying your app that it has stopped playing// audio. Depending on your design, you could resume music here.[MyAppObject.sharedInstanceresumeAllMusic];}
비정상 종료 보고
Google 모바일 광고 SDK는 iOS 앱에서 발생하는 예외를 조사하여 SDK가 원인인 경우 예외를 기록합니다. 이러한 예외는 향후 SDK 버전에서 해결됩니다.
비정상 종료 보고는 기본적으로 사용 설정되어 있습니다. SDK 관련 예외를 기록하지 않고자 한다면 disableSDKCrashReporting 메서드를 호출하여 이 기능을 중지할 수 있습니다. 이 메서드를 호출하기 가장 적합한 시점은 앱이 실행될 때입니다.
앱에 특별한 요구사항이 있는 경우 NSUserDefaultsgad_has_consent_for_cookies를 설정할 수 있습니다. gad_has_consent_for_cookies 환경설정이 0으로 설정된 경우 Google 모바일 광고 SDK는 제한적인 광고 (LTD)를 사용 설정합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-02(UTC)"],[[["\u003cp\u003eThe \u003ccode\u003eGADMobileAds\u003c/code\u003e class allows you to manage global settings for the Mobile Ads SDK, including video ad volume and audio sessions.\u003c/p\u003e\n"],["\u003cp\u003eYou can control video ad volume and mute state for App Open, Banner, Interstitial, Rewarded, and Rewarded Interstitial ad formats, but these settings do not apply to native ads or mediated networks.\u003c/p\u003e\n"],["\u003cp\u003eFor apps that manage their own audio, you can use the \u003ccode\u003eaudioVideoManager\u003c/code\u003e and its delegate to coordinate audio playback between your app and the SDK.\u003c/p\u003e\n"],["\u003cp\u003eBy default, the SDK automatically handles audio sessions and crash reporting, but you can disable or customize these behaviors if needed.\u003c/p\u003e\n"],["\u003cp\u003eYou can enable limited ads by setting the \u003ccode\u003egad_has_consent_for_cookies\u003c/code\u003e preference in \u003ccode\u003eNSUserDefaults\u003c/code\u003e to zero if your app has specific consent requirements.\u003c/p\u003e\n"]]],["The `GADMobileAds` class allows control over audio and crash reporting. Apps with custom volume controls can set `applicationVolume` (0.0-1.0) or `applicationMuted` to manage video ad volume relative to device volume. The `audioVideoManager` provides control over audio session categories, using `audioSessionIsApplicationManaged` and a delegate for audio playback events. The `disableSDKCrashReporting` method can disable crash reporting. Finally setting the `gad_has_consent_for_cookies` preference in `NSUserDefaults` can also be set.\n"],null,["Select platform: [Android](/admob/android/global-settings \"View this page for the Android platform docs.\") [iOS](/admob/ios/global-settings \"View this page for the iOS platform docs.\") [Unity](/admob/unity/global-settings \"View this page for the Unity platform docs.\")\n\n\u003cbr /\u003e\n\nThe `GADMobileAds` class provides global settings for controlling certain\ninformation collected by Google Mobile Ads SDK.\n\nVideo ad volume control **Note:** Video volume controls apply only to Google ads and are not forwarded to mediation networks.\n\nIf your app has its own volume controls, such as custom music or sound effect\nvolumes, disclosing app volume to Google Mobile Ads SDK enables video ads\nto respect app volume settings. This ensures users receive video ads with the\nexpected audio volume.\n\nThe device volume, controlled through volume buttons or OS-level volume slider,\ndetermines the volume for device audio output. However, apps can independently\nadjust volume levels relative to the device volume to tailor the audio\nexperience.\n\nFor App Open, Banner, Interstitial, Rewarded, and Rewarded Interstitial ad\nformats you can report the relative app volume to Google Mobile Ads SDK by\nsetting the `applicationVolume` property. Valid ad volume values range from\n`0.0` (silent) to `1.0` (current device volume). Here's an example of how to\nreport the relative app volume to the SDK: \n\nSwift \n\n func viewDidLoad() {\n super.viewDidLoad()\n // Set app volume to be half of the current device volume.\n MobileAds.shared.applicationVolume = 0.5\n ...\n }\n\nObjective-C \n\n - (void)viewDidLoad {\n [super viewDidLoad];\n // Set app volume to be half of the current device volume.\n GADMobileAds.sharedInstance.applicationVolume = 0.5;\n ...\n }\n\n| **Warning:** Lowering your app's audio volume reduces video ad eligibility and might reduce your app's ad revenue. You should only utilize this API if your app provides custom volume controls to the user, and the user's volume is properly reflected in the API.\n\nFor App Open, Banner, Interstitial, Rewarded, and Rewarded Interstitial ad\nformats, you can inform Google Mobile Ads SDK that the app volume has been\nmuted by setting the `applicationMuted` property: \n\nSwift \n\n MobileAds.shared.applicationMuted = true\n\nObjective-C \n\n GADMobileAds.sharedInstance.applicationMuted = YES;\n\nBy default, `applicationVolume` is set to `1` (the current device volume)\nand `applicationMuted` is set to `NO`.\n| **Warning:** Muting your app reduces video ad eligibility and might reduce your app's ad revenue. You should only utilize this API if your app provides a custom mute control to the user, and the user's mute decision is properly reflected in the API.\n\nNative ads\n\nSee\n[`GADVideoOptions`](/admob/ios/native/options#gadvideooptions)\nfor instructions on controlling the mute settings. For native ads, there isn't\nsupport for custom volume control.\n\nAudio sessions\n\nAudio sessions let you express to the system your intentions for your app's\naudio behavior. Additional information on audio sessions can be found in\nApple's [Audio Session Programming\nGuide](//developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/Introduction/Introduction.html).\nThe available options for managing Google Mobile Ads SDK audio is through\nthe\n[`audioVideoManager`](/admob/ios/api/reference/Classes/GADMobileAds#audioVideoManager)\nproperty.\n\nIf you don't use audio in your app, you don't need to use these APIs.\nGoogle Mobile Ads SDK automatically manages the audio session category when it\nplays audio. If you do play audio in your app and you want tighter control of\nhow and when Google Mobile Ads SDK plays audio, you can make use of these APIs.\n\nOn the audio video manager, you can set the\n[`audioSessionIsApplicationManaged`](/admob/ios/api/reference/Classes/GADAudioVideoManager#audioSessionIsApplicationManaged)\nproperty to `YES` if you want to take responsibility for managing the audio\nsession category yourself.\n\nIf you want to manage the audio session category, you can implement\n[`GADAudioVideoManagerDelegate`](/admob/ios/api/reference/Protocols/GADAudioVideoManagerDelegate)\nand set the [`delegate`](/admob/ios/api/reference/Classes/GADAudioVideoManager#/c:objc(cs)GADAudioVideoManager(py)delegate)\nproperty on the audio video manager to be notified of ads video and audio\nplayback events. You should then change the audio session category to the\nrelevant category according to [Apple's Audio Session Programming\nGuide](//developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/Introduction/Introduction.html).\n| **Key Point:** By default, the SDK sets the audio session category to `AVAudioSessionCategoryAmbient` when playing ads muted. If you prefer to have your app use [`AVAudioSessionCategoryOptionDuckOthers`](//developer.apple.com/documentation/avfoundation/avaudiosessioncategoryoptions/avaudiosessioncategoryoptionduckothers) in this scenario, you must implement the `GADAudioVideoManagerDelegate` protocol and set the audio video manager `audioSessionIsApplicationManaged` to `YES`.\n\nHere is a simplified code sample that shows the recommended approach if your\napp plays music, using the above APIs: \n\nSwift \n\n func setUp() {\n MobileAds.shared.audioVideoManager.delegate = self\n MobileAds.shared.audioVideoManager.audioSessionIsApplicationManaged = false\n }\n\n // MARK: - GADAudioVideoManagerDelegate\n func audioVideoManagerWillPlayAudio(_ audioVideoManager: GADAudioVideoManager) {\n // The Google Mobile Ads SDK is notifying your app that it will play audio. You\n // could optionally pause music depending on your apps design.\n MyAppObject.shared.pauseAllMusic()\n }\n\n func audioVideoManagerDidStopPlayingAudio(_ audioVideoManager: GADAudioVideoManager) {\n // The Google Mobile Ads SDK is notifying your app that it has stopped playing\n // audio. Depending on your design, you could resume music here.\n MyAppObject.shared.resumeAllMusic()\n }\n\nObjective-C \n\n - (void)setUp {\n GADMobileAds.sharedInstance.audioVideoManager.delegate = self;\n GADMobileAds.sharedInstance.audioVideoManager.audioSessionIsApplicationManaged = NO;\n }\n\n #pragma mark - GADAudioVideoManagerDelegate\n\n - (void)audioVideoManagerWillPlayAudio:(GADAudioVideoManager *)audioVideoManager {\n // Google Mobile Ads SDK is notifying your app that it will play audio. You\n // could optionally pause music depending on your apps design.\n [MyAppObject.sharedInstance pauseAllMusic];\n }\n\n - (void)audioVideoManagerDidStopPlayingAudio:(GADAudioVideoManager *)audioVideoManager {\n // Google Mobile Ads SDK is notifying your app that it has stopped playing\n // audio. Depending on your design, you could resume music here.\n [MyAppObject.sharedInstance resumeAllMusic];\n }\n\nCrash reporting\n\nGoogle Mobile Ads SDK inspects exceptions that occur in an iOS app and\nrecords them if they were caused by the SDK. These exceptions are then\naddressed in future SDK versions.\n\nCrash reporting is enabled by default. If you don't want SDK-related exceptions\nto be recorded, you can disable this feature by calling the\n`disableSDKCrashReporting` method. The best time to call this method is when\nthe app launches: \n\nSwift \n\n import GoogleMobileAds\n\n @UIApplicationMain\n class AppDelegate: UIResponder, UIApplicationDelegate {\n\n func application(_ application: UIApplication,\n didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -\u003e Bool {\n\n MobileAds.shared.disableSDKCrashReporting()\n return true\n }\n }\n\nObjective-C \n\n @import GoogleMobileAds;\n\n @implementation AppDelegate\n\n - (BOOL)application:(UIApplication *)application\n didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n\n \\[GADMobileAds disableSDKCrashReporting\\];\n return YES;\n }\n\n @end\n\nConsent for cookies settings\n\nIf your app has special requirements, you can set the optional\n[`NSUserDefaults`](//developer.apple.com/documentation/foundation/nsuserdefaults)\n`gad_has_consent_for_cookies`. Google Mobile Ads SDK enables\n\n[limited ads (LTD)](//support.google.com/admob/answer/10105530)\n\nif the `gad_has_consent_for_cookies` preference is set to zero. \n\nSwift \n\n UserDefaults.standard.set(0, forKey: \"gad_has_consent_for_cookies\")\n\nObjective-C \n\n NSUserDefaults.standardUserDefaults().setObject(Int(0),\n forKey: \"gad_has_consent_for_cookies\");"]]