Latest 0.2.7
Homepage https://github.com/chrislin89/USeek
License USEEK
Platforms ios 8.0
Authors

Icon

CI Status
Version
License
Platform

What is USeek?

The USeek interactive advertising solution turns your videos into engaging experiences full of rewards…

Rewards

…Increasing viewer attention while searching your creative for objects.

USeek Library

USeek library is designed to help developers easily add the enjoyable features of USeek in their own application.

Warning

  • USeek utilizes the power of safari‘s interactive video feature, and this is only available from iOS 10.0 or later.

Requirements

[Platform iOS]()

USeek:-

Objective-c

Minimum iOS Target: iOS 10.0

Minimum Xcode Version: Xcode 8.0

Installation

From CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like USeek in your projects. First, add the following line to your Podfile:

pod 'USeek', :git => 'https://github.com/chrislin89/USeek.git'

This pulls from the master branch directly.

Second, install USeek into your project:

pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate USeek into your Xcode project using Carthage, specify it in your Cartfile:

github "chrislin89/USeekFramework"

Run carthage update to build the framework and drag the built USeek.framework (in Carthage/Build/iOS folder) into your Xcode project (Linked Frameworks and Libraries in Targets).

Manually

  • Drag the chrislin89/USeekFramework folder into your project.
  • Take care that USeek.framework is added to Targets->Build Phases->Embeded Frameworks.

Usage

(see sample Xcode project in /USeekDemo)

There are 3 main classes.

  • USeekManager
  • USeekPlayerView
  • USeekPlayerViewController

USeekManager is singleton class, with which you can do the following actions

  • Set / Retrieve publisher ID
  • Request for the points of certain user

USeekPlayerView and USeekPlayerViewController classes are designed to load & play the embeded video in UIView or as a standalone UIViewController.

Set Publisher ID

[[USeekManager sharedManager] setPublisherId: @"{your publisher ID}"];

How to use USeekPlayerViewController

  1. Instantiate USeekPlayerViewController
USeekPlayerViewController *vc = [[USeekPlayerViewController alloc] init];
  1. Load video
[vc loadVideoWithGameId:@"{game id}" UserId:@"{user id, can be empty}"];
  1. Customize View Controller [optional]
// show / hide `close` button
[vc setCloseButtonHidden:YES];

// customize loading text
vc.loadingTitleLabel.text = @"Please wait while loading video...";          

// set delegate
vc.delegate = self;
  1. Present View Controller
dispatch_async(dispatch_get_main_queue(), ^{
    [self presentViewController:vc animated:YES completion:nil];
});
  1. Get notified when USeekPlayerViewController is closed [optional]

USeekPlayerViewControllerDelegate defines several useful delegate methods (optional), and one of them is useekPlayerViewControllerDidClose: which will be called when the USeekPlayerViewController is closed.

- (void)useekPlayerViewControllerDidClose:(USeekPlayerViewController *)playerViewController{
    // Do anything here
}

How to use USeekPlayerView

USeekPlayerView inherits UIView, thus you can directly add it in storyboard or add as subview programmatically.

  • Add as a subview programmatically
USeekPlayerView *playerView = [[USeekPlayerView alloc] initWithFrame:CGRectMake(0, 0, 100, 60)];
[self.view addSubview:playerView];
  • Add in storyboard

Just change the class name of the view to USeekPlayerView in storyboard.
Now you can add the view as IBOutlet and use.

How to get points from server

By calling [[USeekManager sharedManager] requestPointsWithGameId:UserId:Success:Failure], we can get the points the user gained while playing the gamified video.

[[USeekManager sharedManager] requestPointsWithGameId:@"game id" UserId:@"user id" Success:^(int points) {
    // Do anything here
} Failure:^(NSError *error) {
    // Do anything here
}];

License

USeek is available under the USEEK license. See the LICENSE file for more info.

Latest podspec

{
    "name": "USeek",
    "version": "0.2.7",
    "summary": "USeek Library",
    "description": "This Pod library is designed to help developers use USeek Library easily.",
    "homepage": "https://github.com/chrislin89/USeek",
    "license": {
        "type": "USEEK",
        "file": "LICENSE"
    },
    "authors": {
        "chrislin89": "[email protected]"
    },
    "source": {
        "git": "https://github.com/chrislin89/USeek.git",
        "tag": "0.2.7"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "USeek/Classes/**/*.{h,m}",
    "resources": [
        "USeek/Assets/**/*",
        "USeek/Classes/**/*.xib"
    ],
    "public_header_files": [
        "USeek/Classes/USeek.h",
        "USeek/Classes/USeekManager.h",
        "USeek/Classes/USeekPlayerView.h",
        "USeek/Classes/USeekPlayerViewController.h"
    ]
}

Pin It on Pinterest

Share This