AI-generated Key Takeaways
-
The Google Mobile Ads C++ SDK is deprecated as of June 17, 2024 and will reach End-of-Maintenance on June 17, 2025, with no further updates or bug fixes after that date.
-
Developers should consider using the iOS and Android SDKs from AdMob instead of the Google Mobile Ads C++ SDK.
-
The SDK includes features like Publisher first-party ID (enabled by default) for personalized ads and crash reporting (iOS only, enabled by default).
-
Developers can control these features, including disabling Publisher first-party ID and crash reporting, using provided code snippets.
-
For Android, specific consent requirements related to cookies can be addressed using SharedPreferences.
The following global functions may be used to control certain information collected by the Mobile Ads SDK.
Publisher first-party ID, formerly known as same app key
The Google Mobile Ads C++ SDK uses Publisher first-party ID to help you deliver more relevant and personalized ads by using data collected from the app the user is using.
Publisher first-party ID is enabled by default, but you can disable it with the following code prior to initialization:
#include "firebase/gma.h"
firebase::gma::SetIsSameAppKeyEnabled(/*is_enabled=*/false);
Crash reporting (iOS Only)
The Google Mobile Ads C++ SDK inspects exceptions that occur in an iOS app and records them if they are caused by the SDK. These exceptions are collected so we can prevent them in future SDK versions.
Crash reporting is enabled by default. If you don't want SDK-related exceptions
to be recorded, you can disable this feature by calling the
DisableSDKCrashReporting()
function. The best time to call this method is when
the app launches:
#include “firebase/gma.h”
firebase::gma::DisableSDKCrashReporting();
Crash reporting is not supported on Android devices.
Consent for cookies
If your app has special requirements on Android, you can set the optional
SharedPreferences
gad_has_consent_for_cookies
. See the
Consent for cookies
section of the Android Global Settings guide for more information.