Compatibility
- v3.2.3 and master5.35.25.15.04.2
- v3.2.3 and masteriOSmacOS(Intel)macOS(ARM)LinuxtvOSwatchOS
iOS Apester Kit
ApesterKit provides a light-weight framework that loads Apester Unit in a webView
A Carousel component for a channel that contains an Apester units of the media publisher. These units were built with Apester Platform, The Carousel component design can be configured and displayed any where. Follow our guide step by step and setup. Follow our guide step by step and setup:
APEStripView
:## Swift
private var stripView: APEStripView!
## Objective C
@property (nonatomic, strong) APEStripView *stripView;
APEStripStyle
. configure the strip view style, i.e shape, size, padding, shadow, title header and more....## Swift
let header = APEStripHeader(text: "Title", size: 25.0, family: nil, weight: 400, color: .darkText)
let style = APEStripStyle(shape: .roundSquare, size: .medium,
padding: UIEdgeInsets(top: 5.0, left: 0, bottom: 0, right: 0),
shadow: false, textColor: nil, background: nil, header: header)
## Objective C
APEStripHeader *header = [[APEStripHeader alloc] initWithText:@"Title" size:25.0 family:nil weight:400 color:[UIColor purpleColor]];
APEStripStyle *style = [[APEStripStyle alloc] initWithShape:APEStripShapeRoundSquare
size:APEStripSizeMedium
padding:UIEdgeInsetsMake(10.0, 0, 0, 0)
shadow:NO
textColor:nil
background:[UIColor whiteColor]
header:header];
APEStripConfiguration
. set the channel token, style and bundle parameters ....## Swift
let configuration = try? APEStripConfiguration(channelToken: channelToken,
style: style,
bundle: Bundle.main)
## Objective C
NSError *error = nil;
APEStripConfiguration *config = [[APEStripConfiguration alloc] initWithChannelToken:channelToken
style:style
bundle:[NSBundle mainBundle]
error:&error];
## Swift
self.stripView = APEStripView(configuration: config)
## Objective C
self.stripView = [[APEStripView alloc] initWithConfiguration:config];
## Swift
stripView?.display(in: self.containerView, containerViewConroller: self)
## Objective C
[self.stripView displayIn:self.containerView containerViewConroller:self];
## Swift
self.stripView.hide()
## Objective C
[self.stripView hide];
APEStripViewDelegate
to observe the stripView updates when success, failure or height updates.A Unit or playlist component for publisher Apester media. These units were built with Apester Platform.
APEUnitView
:## Swift
private var unitView: APEUnitView!
## Objective C
@property (nonatomic, strong) APEUnitView *unitView;
APEUnitParams
. Set the media id or the channel token for playlist.## Swift
let unitParams = .unit(mediaId: mediaId)
// OR
let playlistParams = .playlist(tags: tags,
channelToken: channelToken,
context: isContext,
fallback: isFallback)
APEUnitConfiguration
. set the unit params and bundle## Swift
let unitConfig = APEUnitConfiguration(unitParams: unitParams, bundle: Bundle.main)
// OR
let playlistConfig = APEUnitConfiguration(unitParams: playlistParams, bundle: Bundle.main)
## Objective C
APEUnitConfiguration *unitConfig = [[APEUnitConfiguration alloc] initWithMediaId:meidaId bundle: NSBundle.mainBundle];
// OR
APEUnitConfiguration *playlistConfig = [[APEUnitConfiguration alloc] initWithTags: mediaIds
channelToken: channelToken
context: isContext
fallback: isFallback
bundle: NSBundle.mainBundle
gdprString: gdprString
baseUrl: baseUrl];
## Swift
self.unitView = APEUnitView(configuration: configuration)
## Objective C
self.unitView = [[APEUnitView alloc] initWithConfiguration:unitConfig];
// OR
self.unitView = [[APEUnitView alloc] initWithConfiguration:playlistConfig];
## Swift
unitView?.display(in: self.containerView, containerViewConroller: self)
## Objective C
[self.unitView displayIn:self.containerView containerViewConroller:self];
## Swift
self.unitView.hide()
## Objective C
[self.unitView hide];
## Swift
self.unitView.reload()
## Objective C
[self.unitView reload];
APEUnitViewDelegate
to observe the stripView updates when success, failure or height updates.A service that provides precaching Apester Units, either APEStripView
or APEUnitView
.
strip configurations
:## Swift
APEViewService.shared.preloadStripViews(with: configurations)
## Objective C
[APEViewService.shared preloadStripViewsWith: configurations];
channelTokens
if exists:## Swift
APEViewService.shared.unloadStripViews(with: channelTokens)
## Objective C
[APEViewService.shared unloadStripViewsWith: channelTokens];
channelToken
if exists..:## Swift
APEViewService.shared.stripView(for: channelToken)
## Objective C
[APEViewService.shared stripViewFor: channelToken];
unit configurations
:## Swift
APEViewService.shared.preloadUnitViews(with: configurations)
## Objective C
[APEViewService.shared preloadUnitViewsWith: configurations];
unitIds
if exists:## Swift
APEViewService.shared.unloadUnitViews(with: unitIds)
## Objective C
[APEViewService.shared unloadUnitViewsWith: unitIds];
unitId
if exists..:## Swift
APEViewService.shared.unitView(for: unitId)
## Objective C
[APEViewService.shared unitViewFor: unitId];
The Swift Package Manager automates the distribution of Swift code. To use ApesterKit with SPM, add a dependency to your Package.swift
file:
let package = Package(
dependencies: [
.package(url: "https://github.com/Qmerce/ios-sdk.git", from: "2.0.0")
]
)
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
CocoaPods 1.1.0+ is required to build ApesterKit.
To integrate ApesterKit into your Xcode project using CocoaPods, specify it in your Podfile
:
platform :ios, '11.0'
use_frameworks!
pod 'ApesterKit'
Then, run the following command:
$ pod install
Carthage is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.
You can install Carthage with Homebrew using the following command:
$ brew update
$ brew install carthage
To integrate ApesterKit into your Xcode project using Carthage, specify it in your Cartfile
:
github 'Qmerce/ios-sdk'
Then, run the following command:
$ carthage update --platform iOS --use-submodules
If you prefer not to use either of the aforementioned dependency managers, you can integrate ApesterKit into your project manually.
cd
into your top-level project directory, and run the following command "if" your project is not initialized as a git repository:$ git init
$ git submodule add https://github.com/Qmerce/ios-sdk.git
$ git submodule update --init --recursive
ApesterKit
folder, and drag the ApesterKit.xcodeproj
into the Project Navigator of your application's Xcode project.It should appear nested underneath your application's blue project icon. Whether it is above or below all the other Xcode groups does not matter.
ApesterKit.xcodeproj
in the Project Navigator and verify the deployment target matches that of your application target.+
button under the "Embedded Binaries" section.ApesterKit.xcodeproj
folders each with two different versions of the ApesterKit.framework
nested inside a Products
folder.It does not matter which
Products
folder you choose from.
Select the ApesterKit.framework
.
And that's it!
The
ApesterKit.framework
is automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device.
Clone the project and Run the ApesterKitDemo App:
1 - clone it `git clone git@github.com:Qmerce/ios-sdk.git`.
2 - run `carthage update`.
3 - select ApesterKitDemo Target.
4 - run the App and enjoy.
ApesterKit is released under the MIT license. See LICENSE for details.