This tutorial helps you install the Exchange SDK in your iOS app.
Avocarrot iOS SDK supports iOS 8.0 or higher.
You can add AvocarrotSDK to your project using Cocoapods (recommended) or manually
pod ‘avocarrot-ios-sdk’to your Podfile to integrate it to your project
- If you want to use the Avocarrot stream ads, add
pod 'avocarrot-ios-sdk/NativeView'to your Podfile
We also have sample code available at our GitHub repository.
Manual Avocarrot SDK integration guide
|Core functionality; provides access to main SDK settings|
|Provides access to raw native data|
|Provides access to rendered native ads|
|Implementation of VAST|
|Implementation of MRAID|
- Add SDK files to your project (required)
Ad type Frameworks Native assets
Native view (rendered native ad)
-ObjCflag to project settings (Other Linker Flags property)
Note: If your app can’t use
-ObjCflag just add
-force_load $(PROJECT_DIR)/Pods/avocarrot-ios-sdk/AvocarrotSDK.framework/Versions/Current/AvocarrotSDKflag to Other Linker Flags
Required system libraries for all libs
The SDK with adapters uses the following system frameworks and libraries. You can set flag “Link Frameworks automatically” to
YESotherwise you should add following system frameworks and libraries to your project manually:
TO DO list if you have a linking problem:
- Clean Build
- Restart Xcode
- Delete your DerivedData folder in
- Restart the computer
ATS settings in iOS 9.0 and greater
Since the Avocarrot SDK uses 3rd party networks to load ads and we have no control over these networks loading their content via https, you should disable ATS for your application to ensure the Avocarrot SDK behaves as intended. To disable ATS add the following settings to your application Info.plist file:
<key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key><true/> <key>NSAllowsArbitraryLoadsForMedia</key><true/> <key>NSAllowsArbitraryLoadsInWebContent</key><true/> </dict>
Choose an ad format
You're ready to implement an ad. Avocarrot Exchange offers a number of native ad formats, so you can choose the one that best fits your app's user experience.