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, API secret, encKey. encKey: This is the newly added parameter. It stands for "encryption key" and would be used for encrypting data transmitted from the SDK. If not provided, data will be transmitted plain form.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
// Note: The launchMode parameter is optional, if not specified the default would be opening the Offerwall in an external browser (Safari)
Tyrads.showOffers({ launchMode: 3 });// provide launchMode: 2 to open the Offerwall in a webkit view that is embedded in the app
Last updated