Manual for SWIFT apps

Embedding to Swift apps

First, download the library from HERE

For integration libAdman.a with your Swift app please follow next steps:

  • Include files from archive to active Xcode project

  • Add Objective-C bridging header and include all .h files from the library archive

  • Add next line to Library search path in build settings:


Please note, that you will find three libraries in the archive:

  • libAdman - this library is not linked with AFNetworking and/or SocketRocket

  • libAdman_SR - this library is linked with SocketRocket

  • libAdman_AF30 - thisl ibrary is linked AFNetworking and SocketRocket

Please find the one you need, rename it to libAdman.a and add to your project.

Swift example

import UIKit
class ViewController: UIViewController, AdmanDelegate {
override func viewDidLoad() {
let adm = Adman.sharedManagerWithSiteId(1249, region: .regionGlobal, testMode: false)
adm.delegate = self
func stateDidChange(sender: Adman) {
switch sender.state {
case .ReadyForPlayback:
func viewClosed() {}
func bannerTouched(urlToNavigate: String!) {
override func didReceiveMemoryWarning() {
// Dispose of any resources that can be recreated.