Here are some common questions we get with integrating the Tapdaq Unity Plugin
Android apps by default have a limit of 65k methods including any libraries in your project - further details found here, the solutions are:
Each network takes up a different amount of the method count, here's a summary of each network we support.
Note: You may have other libraries which are taking up a lot of space too, some of them may also share the same dependencies such as play-services
Multidex allows projects to have multiple .dex files, removing the method limit completely.
As of Unity 2017.1.1 custom Build.Gradle files can be used with unity, this allows multidex to be enabled easily.
android {
...
defaultConfig {
multiDexEnabled true
...
}
}
dependencies {
def multidex_version = "2.0.1"
implementation 'androidx.multidex:multidex:$multidex_version'
...
}
Proguard strips out unused methods and obsfucates code, this solution can reduce and in some cases solve the issue, it can also be use alongside multidex.
As of Unity 2017.1.1 custom Build.Gradle files can be used with unity, this allows ProGuard to be enabled easily. For previous versions of Unity, you will need to export your project to a Gradle/Android studio project.
In either case you can enable ProGuard in your Build.Gradle file and include settings documented here
android {
...
buildTypes {
debug {
minifyEnabled true
shrinkResources true
...
}
release {
minifyEnabled true
shrinkResources true
...
}
}
}
dyld: Library not loaded: @rpath/MoPubAdapter.framework/MoPubAdapter
Referenced from: /var/containers/Bundle/Application/6B714509-FDBE-4D6D-A10F-0A3C3691C077/Unity-Test.app/Unity-Test
Reason: image not found
This error can occur when Tapdaqs post processor script has not run, this should run automatically in the background when switching to iOS platform in the Unity Editor>Build Settings. However on occasion it may not be run successfully, to force it to run use the Tapdaq > Run iOS Build Postprocess menu option.
To be sure that it has run, after building an xcode project, check the Tapdaq and any adapter frameworks are included in the Embedded Binaries section of your general project settings. Adding them manually can also solve this issue, but may have missed other iOS settings that get set in our script.
Yes, Tapaq can be tested on the iOS simulator without any changes. Just select Simulator as the target SDK in the iOS player settings.
Unity's banner implementation respects the Safe Area as described in Apple's Human Interface Guidelines. This means there will be a small gap between the top/bottom of the screen edge when displaying banners.
Apple Human Interface Guidelines
When ads are displayed with Unity iOS, the Tapdaq SDK does not pause the game/app automatically. When displaying an ad, developers will be responsible for pausing and resuming the game themselves as all games are different.
Depending on the game, you may be able to set the time scale to 0.
Time.timeScale = 0;
Another possible solution is to add a boolean in the Update() method which skips any events while the game is paused.
void Update () {
if (!paused) {
// do movement
}
}
If pausing/resuming isn't handled while an ad is displayed, the game will continue along with any gameplay and audio behind the ad.
You should have 11.0.0 or higher for Tapdaq and most ad networks to function correctly. If using Vungle SDK 6.2.5 (Tapdaq Unity Plugin 6.2.2) or higher, they require 11.0.4 or higher.
By default Tapdaqs dependencies script (used by the Play Services Resolver) sets the minimum as the latest tested, if you need to lower this version, you can change the minimum in the Assets/Plugins/Tapdaq/Editor/TDDependenciesResolver.cs file.
Tapdaq and most ad networks require 24.0.0 or higher. If using Vungle SDK 6.2.5 (Tapdaq Unity Plugin 6.2.2) or higher - then they require 26.0.0 or higher.
Note: Tapdaqs dependencies script will get the minimum automatically via the Play Services Resolver plugin
As of Tapdaq Unity Plugin 6.2.3/6.2.4 there are additional flags to set when initialising Tapdaq or updating afterwards. These relate to the EU GDPR rules, where the developer must aquire the users consent to use their data, most ad networks require this information to provide personalised ads.
There are 3 flags to set (if known): UserSubjectToGDPR, UserConsent, AgeRestrictedUser. Tapdaq will accept any state FALSE, TRUE or UNKNOWN.
For users in the EU a UserSubjectToGDPR flag is requested on initialisation, when set to TRUE, consent (if set) will be forwarded to the ad networks, if not set, or set to FALSE consent will not be sent to any network.
Some networks (AdColony, InMobi, TapJoy) also take this flag as a parameter, so it is recommended that it is either set to TRUE or FALSE if it is known where the user is. If not set, nothing will be sent.
Consent either TRUE or FALSE will be passed to networks where the UserSubjectToGDPR is TRUE.
The ageRestrictedUser is sent to ad networks, for EU users this is when they are under 16, for US users it is under 13. Set this if it is known. For the list of ad networks that use this flag refer to User Privacy.
AdManager.InitWithConsent (TDStatus.TRUE, TDStatus.FALSE, TDStatus.TRUE); //Params: UserSubjectToGDPR, UserConsent, AgeRestrictedUser
AdManager.SetUserSubjectToGDPR (TDStatus.TRUE); // This will not send consent flag to networks
AdManager.SetConsentGiven (true); // Setting this will immediately inform the networks if UserSubjectToGDPR is true.
AdManager.SetIsAgeRestrictedUser (true); // Setting this will immediately inform the networks if UserSubjectToGDPR is true.
NOTE: Its recommended that these params are set within initalisation, setting them afterwards is intended for when the states change or were unknown beforehand. For subsequent sessions, its expected that they're known.
Yes - each time you call load ad we will attempt to load a new ad. Whether or not this is successful will depend on the network. Some networks allow you to load an unlimited number of ads whereas others place limits (e.g. based on the type of ad unit).
In the case where a network only allows 1 ad to be loaded, the ad can be shared across requests. If a shared ad is displayed it is internally replaced but may not be successful and therefore it is strongly advised to always check isReady
before displaying an ad.
If you are having any problems integrating, feel free to contact us on [email protected] and we will be more than happy to help.