Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/gitforengaging/engagingchoice
- Owner: gitforengaging
- License: mit
- Created: 2018-10-12T12:32:26.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-16T06:36:26.000Z (almost 6 years ago)
- Last Synced: 2024-12-02T03:41:03.538Z (about 1 month ago)
- Topics: ads, ios-swift, swift, swift4
- Language: Swift
- Homepage:
- Size: 831 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 EngagingChoiceECGridManager.shared.config(secretKey: "SECRET_KEY")
```
Replace SECRET_KEY with publisher secret key and add above line of code in didFinishLaunchingWithOptions in appDelegate class2. SECOND STEP
ECMediaContent
```swift
import EngagingChoiceECMediaContentManager.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 EngagingChoiceECMediaContentManager.shared.contentDetail(contentId: MEDIA_CONTENT_ID) { (conent) in
// Get Media Content detail
}
```
3. THIRD STEP
- ECGridView usesIn storyboard drag UIView in any view and apply ECGridView class and use below functions to show image
```swift
import EngagingChoicecell.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 Image4. FOURTH STEP
- ECPoweredByView uses
```swift
import EngagingChoicelet poweredByView = ECPoweredByView(frame: CGRect(x: 0, y: 0, width: 245, height: 23))
self.view.addSubview(poweredByView)
```
ORECPoweredByView 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 EngagingChoiceECGridManager.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.