@tyrads.com/tyrads-sdk
v3.3.2
Published
Tyrads SDK for React Native
Readme
tyrads-sdk
Tyrads SDK for React Native
Installation
npm install @tyrads.com/tyrads-sdk
# or
yarn add @tyrads.com/tyrads-sdkUsage
import Tyrads from '@tyrads.com/tyrads-sdk';
// ...
Tyrads.init('', '');
Tyrads.loginUser('');
Tyrads.showOffers();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
Min SDK version required: v1.1.6
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:
offers- opens the Campaigns Pageactive-offers- opens the Activated Campaigns Pageoffer-details- opens the Campaign Details Page (requires campaignID)support- opens the Campaign Tickets Page (requires campaignID)
// Default route (Campaigns Page)
Tyrads.showOffers();
// Explicitly specifying the Campaigns Page
Tyrads.showOffers({ route: "offers" });
// Activated Campaigns Page
Tyrads.showOffers({ route: "active-offers" });
// Campaign Details Page (requires campaignID)
Tyrads.showOffers({ route: "offer-details", campaignID: "your_campaign_id_here" });
// Campaign Tickets Page (requires campaignID)
Tyrads.showOffers({ route: "support", campaignID: "your_campaign_id_here" });
