Home - cleveradssolutions/CAS-iOS GitHub Wiki
Prerequisites | |
---|---|
iOS Minimum version | 13+ |
XCode | 15.1+ |
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.
- Download the casconfig.rb
Script version 1.1 dated November 10, 2023
- Place the script in the directory with the app
.xcodeproj
file - 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
Instead of using a script, you can manually complete additional steps to configure your project.
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.
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
.
Tip
CocoaPods provides a pod init
command to create a Podfile with smart defaults. You should use it.
source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/cleveradssolutions/CAS-Specs.git'
platform :ios, '13.0'
use_frameworks! :linkage => :static
$casVersion = '~> 3.7.0'
target 'YourProjectName' do
# There should be `pod` on ready-made solutions and/or separate adapters.
# pod 'CleverAdsSolutions-SDK/[Solution|Adapter]', $casVersion
end
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 |
- Open Xcode
<Project>.xcodeproj
- Go to the Build Settings section for the app target
- Find the
OTHER_LDFLAGS
property, if customized. - Make sure the
$(inherited)
flag is at the beginning of the list.
Open the terminal window and run:
cd into/your/project/folder
Run pod install with repo update:
pod update
Make sure that after Pod installation complete
in the terminal, there are no issues that need to be fixed. Repeat the installation after resolving issues.
Note
Read more about Cocoapods troubleshooting.
Make sure to always open the Xcode workspace instead of the project file when building your project:
open <Project>.xcworkspace
🔗 Done! What’s Next?
- Follow additional steps to integrate some ad networks if used:
- Read about Advanced integration to add more ad networks.
- Get started implementation with Initialize CAS