Ad Support (React Native)
Setup Prerequisites
Firework React Native SDK is already integrated into your app.
Contact our business team you are coordinating with and ensure your Firework account has ads functionality enabled.
Google AdMob Support(Only supported on iOS)
Setup Native Project
iOS
Installation
Add the following codes in the Podfile
of your iOS project.
FireworkVideoGAMSupport
depends on Google-Mobile-Ads-SDK
.
Additional steps required by Mobile Ads SDK (iOS)
Please refer to the instruction to update your
Info.plist
.Ensure compliance with user consent policies by reviewing the Google User Messaging Platform (UMP) Get Started guide.
Please refer to the Mobile Ads SDK (iOS) document for more details.
Integration
In your iOS project, you need to call FireworkVideoGAMSupportSDK.initializeSDK()
in application(:, didFinishLaunchingWithOptions:) -> Bool
method.
If your AppDelegate
class is written by Objective-C, you should create a Swift file to call the API. For example, you could create FireworkSupportLibraryBridge.swift
and add the following codes.
Then add [FireworkSupportLibraryBridge enableVideoGAM];
on application:didFinishLaunchingWithOptions:
method.
User Consent
You should use the Google User Messaging Platform to obtain user consent if required for your geography. To customize the setup of the SDK until after user consent is obtained, call FireworkVideoGAMSupportSDK.initializeSDK
with startGADMobileAds
set to false.
If your AppDelegate
class is written by Objective-C, you should create a Swift file to call the API. For example, you could create FireworkSupportLibraryBridge.swift
and add the following codes.
Then add [FireworkSupportLibraryBridge enableVideoGAM];
on application:didFinishLaunchingWithOptions:
method.
After user consent is obtained, then follow the instruction for starting the Mobile Ads SDK (iOS).
Android
Please refer to the Mobile Ads SDK (Android) to add your
AdMob app ID
to your app's AndroidManifest.xml file.Ensure compliance with user consent policies by reviewing the Google User Messaging Platform (UMP) Get Started guide.
Google IMA Support
Setup Native Project
iOS
Installation
Add the following codes in the Podfile
of your iOS project.
FireworkVideoGIMASupport
depends on GoogleAds-IMA-iOS-SDK
. For more details, please refer to IMA SDK for iOS.
Integration
In your iOS project, you need to call FireworkVideoGIMASupportSDK.enableIMAAds()
in application(:, didFinishLaunchingWithOptions:) -> Bool
method.
If your AppDelegate
class is written by Objective-C, you should create a Swift file to call the API. For example, you could create FireworkSupportLibraryBridge.swift
and add the following codes.
Then add [FireworkSupportLibraryBridge enableVideoGIMA];
on application:didFinishLaunchingWithOptions:
method.
We should put FireworkVideoGIMASupportSDK.enableIMAAds()
inside the block of DispatchQueue.main.async
.
Android
No code configuration is required.
Ad Badge Customizations
Show or hide the ad badge on the video feed item
Set ad badge configuration
Last updated