Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gitforengaging/engagingchoice

ENGAGING CHOICE -- THE NEW PERSON-BASED PERFORMANCE PLATFORM FOR MARKETERS, PUBLISHERS AND CONTENT PROVIDERS
https://github.com/gitforengaging/engagingchoice

ads ios-swift swift swift4

Last synced: about 1 month ago
JSON representation

ENGAGING CHOICE -- THE NEW PERSON-BASED PERFORMANCE PLATFORM FOR MARKETERS, PUBLISHERS AND CONTENT PROVIDERS

Awesome Lists containing this project

README

        



# EngagingChoice

[![CI Status](https://img.shields.io/travis/[email protected]/EngagingChoice.svg?style=flat)](https://travis-ci.org/[email protected]/EngagingChoice)
[![Version](https://img.shields.io/cocoapods/v/EngagingChoice.svg?style=flat)](https://cocoapods.org/pods/EngagingChoice)
[![License](https://img.shields.io/cocoapods/l/EngagingChoice.svg?style=flat)](https://cocoapods.org/pods/EngagingChoice)
[![Platform](https://img.shields.io/cocoapods/p/EngagingChoice.svg?style=flat)](https://cocoapods.org/pods/EngagingChoice)

This library provides a Grid View to show media content and poweredby view to show Engaging Choice icon.

Features

ECGridManager is singletone class and it will use to set Secret key in appDelegate class
Class for ECGridView
Class for ECPoweredByView to show Engaging Choice icon
ECMediaContentManager is singletone class and will use for getting media content and detail

## Requirements

- iOS 11.0 or later
- Xcode 9.4.1 or later

# How To Use

NOTE: You must provide a description and key NSLocationWhenInUseUsageDescription in your app's Info.plist file.

1. FIRST STEP
ECGridManager
Provide Secret key for configuration
```swift
import EngagingChoice

ECGridManager.shared.config(secretKey: "SECRET_KEY")
```
Replace SECRET_KEY with publisher secret key and add above line of code in didFinishLaunchingWithOptions in appDelegate class

2. SECOND STEP
ECMediaContent
```swift
import EngagingChoice

ECMediaContentManager.shared.contentList(offset: 0, limit: 10) { (mediaContent) in
// Get response here
}
```
Offset and limit are optional but you can use these fields for pagination by passing offset and limit in param.

And you need to call below method to get detail of mediaContent and it's required method to call for media content detail
```swift
import EngagingChoice

ECMediaContentManager.shared.contentDetail(contentId: MEDIA_CONTENT_ID) { (conent) in
// Get Media Content detail
}
```
3. THIRD STEP
- ECGridView uses

In storyboard drag UIView in any view and apply ECGridView class and use below functions to show image

```swift
import EngagingChoice

cell.coverImageView.setImage(with: URL(string: "http://www.domain.com/path/to/image.jpg"))

OR

cell.gridView.coverImageView.sd_setImage(with: url, placeholderImage: UIImage(name: "http://www.domain.com/path/to/image.jpg"), completed: nil)

OR

cell.gridView.coverImageView.image = UIImage(name: "FILE_NAME")
```
And after adding gridview in cell or collectionView use enabledPowerBy flag to turn on/off powered EngagingChoice icon on Movies cover Image

4. FOURTH STEP
- ECPoweredByView uses
```swift
import EngagingChoice

let poweredByView = ECPoweredByView(frame: CGRect(x: 0, y: 0, width: 245, height: 23))
self.view.addSubview(poweredByView)
```
OR

ECPoweredByView can also used from storyboard by draging UIView in UIViewController and give a class ECPoweredByView

4. FOURTH STEP

On play video call below callback method to show offer list to user
```swift
import EngagingChoice

ECGridManager.showOfferList(view: self, email: "LOGIN_USER_EMAIL_ADDRESS") {
// Play Video
}
```

## Example

To run the example project, clone the repo, and run `pod install` from the Example directory first.

## Requirements

## Installation

EngagingChoice is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'EngagingChoice'
```

## Author

EngagingChoice, [email protected]

## License

EngagingChoice is available under the MIT license. See the LICENSE file for more info.