This guide describes steps required when updating from one Tapdaq Plugin version to another, its recommended you perform all the steps to prevent any issues or conflicts.
The following guide explains how to upgrade Tapdaq's Unity SDK between each version.
This will remove all of Tapdaq, adapters and SDK dependencies, there is an option to keep your settings, so you will not have to re-enter your appid or client key.
This section notes any changes that need to be made when upgrading to specific version.
Due to XCFramework we have been unable to easily support manual integrations through Unity, please use the default Cocoapods/Maven integration. If unable to do this, contact support
We have dropped support for YouAppi and therefore the adapter is no longer available, please note old adapters cannot be used with new versions of the SDK. Old SDK versions will continue to function with YouAppi.
A Pangle adapter is now available and can be setup via the dashboard. It supports Video & Rewarded Video content. Built with Pangle SDK v3.6.0.4.
For iOS 14+ Facebook Audience Network require permission to serve personalized ads, to do this set the Advertiser Tracking flag to TRUE.
See Facebook Audience Network documentation for further details
AdManager.SetAdvertiserTrackingEnabled(TDStatus.TRUE);
TDStatus status = AdManager.GetAdvertiserTrackingEnabled();
Due to changes in the TapdaqSettings data structure with the addition of SKAdNetworkIds, the settings may be cleared and should be re-entered.
iOS 14 Apple documentation recommends adding SKAdNetworkIds for each network which has been integrated, these ID's may change so please check the documentation for the latest ID's.
There is an interface in the Tapdaq settings panel which will store the ID's and automatically populate the info.plist, simply add the ID's and optionally name them here:
See Quickstart guide for more details
When updating to 7.8.0 and you have kept Tapdaq Settings from a previous version (7.4.0 or newer), the following errors may occur:
Unable to read Android dependencies from Assets/Plugins/Tapdaq/Editor/TapdaqDependencies.xml. Android dependencies in this file will be ignored.
iOS framework addition failed due to a CocoaPods installation failure. This will will likely result in an non-functional Xcode project.
To resolve delete the TapdaqSettings.asset file from Assets/Plugins/Tapdaq/Resources/Tapdaq/TapdaqSettings.asset. Note this will cause all data stored in the Tapdaq Settings panel to be deleted and will need to be repopulated.
Added support for the following networks:
To simplify settings such as GDPR, the init method accepting those parameters is now deprecated and new setters/getters detailed further below have been added, all settings can now be set/changed at any time before/after initialisation.
This method will no longer use default status values like TDSTATUS.UNKNOWN, it will now get values that have previously been set, only using UNKNOWN if none set.
public class AdManager {
public static void Init();
}
public class AdManager {
public static void Init (TDStatus isUserSubjectToGDPR = TDStatus.UNKNOWN, TDStatus isConsentGiven = TDStatus.UNKNOWN, TDStatus isAgeRestrictedUser = TDStatus.UNKNOWN, string userId = null, bool shouldForwardUserId = false);
}
UserSubjectToUSPrivacy states whether a user is in a US state that has privacy laws to inhibit the sale of user data. US Privacy status states whether to enforce privacy, for many networks setting this to TRUE will forward a "true" flag for doNotSell CCPA flags.
As of this version AdMob, IronSource & Mintegral receive these flags.
AdManager.SetUserSubjectToUSPrivacyStatus(TDStatus.TRUE);
AdManager.SetUSPrivacyStatus(TDStatus.TRUE);
GDPR interfaces have been updated to all use the STATUS values for setters/getters to make it clearer and updating the values more flexible.
AdManager.SetUserSubjectToGdprStatus()
AdManager.GetUserSubjectToGdprStatus()
AdManager.SetConsentStatus()
AdManager.GetConsentStatus()
AdManager.SetAgeRestrictedUserStatus()
AdManager.GetAgeRestrictedUserStatus()
AdManager.SetUserSubjectToGDPR()
AdManager.IsUserSubjectToGDPR()
AdManager.SetConsentGiven()
AdManager.IsConsentGiven()
AdManager.SetIsAgeRestrictedUser()
AdManager.IsAgeRestrictedUser()
For networks which support an SDK level mute flag for ads, this flag will be used for them.
AdManager.SetMuted(true);
AdManager.IsMuted()
As of this version AdMob, AppLovin, Mintegral & Vungle use this flag
A number of changes to banners have been implemented in this version.
It's now possible to pass in placement tags as a load/show/hide/destroy parameter, this will only use networks which have the placement tag enabled. Placement tags are optional paramters, if not provided default will be used.
AdManager.RequestBanner(TDMBannerSize.TDMBannerStandard, "<INSERT_PLACEMENT_TAG>"); // Load banner with type
AdManager.RequestBanner(320, 100, "<INSERT_PLACEMENT_TAG>"); // Load banner with custom size
AdManager.ShowBanner(TDBannerPosition.Bottom, "<INSERT_PLACEMENT_TAG>"); // Show banner at fixed position
AdManager.ShowBanner(10,200, "<INSERT_PLACEMENT_TAG>"); // Show banner at custom position
AdManager.HideBanner("<INSERT_PLACEMENT_TAG>"); // Hide banner
AdManager.DestroyBanner("<INSERT_PLACEMENT_TAG>"); // Destroy banner
A new Load method has been added with width/height parameters, this allows the banner type to be selected on a best fit given the networks available. E.g. if the view is 400x60 a Standard or Smart banner will be used depending on which network is used.
A new Show method has been added with x/y parameters which allow the banner to be shown anywhere on the screen.
TMAdListenerBase now has a AdFailToRefresh method, this will be called if the banner cannot load a new ad after it has succeeded the first time, AdRefresh will be called if it was successful. An error will be provided with details of the failure like AdNotAvailable callback does.
AdAvailable will still be called when a banner loads for the first time, the refresh callbacks will be called on each refresh interval after.
private void OnEnable () {
TDCallbacks.AdRefresh += OnAdRefresh;
TDCallbacks.AdFailToRefresh += OnAdFailToRefresh;
}
private void OnDisable () {
TDCallbacks.AdRefresh -= OnAdRefresh;
TDCallbacks.AdFailToRefresh -= OnAdFailToRefresh;
}
private void OnAdRefresh(TDAdEvent e)
{
}
private void OnAdFailToRefresh(TDAdEvent e)
{
}
TDAdEvent.adType values have changed as follows:
TDAdEvent.adType remains available to use however it's recommended to use these methods instead to identify ad type:
TDAdEvent e;
if (e.IsInterstitialEvent()) {
} else if (e.IsVideoEvent()) {
} else if (e.IsRewardedVideoEvent()) {
} else if (e.IsBannerEvent()) {
}
The Quickstart page no longer requires individual network adapters to be downloaded, instead there is just one small Tapdaq-UnityPlugin.unitypackage containing unity code. A new section in the TapdaqSettings panel is available, enabling cocoapods/maven will display all the available networks for Android/iOS, simply enable the ones required and select save, these will then be added to your project.
Both platforms rely on the Play Services Resolver. For Android there are some recommended settings details in the Quickstart page.
The plugin now uses AdMob SDK 18.2.0 which requires the AdMob appId to be inserted into the AndroidManifest.xml. This can be done settings in the Tapdaq settings panel in Unity. This will then be automatically added to your AndroidManifest.xml when you build.
For all users, Tapdaq's GDPR settings must be set to something other than unknown before initialising for YouAppi to function. For users outside of the EU UserSubjectToGdpr should be set to false For users inside of the EU UserSubjectToGdpr should be set to true, also Consent should be provided for YouAppi to intialise. Note the consent MUST be obtained from the user. If any other settings are provided, YouAppi will not be initialised and will not display ads. See User Privacy page for details on how to set GDPR settings
The following networks support both Video & Rewarded Video content.
InitWithConsent has been deprecated in favor of Init method with optional parameters.
public static void InitWithConsent(TDStatus isUserSubjectToGDPR, TDStatus isConsentGiven, TDStatus isAgeRestrictedUser)
public static void Init (TDStatus isUserSubjectToGDPR = TDStatus.UNKNOWN, TDStatus isConsentGiven = TDStatus.UNKNOWN, TDStatus isAgeRestrictedUser = TDStatus.UNKNOWN, string userId = null, bool shouldForwardUserId = false)
A UserId field has been added to the TapdaqConfig & Tapdaq interface, this replaces the hashed_user_id that was passed into showRewardedVideo method, which is now deprecated. If UserId is not set, the hashed_user_id will continue to be used (if available).
The plugin now uses AdMob SDK 7.44.0 which requires the AdMob appId to be inserted into the info.plist. This can be done settings it in the Tapdaq settings panel in Unity. This will then be automatically added to your info.plist when you build.
The Ironsource Adapter has changed its implementation to use Instance IDs rather than Placements, both are available on the Ironsource dashboard and should be replaced in the Tapdaq dashboard.
Replacing ID's will cause previous SDK's to fail to load ads, vice versa leaving placements in the dashboard will cause new SDK's to fail to load.
Offerwalls will now fail to load as the Ironsource Offerwall implementation has been removed. The load/Show interface remains but will be removed in later versions.
NEW: SDK version 7.0.0 supports zones. Please note, this release does not currently support cross promotion ad serving. To access our cross promotion features, please use SDK version 6.4.1
Placement tags are no longer need to be registered, they have been removed from the Tapdaq settings panel. They are however still used for loading and showing ads.
didFailToDisplay will be called after calling showAd (Interstitial, Video, Rewarded Video, Offerwall) if there is no ad to show, or the ad is unable to display. An error will be provided.
private void OnEnable () {
TDCallbacks.AdDidFailToDisplay += OnDidFailToDisplay;
}
// Unsubscribe from Tapdaq events
private void OnDisable () {
TDCallbacks.AdDidFailToDisplay -= OnDidFailToDisplay;
}
private void OnDidFailToDisplay(TDAdEvent e) {
TDDebugLogger.Log("-- Test Log -- " + e.adType + "(" + e.tag + ")" + ": " + e.message);
}
AdMob content rating will be forwarded for every ad request to AdMob, to do this, set the value in the config after Tapdaq has initialised like so:
//After Tapdaq initialises
AdManager.SetAdMobContentRating("MA"); //G PG T MA
AdManager.SetIsAgeRestrictedUser(true); //COPPA/GDPR flag
The tag_for_under_age_of_consent flag will be sent to AdMob if the user is subject to GDPR and AgeRestrictedUser is set. The ChildDirectedTreatment COPPA flag will be sent if user is not known to be subject to GDPR and AgeRestrictedUser is set. Read more about AdMob Targeting here
Replaced Init methods to allow data to remain unknown if not retrieved from the user.
TDStatus enum has values FALSE, TRUE, UNKNOWN
New methods:
public class AdManager {
public static void InitWithConsent (TDStatus isConsentGiven);
public static void InitWithConsent (TDStatus isUserSubjectToGDPR, TDStatus isConsentGiven, TDStatus isAgeRestrictedUser)
}
Deprecated methods:
public class AdManager {
public static void InitWithConsent (bool isConsentGiven)
public static void InitWithConsent (bool isConsentGiven, bool isAgeRestrictedUser)
}
GDPR compliance has been added in this version, apps should acquire EU users consent for networks to provide personalised ads. Pass the consent to Tapdaq if consent is available at initialisation it should be added like so:
AdManager.InitWithConsent(true);
If consent is acquired mid session inform Tapdaq like so:
AdManager.setConsentGiven(true);
NOTE: Chartboost will not update consent mid session and must be set at initialisation
Some networks ask if users are known to be under 16, this can also be set at initialisation or mid session like so:
AdManager.InitWithConsent(true, true); //Params Consent, IsAgeRestrictedUser
Set mid session like so:
AdManager.SetIsAgeRestrictedUser(true);
Before importing TapdaqUnity.unitypackage delete the PlayServicesResolver folder from the Assets folder to prevent having duplicate/conflicting versions in your project.
Alternatively do not import the PlayServicesResolver folder if you want to keep your version.
The workaround is to specify default
placement tag when loading an ad, showing an ad or checking if an ad is ready to be shown.
// Instead of using:
AdManager.LoadInterstitial();
AdManager.ShowInterstitial();
AdManager.IsInterstitialReady();
AdManager.LoadVideo();
AdManager.ShowVideo();
AdManager.IsVideoReady();
AdManager.LoadRewardedVideo();
AdManager.ShowRewardedVideo();
AdManager.IsRewardedVideoReady();
// Use the following method:
AdManager.LoadInterstitial("default");
AdManager.ShowInterstitial("default");
AdManager.IsInterstitialReady("default");
AdManager.LoadVideo("default");
AdManager.ShowVideo("default");
AdManager.IsVideoReady("default");
AdManager.LoadRewardedVideo("default");
AdManager.ShowRewardedVideo("default");
AdManager.IsRewardedVideoReady("default");
Receptiv requires Android lifecycle events to be passed back to their SDK. This may be used by Tapdaq, or by other adapters in the future. You can read more about lifecycle methods in our Quickstart guide.
AdManager.OnApplicationPause must be called from any MonoBehaviour object script in each scene. Read more about OnApplicationPause unity method here.
Here's an example:
void OnApplicationPause(bool pauseStatus)
{
AdManager.OnApplicationPause (pauseStatus);
}