Frequently Asked Questions

Here are some common questions we get with integrating the Tapdaq Unity Plugin

1. Building AdColony for x86 or armv7 architectures only still includes both - ANDROID

AdColony includes two C++ Native libraries for each architecture, in their current directory in the Tapdaq Unity plugin they build successfully for both platforms, but if you require to build for just one of them you should move the files from:

Assets/Plugins/Android/TapdaqAdColony/libs/armeabi-v7a/
Assets/Plugins/Android/TapdaqAdColony/libs/x86/

... to here:

Assets/Plugins/Android/libs/armeabi-v7a/
Assets/Plugins/Android/libs/x86/

Note: Our uninstall function will not remove theses files once they've been moved, so please ensure they are kept up to date when updating the plugin

2. What do I do when I hit dex 65536 method limit? - ANDROID

Android apps by default have a limit of 65k methods including any libraries in your project - further details found here, the solutions are:

A. Reduce the amount of methods included in your project

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

B. Enable Multidex

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.

Unity Support Gradle Docs

android {
  ...
  defaultConfig {
    multiDexEnabled true
    ...
  }
}

dependencies {
  compile 'com.android.support:multidex:1.0.1'
  ...
}

C. Enable Proguard

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

Unity Support Gradle Docs

android {
  ...
  buildTypes {
    debug {
      minifyEnabled true
      shrinkResources true
      ...
    }
    release {
      minifyEnabled true
      shrinkResources true
      ...
    }
  }
}

3. What does "Image Not Found" error mean when running unity xcode project? - iOS

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.

4. Can Tapdaq be tested on iOS simulator? - iOS

In order to run Tapdaq on iOS simulator, your project has to include Tapdaq and third party adapter frameworks that include simulator architectures. Tapdaq Unity plugin only has device-only architectures. This means there are a couple of extra steps to be done in order to achieve this.

  1. Download iOS SDK of the same version your Tapdaq Unity plugin uses. Native SDK versions corresponding to Unity plugin can be seen here. All iOS SDK releases can be found at this link.

  2. Remove Tapdaq.framework and all the adapter frameworks from your project in Unity Editor and replace them with Tapdaq.framework and adapter frameworks from the universal directory of the archive you downloaded in previous step.

  3. Go to Edit -> Build Settings. Make sure iOS is selected as your platform. Then go to Player Settings in the same window.

  4. In the inspector panel that appeared find Target SDK field and set it to Simulator SDK like so:

alt text

After following these steps you can build and run your app on a simulator. In order to run on an actual device go back to step 4 and change Target SDK to Device SDK.

Note: You must not submit the app to Apple with simulator architectures. More information can be found here: "Debugging - Testing on simulator".

5. How are banners displayed on the iPhone X in Unity? - iOS

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

6. How to pause game during an ad? - iOS

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.

7. Which Google Play Services is required? - Android

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.

8. Which Android Support Library version is required? - Android

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

9. How do the GDPR settings work?

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 AppLovin & YouAppi, for EU users this is when users are under 16, for US users it is under 13. Set this if it is known.

Example

Initialisation

AdManager.InitWithConsent (TDStatus.TRUE, TDStatus.FALSE, TDStatus.TRUE); //Params: UserSubjectToGDPR, UserConsent, AgeRestrictedUser

After Initialisation

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.

Need help?

If you are having any problems integrating, feel free to contact us on [email protected] and we will be more than happy to help.