TalkingData Unity SDK consists of a wrapper layer and Native SDK. The wrapper layer code is available on GitHub, while the latest Android and iOS Native SDKs need to be downloaded from the TalkingData website.
- Download this project (wrapper layer) locally
- Visit the TalkingData website to download the latest Android and iOS TalkingData SDK (Native SDK)
- Option 1: Select Unity platform for feature customization
- Option 2: Select Android and iOS platforms separately for feature customization, ensure both platforms have the same features
- Copy the latest
Native SDKinto thewrapper layerto form the complete Unity SDK- Android: Copy the latest
.jarfile toAssets/Plugins/Androiddirectory - iOS: Copy the latest
.hand.afiles toAssets/Plugins/iOSdirectory
- Android: Copy the latest
- Modify the
wrapper layercode as needed based on Native SDK feature options (see Notes section) - Integrate the Unity SDK into your project and configure it according to the integration documentation
Android SDK requires the following permissions in AndroidManifest.xml:
| Permission | Purpose |
|---|---|
| INTERNET | Allow network access for sending analytics data |
| ACCESS_NETWORK_STATE | Detect network status to avoid sending data when offline |
| READ_PHONE_STATE | Access device info for unique user identification |
| ACCESS_WIFI_STATE | Get device MAC address for user identification |
| WRITE_EXTERNAL_STORAGE | Save device info and logs |
| ACCESS_FINE_LOCATION (Optional) | Get GPS location to improve regional data accuracy |
| ACCESS_COARSE_LOCATION (Optional) | Get approximate location info |
iOS SDK requires the following frameworks in the generated Xcode project:
| Framework | Purpose |
|---|---|
| AdServices.framework | Apple Search Ads attribution |
| StoreKit.framework | Apple SKAdNetwork attribution conversion |
| AppTrackingTransparency.framework | Get app tracking authorization status |
| AdSupport.framework | Get advertisingIdentifier |
| CoreTelephony.framework | Get carrier identifier |
| Security.framework | Assist with device identifier storage |
| SystemConfiguration.framework | Detect network status |
| libc++.tbd | Support C++11 standard |
| libz.tbd | Data compression |
For iOS 12.0+, add the Access WiFi Information capability: Select Target, click +Capability, and double-click Access WiFi Information.
For iOS 14.0+, user authorization is required to get IDFA: Add Privacy - Tracking Usage Description Key in Info.plist with Type String and your description text as Value.
- When selecting features for Android and iOS separately, ensure both platforms have the same features.
- If optional features were selected when requesting the Native SDK, enable the corresponding wrapper layer code:
a) Uncomment the macro definitions for selected industry or features in
Assets/Plugins/iOS/TalkingDataSDK.mmb) Add macro definitions in Unity: OpenBuild Settings, select platform, clickSwitch Platform, then inPlayer Settings>Other Settings>Scripting Define Symbols, enter the macros (separate with semicolons; add separately for Android and iOS)
| Industry & Feature | Macro |
|---|---|
| E-commerce Retail | TD_RETAIL |
| Gaming & Entertainment | TD_GAME |
| Financial Lending | TD_FINANCE |
| Travel | TD_TOUR |
| Online Education | TD_ONLINEEDU |
| Novel Reading | TD_READING |
| Other Industries | TD_OTHER |
See CHANGELOG.md for details.
This project is licensed under the MIT License - see LICENSE.md for details.
