{"id":23080821,"url":"https://github.com/appodeal/react-native-appodeal","last_synced_at":"2025-04-04T12:05:39.285Z","repository":{"id":25258458,"uuid":"103577360","full_name":"appodeal/react-native-appodeal","owner":"appodeal","description":"Official React Native package that adds Appodeal SDK support to your react-native application.","archived":false,"fork":false,"pushed_at":"2025-03-14T15:16:29.000Z","size":18086,"stargazers_count":70,"open_issues_count":6,"forks_count":38,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-28T11:06:10.862Z","etag":null,"topics":["advertising","android","appodeal","ios","react-native"],"latest_commit_sha":null,"homepage":"https://appodeal.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appodeal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2017-09-14T20:15:53.000Z","updated_at":"2025-03-24T11:33:29.000Z","dependencies_parsed_at":"2023-02-10T22:15:30.117Z","dependency_job_id":"eb93e8c1-3280-4e04-ac37-ba8bf6287463","html_url":"https://github.com/appodeal/react-native-appodeal","commit_stats":{"total_commits":82,"total_committers":9,"mean_commits":9.11111111111111,"dds":"0.24390243902439024","last_synced_commit":"57f2b4c817b952dfe4062ee364ca639ab39701f9"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appodeal%2Freact-native-appodeal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appodeal%2Freact-native-appodeal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appodeal%2Freact-native-appodeal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appodeal%2Freact-native-appodeal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appodeal","download_url":"https://codeload.github.com/appodeal/react-native-appodeal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247174387,"owners_count":20896075,"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":["advertising","android","appodeal","ios","react-native"],"created_at":"2024-12-16T13:16:41.812Z","updated_at":"2025-04-04T12:05:39.269Z","avatar_url":"https://github.com/appodeal.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-appodeal\n\nReact Native package that adds Appodeal SDK support to your react-native application.\n\n## Table of Contents\n\n- [react-native-appodeal](#react-native-appodeal)\n  - [Table of Contents](#table-of-contents)\n  - [Installation](#installation)\n      - [iOS](#ios)\n      - [Android](#android)\n  - [Usage](#usage)\n    - [Initialisation](#initialisation)\n    - [Callbacks](#callbacks)\n    - [Presentation](#presentation)\n  - [GDPR/CCPA](#gdprccpa)\n  - [Measurment](#measurment)\n    - [Ad Revenue](#ad-revenue)\n    - [Event Tracking](#event-tracking)\n    - [In-App Purchase validation](#in-app-purchase-validation)\n  - [Banner View](#banner-view)\n    - [Styling](#styling)\n    - [Callbacks](#callbacks-1)\n  - [MREC View](#mrec-view)\n    - [Callbacks](#callbacks-2)\n  - [Changelog](#changelog)\n\n## Installation\n\nRun following commands in project root directory\n\n`$ npm install react-native-appodeal --save` \n\n\u003e There are beta versions of Appodeal SDK available on the React Native. To \n\u003e install beta version of the plugin please add a tag `@beta` to the installation command:\n\u003e \n\u003e ```$ npm install react-native-appodeal@beta --save```\n\nIf you are using React Native version **lower than 0.60** run following command:\n\n`$ react-native link react-native-appodeal` \n\n#### iOS\n\n1. Go to `ios/` folder and open *Podfile*\n2. Add Appodeal adapters. Add pods into `./ios/Podfile`:\n\n```ruby\ntarget 'App' do\n    config = use_native_modules!\n\n    use_react_native!(\n        :path =\u003e config[:reactNativePath],\n        :hermes_enabled =\u003e false\n    )\n\n    pod 'Appodeal', '3.5.0'\n    pod 'APDAdjustAdapter', '3.5.0.0'\n    pod 'APDAmazonAdapter', '3.5.0.0'\n    pod 'APDAppLovinAdapter', '3.5.0.0'\n    pod 'APDAppLovinMAXAdapter', '3.5.0.0'\n    pod 'APDAppsFlyerAdapter', '3.5.0.0'\n    pod 'APDBidMachineAdapter', '3.5.0.0'\n    pod 'APDBidonAdapter', '3.5.0.0'\n    pod 'APDBigoAdsAdapter', '3.5.0.0'\n    pod 'APDDTExchangeAdapter', '3.5.0.0'\n    pod 'APDFacebookAdapter', '3.5.0.0'\n    pod 'APDFirebaseAdapter', '3.5.0.0'\n    pod 'APDGoogleAdMobAdapter', '3.5.0.0'\n    pod 'APDIABAdapter', '3.5.0.0'\n    pod 'APDInMobiAdapter', '3.5.0.0'\n    pod 'APDIronSourceAdapter', '3.5.0.0'\n    pod 'APDLevelPlayAdapter', '3.5.0.0'\n    pod 'APDMetaAudienceNetworkAdapter', '3.5.0.0'\n    pod 'APDMintegralAdapter', '3.5.0.0'\n    pod 'APDMyTargetAdapter', '3.5.0.0'\n    pod 'APDPangleAdapter', '3.5.0.0'\n    pod 'APDSentryAdapter', '3.5.0.0'\n    pod 'APDSmaatoAdapter', '3.5.0.0'\n    pod 'APDUnityAdapter', '3.5.0.0'\n    pod 'APDVungleAdapter', '3.5.0.0'\n    pod 'APDYandexAdapter', '3.5.0.0'\n    pod 'AppLovinMediationAmazonAdMarketplaceAdapter', '5.0.1.0'\n    pod 'AppLovinMediationBidMachineAdapter', '3.2.0.0.0'\n    pod 'AppLovinMediationBigoAdsAdapter', '4.6.0.0'\n    pod 'AppLovinMediationByteDanceAdapter', '6.4.1.2.0'\n    pod 'AppLovinMediationChartboostAdapter', '9.8.0.0'\n    pod 'AppLovinMediationFacebookAdapter', '6.16.0.0'\n    pod 'AppLovinMediationFyberAdapter', '8.3.5.0'\n    pod 'AppLovinMediationGoogleAdManagerAdapter', '11.13.0.0'\n    pod 'AppLovinMediationGoogleAdapter', '11.13.0.0'\n    pod 'AppLovinMediationInMobiAdapter', '10.8.0.0'\n    pod 'AppLovinMediationIronSourceAdapter', '8.7.0.0.0'\n    pod 'AppLovinMediationMintegralAdapter', '7.7.6.0.0'\n    pod 'AppLovinMediationMobileFuseAdapter', '1.8.2.0'\n    pod 'AppLovinMediationMolocoAdapter', '3.6.0.0'\n    pod 'AppLovinMediationMyTargetAdapter', '5.25.1.0'\n    pod 'AppLovinMediationOguryPresageAdapter', '5.0.2.0'\n    pod 'AppLovinMediationSmaatoAdapter', '22.9.2.0'\n    pod 'AppLovinMediationUnityAdsAdapter', '4.13.1.0'\n    pod 'AppLovinMediationVerveAdapter', '3.1.4.0'\n    pod 'AppLovinMediationVungleAdapter', '7.4.4.0'\n    pod 'AppLovinMediationYandexAdapter', '5.2.1.0'\n    pod 'BidMachineAmazonAdapter', '3.2.0.0'\n    pod 'BidMachineMetaAudienceAdapter', '3.2.0.0'\n    pod 'BidMachineMintegralAdapter', '3.2.0.0'\n    pod 'BidMachineMyTargetAdapter', '3.2.0.0'\n    pod 'BidMachinePangleAdapter', '3.2.0.0'\n    pod 'BidMachineVungleAdapter', '3.2.0.0'\n    pod 'BidonAdapterAmazon', '0.7.12.0'\n    pod 'BidonAdapterAppLovin', '0.7.12.0'\n    pod 'BidonAdapterBidMachine', '0.7.12.0'\n    pod 'BidonAdapterBigoAds', '0.7.12.0'\n    pod 'BidonAdapterChartboost', '0.7.12.0'\n    pod 'BidonAdapterDTExchange', '0.7.12.0'\n    pod 'BidonAdapterInMobi', '0.7.12.0'\n    pod 'BidonAdapterIronSource', '0.7.12.0'\n    pod 'BidonAdapterMetaAudienceNetwork', '0.7.12.0'\n    pod 'BidonAdapterMintegral', '0.7.12.0'\n    pod 'BidonAdapterMobileFuse', '0.7.12.0'\n    pod 'BidonAdapterMyTarget', '0.7.12.0'\n    pod 'BidonAdapterUnityAds', '0.7.12.0'\n    pod 'BidonAdapterVungle', '0.7.12.0'\n    pod 'BidonAdapterYandex', '0.7.12.0'\n    pod 'IronSourceAPSAdapter', '4.3.18.0'\n    pod 'IronSourceAdMobAdapter', '4.3.60.0'\n    pod 'IronSourceAppLovinAdapter', '4.3.52.0'\n    pod 'IronSourceBidMachineAdapter', '4.3.14.0'\n    pod 'IronSourceBigoAdapter', '4.3.4.0'\n    pod 'IronSourceFacebookAdapter', '4.3.47.0'\n    pod 'IronSourceFyberAdapter', '4.3.41.0'\n    pod 'IronSourceInMobiAdapter', '4.3.26.0'\n    pod 'IronSourceMintegralAdapter', '4.3.32.0'\n    pod 'IronSourceMobileFuseAdapter', '4.3.5.0'\n    pod 'IronSourceMolocoAdapter', '4.3.10.0'\n    pod 'IronSourceMyTargetAdapter', '4.1.27.0'\n    pod 'IronSourceOguryAdapter', '4.3.3.0'\n    pod 'IronSourcePangleAdapter', '4.3.39.0'\n    pod 'IronSourceSmaatoAdapter', '4.3.16.0'\n    pod 'IronSourceUnityAdsAdapter', '4.3.47.0'\n    pod 'IronSourceVerveAdapter', '4.3.4.0'\n    pod 'IronSourceVungleAdapter', '4.3.42.0'\n\n    target 'AppTests' do\n        inherit! :complete\n    end\n\n    use_native_modules!\n    use_frameworks!\nend\n```\n\nYou can change following implementation to use custom mediation setup. See [docs](https://docs.appodeal.com/ios/get-started#iOSSDK.GetStarted-Step1.ImportSDK).\n\n\u003e Note. Appodeal requires to use `use_frameworks!` . You need to remove Flipper dependency from Podfile and AppDelegate\n\n3. Run `pod install` \n4. Open `.xcworkspace`\n5. Configfure `info.plist`.\n\n- Add *SKAdNetworkIds* according to [doc](https://docs.appodeal.com/ios/get-started#add-skadnetworkids)\n\n- Configure *App Transport Security Settings*\n  ``` xml\n  \u003ckey\u003eNSAppTransportSecurity\u003c/key\u003e\n  \u003cdict\u003e\n    \u003ckey\u003eNSAllowsArbitraryLoads\u003c/key\u003e\n    \u003ctrue/\u003e\n  \u003c/dict\u003e\n  ```\n\n- Add *GADApplicationIdentifier* key (if you use Admob adapter).\n\n  ``` xml\n  \u003ckey\u003eGADApplicationIdentifier\u003c/key\u003e\n  \u003cstring\u003eYOUR_ADMOB_APP_ID\u003c/string\u003e\n  ```\n\n  For more information about Admob sync check out\n  our [FAQ](https://faq.appodeal.com/articles/4185565-how-do-i-link-my-admob-account).\n\n- Add `FacebookAppID`, `FacebookClientToken` and other parameters according to [doc](https://developers.facebook.com/docs/ios/getting-started/#configure-your-project) (if you use Meta Analytics adapter)\n\n  ``` xml\n  \u003ckey\u003eCFBundleURLTypes\u003c/key\u003e\n  \u003carray\u003e\n    \u003cdict\u003e\n    \u003ckey\u003eCFBundleURLSchemes\u003c/key\u003e\n    \u003carray\u003e\n      \u003cstring\u003efbAPP-ID\u003c/string\u003e\n    \u003c/array\u003e\n    \u003c/dict\u003e\n  \u003c/array\u003e\n  \u003ckey\u003eFacebookAppID\u003c/key\u003e\n  \u003cstring\u003eAPP-ID\u003c/string\u003e\n  \u003ckey\u003eFacebookClientToken\u003c/key\u003e\n  \u003cstring\u003eCLIENT-TOKEN\u003c/string\u003e\n  \u003ckey\u003eFacebookDisplayName\u003c/key\u003e\n  \u003cstring\u003eAPP-NAME\u003c/string\u003e\n  ```\n\n- Add `GoogleService-Info.plist` according to [doc](https://firebase.google.com/docs/ios/setup#add-config-file) (if you use Firebase  adapter)\n\n6. Run your project ( `Cmd+R` )\n\n#### Android\n\n1. Add Appodeal adapters. \n\nAdd dependencies into `build.gradle` (module: app)\n\n``` groovy\ndependencies {\n    ...\n    implementation 'com.appodeal.ads:sdk:3.5.0.0'\n    ...\n}\n```\n\nAdd repository into `build.gradle` (module: project)\n\n``` groovy\nallprojects {\n    repositories {\n        ...\n        jcenter()\n        maven { url \"https://artifactory.appodeal.com/appodeal\" }\n        ...\n    }\n}\n```\n\n\u003e Note. You can change following implementation to use custom mediation setup. See [Docs](https://docs.appodeal.com/android/get-started)\n\n2. Admob Configuration (if you use Admob adapter)\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=\"[ADMOB_APP_ID]\"/\u003e\n    \u003c/application\u003e\n\u003c/manifest\u003e\n```\n\nFor more information about Admob sync check out our [FAQ](https://faq.appodeal.com/en/articles/4185565-how-do-i-link-my-admob-account).\n\n3. Meta configuration (if you use Meta Analytics adapter)\n\n``` xml\n\u003cmanifest\u003e\n    \u003capplication\u003e\n       \u003cmeta-data\n            android:name=\"com.facebook.sdk.ApplicationId\"\n            android:value=\"[META_APP_ID]\" /\u003e\n        \u003cmeta-data\n            android:name=\"com.facebook.sdk.ClientToken\"\n            android:value=\"META_CLIENT_TOKEN\" /\u003e\n    \u003c/application\u003e\n\u003c/manifest\u003e\n```\n\n4. Add `google-services.json` according to [doc](https://firebase.google.com/docs/android/setup#add-config-file) (if you use Firebase  adapter)\n5. Run your project ( `Cmd+R` )\n\n## Usage\n\nPlease, read iOS and Android [docs](https://docs.appodeal.com/) to get deeper understanding how \nAppodeal SDK works.\n\n### Initialisation\n\n1. Initialise Appodeal at the application launch.\n\n``` javascript\nimport {\n    Appodeal,\n    AppodealAdType\n} from 'react-native-appodeal';\n\nconst adTypes = AppodealAdType.INTERSTITIAL | AppodealAdType.REWARDED_VIDEO | AppodealAdType.BANNER;\nAppodeal.initialize('Your app key', adTypes)\n```\n\n2. Configure SDK\n\n* General configuration\n\n``` javascript\nimport {\n    Appodeal,\n    AppodealAdType,\n    AppodealLogLevel,\n} from 'react-native-appodeal';\n// Set ad auto caching enabled or disabled\n// By default autocache is enabled for all ad types\n// Call this method before or after initilisation\nAppodeal.setAutoCache(AppodealAdType.INTERSTITIAL, false);\n// Set testing mode\n// Call this method before initilisation\nAppodeal.setTesting(bool);\n// Set Appodeal SDK logging level\n// Call this method before initilisation\nAppodeal.setLogLevel(AppodealLogLevel.DEBUG);\n// Enable or disable child direct threatment\n// Call this method before initilisation\nAppodeal.setChildDirectedTreatment(false);\n// Disable network for specific ad type:\n// Call this method before initilisation\nAppodeal.disableNetwork(\"some_network \", AppodealAdType.INTERSTITIAL);\n// Enable or disable triggering show for precache ads\n// Call this method before or after initilisation\nAppodeal.setTriggerPrecacheCallbacks(true, AppodealAdType.BANNER);\n```\n\n* Segments and targeting. \n\n``` javascript\nimport {\n    Appodeal,\n    AppodealGender\n} from 'react-native-appodeal';\n// Set specific user id from attribution system\n// Call this method before initilisation\nAppodeal.setUserId('some user ud')\n// Set user age\n// Call this method before or after initilisation\nAppodeal.setCustomStateValue(25, 'appodeal_user_age');\n// Set user gender\n// Supported values are male | female\n// Call this method before of after initilisation\nAppodeal.setCustomStateValue(AppodealGender.FEMALE, 'appodeal_user_gender');\n\n// Set segment filter\n// Call this method before of after initilisation\nAppodeal.setCustomStateValue(levelsPlayed, 'levels_played');\nAppodeal.setCustomStateValue(10, 'user_rank');\nAppodeal.setCustomStateValue(false, 'paid');\n// Set extras\nAppodeal.setExtrasValue(\"some value\", 'attribuition_id');\n```\n\n* Banner specific\n\n``` javascript\nimport {\n    Appodeal\n} from 'react-native-appodeal';\n// Enable or disable tablet banners.\n// Call this method before of after initilisation\nAppodeal.setTabletBanners(false);\n// Enable or disable smart banners.\n// iOS smart banners are supported only \n// for applications where autoration is disabled\n// Call this method before of after initilisation\nAppodeal.setSmartBanners(false);\n// Enable or disable banner refresh animation\n// Call this method before of after initilisation\nAppodeal.setBannerAnimation(true);\n```\n\n### Callbacks\n\nSet callbacks listener to get track of ad lifecycle events. \n\n1. SDK\n\nInitialization callback. Fired when SDK is fully initialized\n\n``` javascript\nimport {\n    Appodeal,\n    AppodealSdkEvent\n} from 'react-native-appodeal';\n\nAppodeal.addEventListener(AppodealSdkEvent.INITIALIZED, () =\u003e\n    console.log(\"Appodeal SDK did initialize\");\n);\n```\n\nAd revenue callback. Fired when SDK is shown ad impression and register revenue\n\n```javascript\nAppodeal.addEventListener(\n    AppodealSdkEvent.AD_REVENUE,\n    (revenue: AppodealAdRevenue) =\u003e {\n        console.log('Appodeal SDK did receive ad revenue: ', revenue);\n    },\n);\n```\n\nwhere ad revenue is object that contains:\n\n| Property         | Type           | Desctiption                                                                                        |\n|------------------|----------------|----------------------------------------------------------------------------------------------------|\n| networkName      | string         | Name of Ad Network                                                                                 |\n| adUnitName       | string         | Name of Appodeal Ad Unit                                                                           |\n| placement        | string         | Name of impression placement                                                                       |\n| revenuePrecision | string         | Revenue precision                                                                                  |\n| demandSource     | string         | Demand Source name. Bidder name in case of impression from real time bidding or name of ad network |\n| currency         | string         | Revenue currency. USD                                                                              |\n| revenue          | number         | Revenue amount                                                                                     |\n| adType           | AppodealAdType | Impression ad type                                                                                 |\n\n2. Banner\n\n``` javascript\nimport {\n    Appodeal,\n    AppodealBannerEvent\n} from 'react-native-appodeal';\n\nAppodeal.addEventListener(AppodealBannerEvent.LOADED, (event: any) =\u003e\n    console.log(\"Banner loaded. Height: \", event.height + \", precache: \" + event.isPrecache)\n);\nAppodeal.addEventListener(AppodealBannerEvent.SHOWN, () =\u003e\n    console.log(\"Banner shown\")\n);\nAppodeal.addEventListener(AppodealBannerEvent.EXPIRED, () =\u003e\n    console.log(\"Banner expired\")\n);\nAppodeal.addEventListener(AppodealBannerEvent.CLICKED, () =\u003e\n    console.log(\"Banner was clicked\")\n);\nAppodeal.addEventListener(AppodealBannerEvent.FAILED_TO_LOAD, () =\u003e\n    console.log(\"Banner failed to load\")\n);\n```\n\n3. Interstitial\n\n``` javascript\nimport {\n    Appodeal,\n    AppodealInterstitialEvent\n} from 'react-native-appodeal';\n\nAppodeal.addEventListener(AppodealInterstitialEvent.LOADED, (event: any) =\u003e\n    console.log(\"Interstitial loaded. Precache: \", event.isPrecache)\n);\nAppodeal.addEventListener(AppodealInterstitialEvent.SHOWN, () =\u003e \n    console.log(\"Interstitial shown\")\n);\nAppodeal.addEventListener(AppodealInterstitialEvent.EXPIRED, () =\u003e\n    console.log(\"Interstitial expired\")\n);\nAppodeal.addEventListener(AppodealInterstitialEvent.CLICKED, () =\u003e\n    console.log(\"Interstitial was clicked\")\n);\nAppodeal.addEventListener(AppodealInterstitialEvent.CLOSED, () =\u003e\n    console.log(\"Interstitial closed\")\n);\nAppodeal.addEventListener(AppodealInterstitialEvent.FAILED_TO_LOAD, () =\u003e\n    console.log(\"Interstitial failed to load\")\n);\nAppodeal.addEventListener(AppodealInterstitialEvent.FAILED_TO_SHOW, () =\u003e\n    console.log(\"Interstitial failed to show\")\n);\n```\n\n4. Rewarded video\n\n``` javascript\nimport {\n    Appodeal,\n    AppodealRewardedEvent\n} from 'react-native-appodeal';\n\nAppodeal.addEventListener(AppodealRewardedEvent.LOADED, (event: any) =\u003e\n    console.log(\"Rewarded video loaded. Precache: \", event.isPrecache)\n);\nAppodeal.addEventListener(AppodealRewardedEvent.SHOWN, () =\u003e\n    console.log(\"Rewarded video shown\")\n);\nAppodeal.addEventListener(AppodealRewardedEvent.EXPIRED, () =\u003e\n    console.log(\"Rewarded video expired\")\n);\nAppodeal.addEventListener(AppodealRewardedEvent.CLICKED, () =\u003e \n    console.log(\"Rewarded video was clicked\")\n);\nAppodeal.addEventListener(AppodealRewardedEvent.REWARD, (event: any) =\u003e\n    console.log(\"Rewarded video finished. Amount: \", event.amount + \", currency: \" + event.currency)\n);\nAppodeal.addEventListener(AppodealRewardedEvent.CLOSED, (event: any) =\u003e\n    console.log(\"Rewarded video closed, is finished: \", event.isFinished)\n);\nAppodeal.addEventListener(AppodealRewardedEvent.FAILED_TO_LOAD, () =\u003e\n    console.log(\"Rewarded video failed to load\")\n);\nAppodeal.addEventListener(AppodealRewardedEvent.FAILED_TO_SHOW, () =\u003e\n    console.log(\"Rewarded video failed to show\")\n);\n```\n\n### Presentation\n\n\u003e Note. All presentation specific methods are available only after SDK initialisation\n\n1. Caching\n\nIf you disable autocache you should call `cache` method before trying to show any ad\n\n``` javascript\nAppodeal.cache(AppodealAdType.INTERSTITIAL)\n```\n\n2. Check that ad is loaded and can be shown\n\n``` javascript\n// Check that interstitial \nconst canShow = Appodeal.canShow(AppodealAdType.INTERSTITIAL, 'your_placement');\nconsole.log(\"Interstitial \", canShow ? \"can be shown\" : \"can not be shown\");\n// Check that banner is loaded \nconst isLoaded = Appodeal.isLoaded(AppodealAdType.BANNER);\nconsole.log(\"Banner \", isLoaded ? \"is loaded\" : \"is not loaded\");\n```\n\n3. Show advertising\n\n``` javascript\n// Show banner at the top of screen\nAppodeal.show(AppodealAdType.BANNER_TOP)\n// Show interstitial for specific pacement\nAppodeal.show(AppodealAdType.INTERSTITIAL, 'your_placement')\n```\n\n4. Hide\n\nYou can hide banner ad after it was shown. Call `hide` method with another ad types won't affect anything\n\n``` javascript\nAppodeal.hide(AppodealAdType.BANNER_TOP)\n```\n\n## GDPR/CCPA\n\nAppodeal since 3.0.0 is supports GDPR and CCPA regulations by default. It will automatically detect \nregulation zone and show all required consent dialog at the very first initialization moment if it is needed. \n\n\u003e Since **v3.2.2** plugin fully supports TCFv2 and Google UMP. To properly set UMP messages \n\u003e please read [the following guide](https://docs.appodeal.com/advanced/google-cmp-and-tcfv2-support).\n\nIf you need more control of user consent in your app you can manually request consent information update,\nshow form or revokes previously obtained user consent\n\n``` javascript\n\nimport {\n    Appodeal,\n    AppodealConsentStatus\n} from 'react-native-appodeal';\n\n// Get current consent status\nswitch (Appodeal.consentStatus()) {\n    case AppodealConsentStatus.UNKNOWN: \n        // The SDK did not request consent info update yet\n    case AppodealConsentStatus.REQUIRED:\n        // A user is under regulations and should provides a consent\n    case AppodealConsentStatus.NOT_REQUIRED:\n        // A user is not under regulations\n    case AppodealConsentStatus.OBTAINED:\n        // A user is under regulations and and already provides a consent\n}\n\n// Request consent info update promise that returns updated status\nAppodeal.requestConsentInfoUpdate('Your app key')\n    .then((status) =\u003e console.log(status))\n    .catch((error) =\u003e console.log(error))\n\n// Load and show consent form only if consent status is REQUIRED\nAppodeal.showConsentFormIfNeeded()\n    .then((status) =\u003e console.log(status))\n    .catch((error) =\u003e console.log(error))\n\n// Force load and show consent form \nAppodeal.showConsentForm()\n    .then((status) =\u003e console.log(status))\n    .catch((error) =\u003e console.log(error))\n\n// Removes previously obtained consent\nAppodeal.revokeConsent();\n\n```\n\n## Measurment\n\n### Ad Revenue\n\nAd revenue tracking is available by default for Firebase, AppsFlyer and Adjust. To use it you will need to add Appodeal's Firebase, AppsFlyer or Adjust adapters accordingly.\n\n### Event Tracking\n\nEvent tracking is available for Firebase, AppsFlyer, Adjust and Meta. Add this adapters in your App and call following method:\n\n``` javascript\nimport {\n    Appodeal\n} from 'react-native-appodeal';\n\nAppodeal.trackEvent('app_event');\nAppodeal.trackEvent('app_event', { 'some_key', 'some_value' });\n```\n\n### In-App Purchase validation\n\nIn-App Purchase validation is available by AppsFlyer or Adjust MMPs. After validation purchase will track automatically. To use this you will need to one of Adjust or AppsFlyer adapters into the App, enable validation on MMP's side and call following method:\n\n``` javascript\nimport {\n    Appodeal,\n    AppodealIOSPurchaseType,\n    AppodealAndroidPurchaseType\n} from 'react-native-appodeal';\n\nif (Platform.OS === 'ios') {\n    Appodeal.validateAndTrackInAppPurchase({\n        productId: \"Product ID\",\n        productType: AppodealIOSPurchaseType.AUTO_RENEWABLE_SUBSCRIPTION,\n        price: 9.99,\n        currency: \"USD\",\n        transactionId: \"Transaction ID\"\n    }, (result, error) =\u003e \n        console.log(\"Purchase validation \", result ? \"successed\" : \"failed\");\n    );\n} else if (Platform.OS === 'android') {\n    if (Platform.OS === 'ios') {\n    Appodeal.validateAndTrackInAppPurchase({\n        publicKey: \"Public Key\",\n        productType: AppodealAndroidPurchaseType.SUBSCRIPTION,\n        signature: \"Signature\",\n        purchaseData: \"Purchase data\",\n        purchaseToken: \"Token\",\n        timestamp: 12345678,\n        developerPayload: \"payload\",\n        price: \"9.99\",\n        currency: \"USD\",\n        orderId: \"Order\",\n        sku: \"SKU\"\n    }, (result, error) =\u003e \n        console.log(\"Purchase validation \", result ? \"successed\" : \"failed\");\n    );\n}\n```\n\n## Banner View\n\nAppodealBanner is a component that allows you to display ads in a banner format (know as _AppodealBannerView_).\n\nBanners are available in 3 sizes:\n\n* `phone` (320x50)\n* `tablet` (728x90)\n\nAppodeal Banner View can be used only *after* Appodeal SDK was initialized. You can show only *one* banner on the screen.\nStatic banners (top or bottom) can't be used in one session with _AppodealBanner_. \n\n``` javascript\nimport {\n    AppodealBanner\n} from 'react-native-appodeal';\n\n\u003cAppodealBanner\n    style = {{\n        height: 50,\n        width: '100%',\n        backgroundColor: 'hsl(0, 0%, 97%)',\n        alignContent: 'stretch',\n    }}\n    adSize = 'phone'\n    usesSmartSizing // (iOS specific) on Android smart banners are enabled by default.\n/\u003e\n```\n\nWhen banner is added on screen it starts to load ad automatically event if autocache is disabled.\n\n### Styling\n\nHeight property of banner styles should corresponds to *adSize* attribute. We recommend to use \n\n| adSize   | height |\n|----------|--------|\n| 'phone'  | 50     |\n| 'tablet' | 90     |\n\n### Callbacks\n\nBanner view has explicit callbacks. \n\n``` javascript\n\u003cAppodealBanner\n    style = {styles.banner}\n    adSize = 'phone'\n    usesSmartSizing // (iOS specific) on Android smart banners are enabled by default.\n    onAdLoaded = {() =\u003e console.log(\"Banner view did load\")}\n    onAdExpired = {() =\u003e console.log(\"Banner view expired\")}\n    onAdClicked = {() =\u003e console.log(\"Banner view is clicked\")}\n    onAdFailedToLoad = {() =\u003e console.log(\"Banner view is failed to load\")}\n/\u003e\n```\n\n## MREC View\n\nAppodealMrec is a component that allows you to display ads in a MREC (banner with size of 300x250) format (know as _AppodealMrecView_).\n\nAppodeal MREC View can be used only *after* Appodeal SDK was initialized. You can show only *one* MREC on the screen.\n\n``` javascript\nimport {\n    AppodealMrec\n} from 'react-native-appodeal';\n\n\u003cAppodealMrec\n    style = {{\n        backgroundColor: 'hsl(0, 0%, 97%)',\n        alignContent: 'stretch',\n    }}\n/\u003e\n```\n\nWhen banner is added on screen it starts to load ad automatically event if autocache is disabled.\n\n### Callbacks\n\nMREC view has explicit callbacks. \n\n``` javascript\n\u003cAppodealMrec\n    style = {styles.mrec}\n    onAdLoaded = {() =\u003e console.log(\"MREC view did load\")}\n    onAdExpired = {() =\u003e console.log(\"MREC view expired\")}\n    onAdClicked = {() =\u003e console.log(\"MREC view is clicked\")}\n    onAdFailedToLoad = {() =\u003e console.log(\"MREC view is failed to load\")}\n/\u003e\n```\n\n## Changelog\n\n3.5.0\n\n* Updated Appodeal Android SDK to v3.5.0\n* Updated Appodeal iOS SDK to v3.5.0\n\n3.4.1\n\n* Updated Appodeal Android SDK to v3.4.1\n* Updated Appodeal iOS SDK to v3.4.1\n\n3.4.0-beta.1\n\n* Update Appodeal iOS SDK to 3.4.0-beta.2 (beta)\n* Update Appodeal Android SDK to 3.4.0-beta.1 (beta)\n\n\n3.3.3\n\n* Update Appodeal Android SDK to 3.3.3 (stable)\n* Update Appodeal iOS SDK to 3.3.3 (stable)\n* Support Xcode 16 and iOS 18.0\n\n3.3.2\n\n* Update Appodeal to 3.3.2 (stable)\n\n3.3.1\n\n* Update Appodeal to 3.3.1 (stable)\n\n3.3.0\n\n* Update Appodeal to 3.3.0 (stable)\n\n3.2.3\n\n* Update Appodeal to 3.2.1 (stable)\n  \n3.2.2-Beta \n\n* Update Appodeal 3.2.1-beta.1\n* Supports TCFv2 and Google UMP\n* Removes `updateGDPRConsent`\n* Removes `updateCCPAConsent`\n* Adds `consentStatus`\n* Adds `requestConsentInfoUpdate`\n* Adds `showConsentFormIfNeeded`\n* Adds `showConsentForm`\n* Adds `revokeConsent`\n\n\n3.2.1\n\n* Update Appodeal to 3.2.0 (stable)\n\n\n3.2.0-Beta\n\n* Update Appodeal to 3.2.0-beta.1\n\n\n3.1.4\n\n* Switch to stable release\n\n\n3.1.3-Beta\n\n* Update Appodeal to 3.1.3-beta.1\n* Update Banner View for Android\n* Split Mrec and Banner Views\n\n\n3.0.2\n\n* Update Appodeal to 3.0.2\n\n\n3.0.1\n\n* Update Appodeal to 3.0.1 \n* Add ad revenue callback\n\n\n3.0.0 \n\n* Update Appodeal to 3.0.0 \n* Refactor plugin API. See doc above\n\n\n2.11.0\n\n* Update Appodeal to 2.11.0 (Stable)\n* Bump Android `compileSdkVersion` to **31**.\n* Bump Android `buildToolsVersion` to **31.0.0**\n* Remove methods:\n\n``` javascript\nAppodeal.disableLocationPermissionCheck();\nAppodeal.disableWriteExternalStoragePermissionCheck();\nAppodeal.requestAndroidMPermissions(params =\u003e {});\n```\n \n\n2.10.3\n\n* Update Appodeal to 2.10.3 (Stable)\n* Improvements of AppodealBanner behaviour\n\n\n2.10.2\n\n* Update Appodeal to 2.10.2 (Stable)\n\n\n2.10.1 \n\n* Update Appodeal to 2.10.1 (Stable)\n\n\n2.10.0-Beta\n\n* Update Appodeal to 2.10.0 (Beta)\n* [iOS] Fix `disableNetwork` method\n\n\n2.9.1\n\n* Update Appodeal to 2.9.0 (Stable)\n\n\n2.9.0\n\n* Update Appodeal to 2.9.0 (Beta)\n\n\n2.8.2\n\n* Update Appodeal to 2.8.1 (Stable)\n\n\n2.8.1-Beta\n\n* Update Appodeal to 2.8.1 (Beta)\n* [Android] Add method `setSharedAdsInstanceAcrossActivities`\n\n\n2.7.7\n\n* [iOS] Fix `setOnLoadedTriggerBoth` method\n* [Android] Fix `requestAndroidMPermissions` method\n* Fix paramaters in `AppodealRewardedEvent.CLOSED` callback\n\n\n2.7.6\n\n* [iOS] Update Appodeal to 2.7.5\n* [Android] Update Appodeal to 2.7.4\n\n\n2.8.0-Beta\n\n* Update Appodeal to 2.8.0 \n\n\n2.7.5\n\n* [iOS] Add smart banners to banner view. Change pod dependency to Appodeal to 2.7.4\n\n\n2.7.4\n\n* [iOS] Update Appodeal to 2.7.4\n* [Android] Fixes in banner view\n\n\n2.7.3-Beta\n\n* Update Appodeal to 2.7.3-Beta\n\n\n2.7.2-Beta\n\n* Update Appodeal to 2.7.2-Beta\n* Add deeper Consent Manager integration\n\n\n2.6.5\n\n* Update Appodeal to 2.6.5\n* Fix iOS banner view\n\n\n2.6.4\n\n* Update Appodeal to 2.6.4\n* Add banner view and MREC support\n* Add Consent Manager support\n\n\n2.6.3\n\n* Update Appodeal to 2.6.3\n* Refactor plugin\n* Update dependency management\n\n\n2.1.4 \n\n* release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappodeal%2Freact-native-appodeal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappodeal%2Freact-native-appodeal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappodeal%2Freact-native-appodeal/lists"}