{"id":17061955,"url":"https://github.com/kmcgill88/admob_flutter","last_synced_at":"2025-05-16T11:03:50.824Z","repository":{"id":33730844,"uuid":"161095292","full_name":"kmcgill88/admob_flutter","owner":"kmcgill88","description":"Admob Flutter plugin that shows banner ads using native platform views.","archived":false,"fork":false,"pushed_at":"2024-08-12T05:04:32.000Z","size":337,"stargazers_count":435,"open_issues_count":113,"forks_count":153,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-09T05:04:23.456Z","etag":null,"topics":["admob","admob-plugin","android","dart","flutter","ios","monetization","plugin"],"latest_commit_sha":null,"homepage":"https://pub.dartlang.org/packages/admob_flutter","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kmcgill88.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["kmcgill88"],"custom":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=29U56USLAJTSY\u0026source=url"]}},"created_at":"2018-12-10T00:33:18.000Z","updated_at":"2024-11-10T12:08:38.000Z","dependencies_parsed_at":"2024-11-29T02:12:59.637Z","dependency_job_id":"941feac3-f76a-494f-aef5-3163ec655bce","html_url":"https://github.com/kmcgill88/admob_flutter","commit_stats":{"total_commits":84,"total_committers":18,"mean_commits":4.666666666666667,"dds":0.5238095238095238,"last_synced_commit":"71fec05a135c471548e0cf74e754f49dbc014d9b"},"previous_names":["youssefkababe/admob_flutter"],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmcgill88%2Fadmob_flutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmcgill88%2Fadmob_flutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmcgill88%2Fadmob_flutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kmcgill88%2Fadmob_flutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kmcgill88","download_url":"https://codeload.github.com/kmcgill88/admob_flutter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254518384,"owners_count":22084374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["admob","admob-plugin","android","dart","flutter","ios","monetization","plugin"],"created_at":"2024-10-14T10:48:46.454Z","updated_at":"2025-05-16T11:03:50.803Z","avatar_url":"https://github.com/kmcgill88.png","language":"Dart","funding_links":["https://github.com/sponsors/kmcgill88","https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=29U56USLAJTSY\u0026source=url"],"categories":["组件","Monetization [🔝](#readme)","Components"],"sub_categories":["赚钱","推广和盈利","Monetization"],"readme":"# Looking for Maintainers.\nUnfortunately I haven't been able to keep up with demand for features and improvments. If you are interested in helping maintain this repo please create an issue requesting maintainer status. Or consider using the new [google_mobile_ads](https://pub.dev/packages/google_mobile_ads) by Google.\n\n\n# admob_flutter\n[![Build Status](https://app.bitrise.io/app/aab4844dfe687df4/status.svg?token=0rKyF3lAc5Q73hC9f3H0EQ)](https://app.bitrise.io/app/aab4844dfe687df4)\n[![version](https://img.shields.io/badge/Awesome-Flutter-blue.svg?longCache=true\u0026style=flat-square)](https://github.com/Solido/awesome-flutter/)\n[![version](https://img.shields.io/pub/v/admob_flutter.svg?style=flat-square)](https://pub.dartlang.org/packages/admob_flutter)\n[![GitHub stars](https://img.shields.io/github/stars/kmcgill88/admob_flutter.svg?style=social\u0026label=Star)](https://github/kmcgill88/admob_flutter)\n[![GitHub forks](\thttps://img.shields.io/github/forks/kmcgill88/admob_flutter.svg?style=social\u0026label=Forks)](https://github/kmcgill88/admob_flutter)\n[![GitHub issues](\thttps://img.shields.io/github/issues/kmcgill88/admob_flutter.svg?style=social\u0026label=Issues)](https://github/kmcgill88/admob_flutter)\n\n\n![Demo](https://i.imgur.com/zJC41es.gif)\n\nA Flutter plugin that uses native platform views to show Admob banner ads!\n\nThis plugin also has support for Interstitial and Reward ads.\n\n# Installation\n\n- Add this to your package's pubspec.yaml file:\n\n```yaml\ndependencies:\n  admob_flutter: \"\u003cLATEST_VERSION\u003e\"\n\n```\n\n- Install it - You can install packages from the command line:\n\n```sh\nflutter pub get\n```\n\n## Android Specific Setup\n### Update your AndroidManifest.xml\n\nAdd your AdMob App ID to your app's AndroidManifest.xml file by adding the `\u003cmeta-data\u003e` tag shown below. You can find your App ID in the AdMob UI. For android:value insert your own AdMob App ID in quotes, as shown below.\n\nYou can use these test App ID's from Admob for development:\n```\nAndroid: ca-app-pub-3940256099942544~3347511713\niOS: ca-app-pub-3940256099942544~1458002511\n```\n\n```xml\n\u003cmanifest\u003e\n  \u003capplication\u003e\n    \u003cmeta-data\n      android:name=\"com.google.android.gms.ads.APPLICATION_ID\"\n      android:value=\"ca-app-pub-3940256099942544~3347511713\"/\u003e\n  \u003c/application\u003e\n\u003c/manifest\u003e\n```\n\n## iOS Specific Setup\nUpdate your `Info.plist` per [Firebase instructions](https://developers.google.com/admob/ios/quick-start#update_your_infoplist).\n```xml\n\u003ckey\u003eGADApplicationIdentifier\u003c/key\u003e\n\u003cstring\u003eca-app-pub-3940256099942544~1458002511\u003c/string\u003e\n```\nand add\n```xml\n\u003ckey\u003eio.flutter.embedded_views_preview\u003c/key\u003e\n\u003ctrue/\u003e\n```\n\nStarting from Beta 6, you also need to display the App Tracking Transparency authorization request for accessing the IDFA,\nso you have to update your `Info.plist` to add the `NSUserTrackingUsageDescription` key with a custom message describing your usage.\nBelow is an example description text:\n```xml\n\u003ckey\u003eNSUserTrackingUsageDescription\u003c/key\u003e\n\u003cstring\u003eThis identifier will be used to deliver personalized ads to you.\u003c/string\u003e\n```\n\nSee [Prepare for iOS 14+](https://developers.google.com/admob/ios/ios14) for more information.\nYou also need to update your `ios/Podfile` by adding `platform :ios, '9.0'` at the very top of your file.\n\n### Initialize the plugin\n\nFirst thing to do before attempting to show any ads is to initialize the plugin. You can do this in the earliest starting point of your app, your `main` function:\n\n```dart\nimport 'package:admob_flutter/admob_flutter.dart';\n\nvoid main() {\n  WidgetsFlutterBinding.ensureInitialized();\n  // Initialize without device test ids.\n  Admob.initialize();\n  // Or add a list of test ids.\n  // Admob.initialize(testDeviceIds: ['YOUR DEVICE ID']);\n}\n```\n\nIf you're using iOS, you may also need to request the tracking authorization in order to display personalized ads:\n\n```dart\n// Run this before displaying any ad.\nawait Admob.requestTrackingAuthorization();\n```\n\n### Supported Platforms\n- `0.3.0` \u003e= iOS\n- `0.2.0` \u003e= AndroidX\n\n### Supported Admob features\n- Banner Ads\n- Interstitial Ads\n- Reward Ads\n- Native Ads (Coming soon)\n\n### Check out the [repository Wiki](https://github.com/kmcgill88/admob_flutter/wiki) for more info!\n\n# FAQ\n- Why doesn't the Admob Banner class have a dispose method?\n    - TL;DR - It's called automatically for you. Longer reason see [94](https://github.com/kmcgill88/admob_flutter/issues/94)\n- failed to load ad : 3\n    - TL;DR - Things are working correctly, Admob didn't give you an ad. If the app id + ad unit is new, give it 24/48 hours. See:[161](https://github.com/kmcgill88/admob_flutter/issues/161) [stackoverflow](https://stackoverflow.com/questions/33566485/failed-to-load-ad-3)\n    - See all [Admob codes](https://support.google.com/admob/thread/3494603?hl=en)\n- Ads are not loading\n    - TL;DR - Make sure you have the correct combination of id's per platform. See:[161](https://github.com/kmcgill88/admob_flutter/issues/161)\n- Objective-C based project cannot build\n    - TL;DR - You have to enable swift support for your flutter project. See: [stackoverflow](https://stackoverflow.com/questions/52244346/how-to-enable-swift-support-for-existing-project-in-flutter) and [123](https://github.com/kmcgill88/admob_flutter/issues/123)\n- How do I manage consentement for users in the European Economic Area?\n    - Pass `nonPersonalizedAds: true` to the classes constructor (`AdmobBanner`, `AdmobInterstitial` and `AdmobReward`) in order to not display personalized ads for users who don't give their consent. A way to ask users for their consent is to use the plugin [admob_consent](https://pub.dev/packages/admob_consent). Please note that the new recommended is to use the brand new UMP SDK ([Android](https://developers.google.com/admob/ump/android/quick-start), [iOS](https://developers.google.com/admob/ump/ios/quick-start)).\n\n# Recipes\n- [AppBar Banner](https://mcgilldevtech.com/2020/08/admob-flutter-appbar-banner-recipe/)\n\n# Pull Requests\n\nI welcome and encourage all pull requests. Here are some basic rules to follow to ensure timely addition of your request:\n\n1.  Match the document style as closely as possible.\n1.  Please keep PR titles easy to read and descriptive of changes, this will make them easier to review/merge.\n1.  Pull requests _must_ be made against `master` branch for this repository.\n1.  Check for existing [issues](https://github.com/kmcgill88/admob_flutter/issues) first, before filing an issue.\n1.  Check the [project board](https://github.com/kmcgill88/admob_flutter/projects/1), before filing an issue.\n1.  Read the [FAQ](https://github.com/kmcgill88/admob_flutter#faq), before filing an issue.\n1.  Have fun!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkmcgill88%2Fadmob_flutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkmcgill88%2Fadmob_flutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkmcgill88%2Fadmob_flutter/lists"}