Getting Started with the Supersonic iOS SDK
To begin monetizing your application with the Supersonic SDK, follow these 2 easy steps:
- Add the Supersonic SDK to your project
- Create Supersonic Instance
Before You Start
Make sure you have integrated the latest version of our SDK. Find it here.
We support iOS versions 7 and up.
Note: If you are upgrading from a previous version of the Supersonic SDK, you must completely remove it from your project, otherwise it will cause issues with the update. We also recommend erasing older builds from test devices and making a new build.
Step 1. Add the Supersonic SDK to Your Project
Follow these steps to add the Supersonic SDK to your project:
- Add Supersonic Framework
After you download the SDK; unzip it and add Supersonic.framework into your Xcode Project. - Adding Required Frameworks
Go to Targets ➣ Build Phases ➣ Link Binary With Libraries.
Click ‘+’ to add the following frameworks:Foundation AVFoundation CoreMedia CoreVideo QuartzCore SystemConfiguration CoreGraphics CFNetwork MobileCoreServices libz.tbd StoreKit AdSupport CoreLocation CoreTelephony Security
- Status Bar Control
To enable the Supersonic SDK to hide the status bar (even if your app displays it),
in your info.plist, add the View controller-based status bar appearance flag’s value and set it to NO. - Linker Flags
Add the following linker flag to the build settings at:
Target ➣ Build Settings ➣ Linking ➣ Other Linker Flags:
–ObjC -
iOS9 App Transport Security settings
Important! In iOS9, Apple has added in controls around ‘ATS’. In order to ensure uninterrupted support for Supersonic Ad delivery across all Mediation Networks, it’s important to make the following changes in your info.plist:
- Add in a dictionary called ‘NSAppTransportSecurity‘. Make sure you add this dictionary on the ‘Top Level Key‘.
- Inside this dictionary, add a Boolean called ‘NSAllowsArbitraryLoads‘ and set it to YES.
Step 2. Create Supersonic Instance
If you are using Swift, read our Swift guidelines here before you continue on this document.
Follow these steps to create a Supersonic Instance:
- Import the following file:
OBJECTIVE-C#import "Supersonic/Supersonic.h"
SWIFTNo import required with Swift. - Create a Supersonic instance by calling the following method on your application start:
OBJECTIVE-C[Supersonic sharedInstance];
SWIFTSupersonic.sharedInstance()
- Optional: To receive detailed log events, you can register to the log delegate. Skip to Appendix A for more information.
Done!
You are now ready to start working with Supersonic’s Ad Units and Mediation Tools.
Follow our integration guides to begin integrating your Ad Units:
Interested in Video mediation? Integrate our Rewarded Video and follow our mediation docs.
Appendix A – Registering to the Log Delegate
A log delegate is [] Before initializing the SDK you should first register to the log delegate for receiving detailed log events.
[[Supersonic sharedInstance] setLogDelegate:YOUR_LOG_DELEGATE];
Supersonic.sharedInstance().setLogDelegate(YOUR_LOG_DELEGATE)