Description
Our SDK seamlessly integrates with streaming video apps, unlocking the potential for increased viewer engagement, personalized content, and additional revenue streams through gamification and Web3 integration. With our Second Screen via QR Code feature, viewers can earn points and use them to access gamified content and pay-per-view premium content. This creates a more engaging and incentivized experience for viewers and offers unique and interactive TV entertainment. Our SDK also provides improved customer retention and loyalty through personalized content and rewards. Additionally, we offer an SDK for Connected TV to further enhance the viewing experience.
Installation
Instructions for how to setup the sdk in you project
Step 1 [Download the framework]
Go to the GitHub repository and download the watch2earn-applesdk.framework file.
Step 2 [Add the framework to your Xcode project]
- Drag and drop the watch2earn-applesdk.framework file into your Xcode project.
- In the "General" tab of your project's settings, scroll down to "Frameworks, Libraries, and Embedded Content".
- Click the "+" button and select the watch2earn-applesdk.framework file.
Step 3 [Link the framework with your project]
In the "Build Phases" tab of your project's settings, add the .framework file to the "Link Binary with Libraries" section.
Usage
Step 1 [Importing the Framework]
To use the watch2earn_applesdk framework in your project, you need to import it at the top of your main View Controller Swift file using the following code:
Import watch2earn_applesdk
Step 2 [Initializing the Framework]
To initialize the Framework, call the basic functions of the SDK into the app main class and initialize it with your app logo link and wallets JSON file link into the W2EManager class. It will establish all the connections with watch2earn servers. Use the following code to initialize the W2EManager:
let logo = URL(string: "Link to your logo")!
let wallets = URL(string: "Link to the your get wallets api")!
self.w2eManager = W2EManager(logoUrl:logo, jsonUrl: wallets );
Step 3 [Calling playerViewControls]
To show tickers and update its stats, call the playerViewControl method into your AVPlayerViewController and pass it as a parameter to this method from the w2eSdk object in the W2EManager. Use the following code to call the playerViewControl method
self.avPlayerController.player = self.avPlayer
W2EManager.w2eSdk.playerViewControl(avPlayerController: self.avPlayerController)
self.addSubview(self.avPlayerController.view)
Step 4 [Calling W2E Setting Screen View]
To get the W2E settings screen UIViewController, use the getSettingScreen() function. Use the following code to call the getSettingScreen() function:
let viewController = W2EManager.w2eSdk.getSettingScreen()
view.insertSubview(viewController.view, at: 0)
self.addChild(viewController)