Skip to content
Str4tos edited this page Apr 11, 2024 · 44 revisions
Prerequisites
iOS Minimum version 13+
XCode 15.1+

Automatically configure project

Your project requires additional configurations that can be performed automatically by a special script. Just download the script and run the command. Repeat the script before every update of the application to make sure you are using up-to-date configurations.

  1. Download the casconfig.rb

Script version 1.1 dated November 10, 2023

  1. Place the script in the directory with the app .xcodeproj file
  2. Open the terminal window and run command:
ruby casconfig.rb CASID

Note

In most cases, a CASID is the same as your app store ID.
You can find an app store ID in the URL of your app’s Apple App Store URL. For example, the URL is apps.apple.com/us/app/id123456789 then app store ID is 123456789.

If you haven't created an CAS account and registered an app yet, now's a great time to do so at https://cleveradssolutions.com
If you just want to experiment or test the SDK, you can skip the configuration your project.

Check the additional features of the script by running the command:

ruby casconfig.rb --help

Manually configure project

Instead of using a script, you can manually complete additional steps to configure your project.

Integration frameworks

Follow these steps to integrate CleverAdsSolutions with Сocoapods. CocoaPods is a dependency manager for Objective-C and Swift; it automates and simplifies the SDK integration process. See the CocoaPods Guide on Getting Started and Using CocoaPods for more information.

1. Open Podfile

The Podfile is a specification that describes the dependencies of the targets of one or more Xcode projects. The file should simply be named Podfile.

2. Add podfile header

Add the following lines to the beginning of podfile:

source 'https://cdn.cocoapods.org/'
source 'https://github.com/cleveradssolutions/CAS-Specs.git'

platform :ios, '13.0'
use_frameworks! :linkage => :static
$casVersion = '~> 3.6.1'

Note

To receive release updates Subscribe

3. Add pods to your app's target

target 'YourProjectName' do
  # There should be `pod` on ready-made solutions and/or separate adapters.
  # pod 'CleverAdsSolutions-SDK/[Solution|Adapter]', $casVersion
end

4. Add Ads Solution

Clever Ads Solutions provide ready-made solutions for you to choose from.
Such solutions do not require you to add each network adapter separately in dependencies. One dependency per solution is enough.

  • An Optimal Ads Solutions contains a number of stable partner networks that are recommended for use in most applications.
pod 'CleverAdsSolutions-SDK/Optimal', $casVersion
  • A Families Ads Solutions designed for applications tagged at a children's audience.
    The solution is NOT intended for apps in Apple Kids Category, read more below.
pod 'CleverAdsSolutions-SDK/Families', $casVersion
  • A Base SDK of CleverAdsSolutions only without dependencies on third party adapters. Using only the base SDK, you can add any adapters separately.
pod 'CleverAdsSolutions-Base', $casVersion

In the following table, you can see all the ad networks supported by Clever Ads Solutions. And a list of partners that are included in the Optimal and Families Ads solutions.

Network Optimal Families Notes
Google Ads ☑️ ☑️ Notes
Unity Ads ☑️ ☑️ Notes
IronSource ☑️ ☑️ Notes
LiftoffMonetize ☑️ ☑️ Notes
InMobi ☑️ ☑️ Notes
Yandex Ads ☑️ ☑️ Notes
Mintegral ☑️ ☑️ Notes
Pangle ☑️
Chartboost ☑️ ☑️ Notes
DTEchange ☑️ ☑️ Notes
AppLovin ☑️ Notes
AudienceNetwork ☑️ Notes
Bigo ☑️ Notes
Kidoz ☑️ Notes
SuperAwesome ☑️ Notes
MyTarget Notes

5. Install pods to project

Open the terminal window and run:

cd into/your/project/folder

Run pod install with repo update:

pod update

6. Open XCode Workspace

Open XCode .xcworkspace to use cocoapods in your project.


🔗 Done! What’s Next?