All skills
google avatar

/google-mobile-ads-banner

@329fa26
by googlegoogle/skills21k stars
1,698

Provides instructions to implement, integrate, or configure Google Mobile Ads (GMA) banner ads in Android, iOS, or Unity mobile applications. Use when the task involves setting up banner ads in a mobile application. Don't use for other ad formats like interstitial or rewarded ads.

Use this Skill: https://skilld.dev/gh/google/skills/google-mobile-ads-banner

This session only. Nothing lands on disk.

referencesios-banner.md

≈447 tokens on demand. Your agent reads this file only when SKILL.md points to it.

AI Integration Agent Instructions for Banner Ads

Gotchas

Google Mobile Ads SDK uses NS_SWIFT_NAME macros to provide idiomatic Swift names.

Banner ad workflow

  1. Define the ad view

    • Use the test ad unit ID of ca-app-pub-3940256099942544/2435281174.
    • ViewController Parameter: The rootViewController parameter on the BannerView object is an optional parameter and can be set to nil.
  2. Set the ad size

    • Set the width you use for AdSize to 375 for testing purposes. Mention using the device width is also a common approach.
    • Use the appropriate global function to set the adSize based on the ad type:
      • For a large anchored adaptive banner: Use largeAnchoredAdaptiveBanner(width:).
        • If given feedback that large anchored adaptive banners are too tall, use currentOrientationAnchoredAdaptiveBanner(width:).
      • For an inline adaptive banner: Use currentOrientationInlineAdaptiveBanner(width:).
  3. Register for ad load events

    • Set the delegate on the BannerView object.
  4. Load the banner ad

  5. Verify the implementation: Verify the build to ensure there are no compile errors:

    • If xcodebuild is available: Run xcodebuild to programmatically verify that the iOS project compiles properly with the GMA SDK. Resolve any GMA-SDK related compile errors.
    • If xcodebuild is NOT available: Output instructions directing the user to build the project in Xcode and manually verify there are no compile errors.

Links

Additional documentation:

Source: SKILL.md on GitHub

No alerts8d3 checks · Risk SAFE
  • Gen Agent Trust Hub8d

    This skill provides instructions for implementing Google Mobile Ads banner ads across various platforms. It includes standard developer workflows, such as using local build tools to verify code integrity, and references official documentation.

  • Socket8d

    No alerts

  • Snyk8d

    Risk: LOW · No issues

Signed by skilld at 329fa26. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last week
metadata
{
  "version": "1.1.0",
  "category": "GoogleAds"
}

README badge

README badge for google/skills/google-mobile-ads-banner