Skip to main content
Version: 3.x

Upgrading to 3.x from 2.x

What Changed

  • Banner interstitials and Quick Questions - New content formats to engage users
  • User attributes - Send attributes in a hash map to target specific content to specific users
  • Enhanced error handling - New callbacks with more specific error codes
  • Core SDK logic in JavaScript - Enables us to push bug fixes and feature updates without requiring SDK updates
  • Simplified placement management - The SDK now manages placement state. Simply ask if content can be shown for a tag, receive a true/false response, and display the content accordingly

Before You Begin

Account Setup

  1. Enable your account - Contact developers@tapresearch.com to enable your account for 3.x.x SDKs
  2. Create a new app - Once enabled, create a new 3.x.x-enabled app (you'll need to recreate currencies and placements)
  3. Update credentials - Update your app to use the new app's API token and placement tags

Important Considerations

  • ⚠️ Breaking changes: Version 3.x is not backwards compatible. Code changes are required (outlined below)
  • Content requirement: Add at least one active piece of content to your placements for showContentForPlacement and canShowContentForPlacement to return true
  • Early initialization: Initialize the SDK as early as possible once the user identifier is known. Do NOT use anonymous user identifiers, especially when using Quick Questions
  • Placement strategy: Set up placement calls early and throughout your app for survey walls, banners, interstitials, and Quick Questions. This prevents having to add them later

Testing Setup

Configure your test devices in the publisher dashboard:

Learn More

Not sure what Quick Questions is? Contact developers@tapresearch.com or see the Quick Questions section in this documentation.

Questions? Don't hesitate to reach out to developers@tapresearch.com!

Steps

Update Dependencies

Update your TapResearch dependency to latest 3.6.x version following the instructions for your platform:

Update Initialization

Update your initialization code to include both the API token and the user identifier of the currently logged-in user.

Update Callbacks

Reward Callback:

  • Update to accept an array of TRReward objects instead of a single object
  • TRReward provides rewardAmount and currencyName properties
  • See additional TRReward information

Error Callback:

  • Create a global error callback to handle errors
  • Android: TRError includes code and description properties
  • iOS: NSError includes code and localizedDescription properties

Update How You Call Placements

The showPlacement method has been renamed:

  • Most platforms: showContentForPlacement
  • iOS (Swift): showContent(forPlacement:)