Add the SDK to your project
Before you can integrate the AwesomeAds SDK, you need to add the SDK to your project.
Source code for releases can be found here.
Add the SDK to your project using CocoaPods
AwesomeAds uses CocoaPods to make installing and updating the AwesomeAds (iOS) Publisher SDK as easy as possible. CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects.
Install CocoaPods
To install CocoaPods on your machine:
- Issue the following command in your terminal:
sudo gem install cocoapods
- Go to the project’s directory and initialize CocoaPods:
cd /path_to/my_project/ pod init
This creates a Podfile, where you can specify the dependencies to add to your new project. See the example Podfile here.
Add the SDK
Add the Cocoapod
To add the SDK to your project, declare the following Pod:
use_frameworks!
target 'MyProject' do
pod 'SuperAwesome', '9.4.0'
end
This instructs CocoaPods to fetch the latest version of the AwesomeAds (iOS) Publisher SDK.
Update dependencies
After you add the pod source, update your project’s dependencies by running the following command in the terminal:
pod update
From now on, ensure you use the .xcworkspace
file to open your project in Xcode, instead of the .xcproj
file.
Import SDK
Import the main SDK header file:
import SuperAwesome
// As a header
#import "SuperAwesome.h"
// or as a framework
#import <SuperAwesome/SuperAwesome.h>
// or for the new module method:
@import SuperAwesome;