Initialization
To get started with the @tyrads.com/tyrads-sdk
package, you will need to:
Request an API key and API secret from the TyrAds team.
Initialize the SDK by calling
Tyrads.init()
and passing in your API key and API secret.Login the user by calling
Tyrads.loginUser()
and passing in the user's ID.Call
Tyrads.showOffers()
to display the offers.
Launch Mode
Min SDK version required: v1.1.6
Works only for iOS
Tyrads SDK provides the ability to open the Offerwall in a webkit view that is embedded in the app to provide a seamless user experience. Also, it provides the ability to open the Offerwall in an external browser (Safari) if Apple's app store policy does not approve the in-app rewards system for the app.
Available launch modes:
launchMode: 3
- opens the Offerwall in an external browser (Safari)launchMode: 2
- opens the Offerwall in a webkit view that is embedded in the app
Deeplinking Routes
Min SDK version required: v1.1.4
The Tyrads SDK supports deeplinking to specific sections of the offerwall. When initializing or interacting with the SDK, you can specify a route to open a particular page. For campaign-specific routes, you'll need to provide the campaignID as well.
Available routes and their usage:
campaigns
- opens the Campaigns Pagecampaigns-activated
- opens the Activated Campaigns Pagecampaign-details
- opens the Campaign Details Page (requires campaignID)campaign-tickets
- opens the Campaign Tickets Page (requires campaignID)
Basic Usage
Here is an example of how to use the @tyrads.com/tyrads-sdk
package:
Last updated