-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Prerequisites | |
---|---|
Target Minimum iOS | 13.0 |
XCode | 15.3+ |
Your project requires additional configurations that can be performed automatically by a special script.
- Download the casconfig.rb
- Place the script in directory with the app
.xcodeproj
- Open the terminal window and run command:
cd into/your/project/folder
- Run ruby script:
ruby casconfig.rb <CAS_ID>
What is CAS ID?
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://cas.ai
If you just want to experiment or test the SDK, you can skip the configuration your project.
What does the script do?
The script automatically performs the following integration steps:
- SKAdNetwork Support
- App Transport Security
- Link the CAS project
- Set User Tracking usage description
- Set Google Ads App ID
- Set Delay app measurement
Note
Repeat the script before every update of the application to make sure you are using up-to-date configurations.
Check the additional features of the script by running the command:
ruby casconfig.rb --help
The source code for the script can be found in the repository here.
Tip
Instead of using the casconfig.rb
script, you can manually complete additional steps to configure your project. (Not recomended)
Follow these steps to integrate CAS.AI framework with CocoaPods. CocoaPods is a dependency manager for Objective-C and Swift; it automates and simplifies the SDK integration process.
The CAS framework are not yet available on Swift Package Manager.
For projects where you cannot use CocoaPods during Xcode build, you need to manually collect all frameworks from the CAS Pods dependencies and add them to the project. Our script, which can be found in the repository here, will assist you with this process.
The Podfile
is a specification that describes the dependencies of the targets of one or more Xcode projects. You could use a pod init
command to create the Podfile
with smart defaults.
source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/cleveradssolutions/CAS-Specs.git'
platform :ios, '13.0'
use_frameworks! :linkage => :static
$cas_version = '~> 3.9.8'
Make sure there are no other use_frameworks!
line declarations in the Podfile.
target 'YourProjectName' do
# There should be `pod` on ready-made solutions and/or separate adapters.
# pod 'CleverAdsSolutions-SDK/[Solution|Adapter]', $cas_version
end
CAS is a mediation platform that requires selecting desired ad networks for monetizing your application.
You can choose one of the ready-made solutions or integrate each adapter separately. Such solutions do not require you to add each network adapter separately.
If you already know what to expect from ad networks and are ready to select the set of adapters yourself, after completing the steps on this page, please refer to the Advanced Integration page. Or consult your account manager for assistance.
Add one of the following lines of the standard Clever Ads Solution to your apps's target in Podfile
.
Contains a number of stable ads networks that are recommended for use in most applications:
Google Ads, Unity Ads, IronSource, LiftoffMonetize, InMobi, Yandex Ads, Mintegral, Pangle, Chartboost, DTExchange, AppLovin, AudienceNetwork, Bigo, CASExchange.
pod 'CleverAdsSolutions-SDK/Optimal', $cas_version
Designed for applications tagged at a children's audience and fully compatible with the Children’s Online Privacy Protection Act (COPPA). Contains:
Google Ads, Unity Ads, IronSource, LiftoffMonetize, InMobi, Yandex Ads, Mintegral, Chartboost, DTExchange, Kidoz, SuperAwesome.
pod 'CleverAdsSolutions-SDK/Families', $cas_version
The families ads solution is NOT intended for apps in Apple Kids Category.
- 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
- Project Setup
- Advanced integration
- Additional mediation steps
- AppStore data disclosure
- App-ads.txt🔗