Skip to content

iOS Project Setup

Mert Celik edited this page Jan 31, 2019 · 14 revisions

1. Add the Appmediation SDK to your project

Appmediation supports both CocoaPods and manual download to integrate iOS SDK.

If you are interested in advanced configurations, please refer to Advanced Setup.

CocoaPods (Preferred)

To integrate with Cocoapods, please add the line below to your podfile and run pod install. New to Cocoapods? learn more here.

pod 'Appmediation'

If you want to customize adapters, please head over to Advanced Setup.

Manual Download

You can download the SDK and adapters here. After downloading, unzip the Appmediation.zip and drag-drop the folder into your project. Make sure you have Copy items if needed selected.

2. Prepare Your Application

Add Linker Flag

Add the -ObjC linker flag to your project by going to Target > Build Settings > Linking > Other Linker Flags

App Transport Security

Setup the following keys in your app's info.plist. This will allow your application to make HTTP requests to ensure that you will receive ads from all of our advertising partners.

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

Dependencies

Appmediation SDK is built with modularity and compatibility in mind. That is why we support the usage of module maps. If you have module maps enabled in your Xcode project, dependencies will be dealt automatically, you don't need to add anything!

But if you are not using module maps, you must link your application with required libraries below;

  • AdSupport
  • AudioToolbox
  • AVFoundation
  • CoreData
  • CoreGraphics
  • CFNetwork
  • CoreImage
  • VideoToolbox
  • StoreKit
  • WebKit
  • CoreMotion
  • CoreLocation
  • CoreTelephony
  • CoreMedia
  • Foundation
  • ImageIO
  • MapKit
  • MediaPlayer
  • MobileCoreServices
  • PassKit
  • QuartzCore
  • Security
  • SystemConfiguration
  • UIKit
  • EventKit
  • WatchConnectivity
  • GLKit
  • JavaScriptCore
  • SafariServices
  • libc++.tbd
  • libsqlite3.0.tbd
  • libxml2.tbd
  • libz.tbd

Clone this wiki locally