Include iOS - cleveradssolutions/CAS-Flutter GitHub Wiki
Prerequisites | |
---|---|
XCode | 16.1+ |
Target Minimum iOS | 13.0 |
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/ios
- 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 recommended)
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 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/cleveradssolutions/CAS-Specs.git'
CAS.AI SDK offers three integration paths. Choose one based on your app’s target audience. If you're unsure which solution best fits your application, please contact your account manager.
Add one of the following lines of Clever Ads Solutions to your apps's target build configuration.
Recommended for most applications targeting a general or mixed audience. Includes a broad set of stable, high-performance networks:
Google Ads, Unity Ads, IronSource, LiftoffMonetize, InMobi, Yandex Ads, Mintegral, Pangle, Chartboost, DTExchange, AppLovin, AudienceNetwork, Bigo, CASExchange.
pod 'CleverAdsSolutions-SDK/Optimal', '4.1.0.1'
Required for applications directed exclusively at children and fully compatible with the Children’s Online Privacy Protection Act (COPPA). Networks included:
Google Ads, Unity Ads, IronSource, LiftoffMonetize, InMobi, Yandex Ads, Mintegral, Chartboost, DTExchange, Kidoz, SuperAwesome.
pod 'CleverAdsSolutions-SDK/Families', '4.1.0.1'
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
To display the App Tracking Transparency authorization request for accessing the IDFA, update your Info.plist
to add the NSUserTrackingUsageDescription key with a custom message describing your usage. Below is an example description text:
<key>NSUserTrackingUsageDescription</key>
<string>Your data will remain confidential and will only be used to provide you a better and personalised ad experience</string>
Some examples include:
- Your data will remain confidential and will only be used to provide you a better and personalised ad experience
- Your data will be used to provide you a better and personalised ad experience
- Your data will be used to create a customized experience tailored to your interests
- Allowing tracking will enable more personalized ads for you
- We try to show ads for apps and products that will be most interesting to you based on the apps you use
- This identifier will be used to deliver personalized ads to you
- This only uses device info for more interesting and relevant ads
Note
Name in Xcode Property List Editor: Privacy - Tracking Usage Description
To optimize performance and to improve the user experience, you can localize the NSUserTrackingUsageDescription
string. Please follow the Documentation > Xcode > Localization instructions to learn how to localize your app.
The table below gives you a variety of localizations that you can use at your discretion.
Locale | Description |
---|---|
English (en) | Your data will remain confidential and will only be used to provide you a better and personalised ad experience |
German (de) | Ihre Daten bleiben vertraulich und werden nur dazu verwendet, Ihnen ein besseres und personalisiertes Werbeerlebnis zu bieten |
French (fr) | Vos données resteront confidentielles et seront utilisées uniquement pour vous offrir une expérience publicitaire meilleure et personnalisée |
Spanish (es) | Sus datos permanecerán confidenciales y solo se utilizarán para brindarle una experiencia publicitaria mejor y personalizada |
Ukrainian (uk) | Ваші дані залишатимуться конфіденційними та використовуватимуться лише для надання вам кращої та персоналізованої реклами |
Russian (ru) | Ваши данные останутся конфиденциальными и будут использоваться только для предоставления вам более качественной и персонализированной рекламы |
Portuguese (pt) | Seus dados permanecerão confidenciais e serão usados apenas para lhe proporcionar uma experiência publicitária melhor e personalizada |
Japanese (ja) | お客様のデータは機密として保持され、より優れたパーソナライズされた広告エクスペリエンスを提供するためにのみ使用されます |
🔗 Next
Initialization