-
Notifications
You must be signed in to change notification settings - Fork 4
Manually configure project
Note
We have created a script that performs all the steps below automatically for you. Learn how to invoke automatic configuration on the Project Setup page.
iOS versions 14+ require that you include the SKAdNetworkIdentifier
for all of mediated ad networks in the Info.plist
. For more information, see "SKAdNetwork: Configuring the Participating Apps" in Apple’s StoreKit Developer documentation.
- An up-to-date list of SKAdNetwork partners can be found in the repository: SKAdNetworkItems.xml
- Copy the
<key>SKAdNetworkItems</key><array>...</array>
tags from theSKAdNetworkItems.xml
. - Open
Info.plist
file as Source Code. - Paste the content at the end of the file before
</dict></plist>
🌟 Last updated:
Additional SKAdNetworkIdentifier
values may be added in the future. We recommend checking back on this page for updates.
App Transport Security (ATS) is a privacy feature introduced in iOS 9. It's enabled by default for new apps and enforces secure connections.
To ensure your ads are not impacted by ATS, add the NSAllowsArbitraryLoads
exception to disable ATS restrictions:
Key | Type | Value |
---|---|---|
Information Property List | Dictionary | |
▼ App Transport Security Settings | Dictionary | |
- Allow Arbitrary Loads | Boolean | YES |
Or, open plist as source code:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
Note
Make sure that your info.plist does not contain any other exceptions besides NSAllowsArbitraryLoads
, as this might create a conflict.
To link your project with the mediation settings, you need to have a registered account and an application in the CAS system.
Note
If you haven't created an CAS account and registered the app yet, now's a great time to do so.
If you just want to experiment or test the SDK, you can skip link your project.
- Sign In https://cas.ai/
- Select the Applications section on the right panel.
- Click the plus(+) button and follow the instructions on the form. It may take up to 30 minutes to register the app in the CAS system.
- After the registration completed, click the Action button in the row of your application
CAS uses a mediation configuration caching system to handle unexpected situations.
- Click Download CAS settings button.
- A
cas_settings[settings_id].json
file will be downloaded. - Move your config file into the root of your Xcode project.
- If prompted, select to add the config file to all targets.
- The CAS config file contains unique, but non-secret identifiers for your project.
- The configuration file is updated frequently, so we recommend that you regularly download the latest file for each new release.
- Please do not change the name of the file. Make sure the config file name is not appended with additional characters, like
(2)
. - The
[settings_id]
is the internal unique identifier of the resource. - If you have multiple CAS manager IDs in your project, you must associate each CAS ID with a registered app in the CAS console so that each app can have its own
cas_settings[settings_id].json
file.
CAS assigns a new AdMob App ID for your application to the correct operation of all features.
Important
You cannot use your own identifier and must replace it with a new one generated by CAS system.
You can find your Admob App ID in the CAS UI:
- Click the Show AdMob App ID button.
- Copy the id from the form.
- Add a
GADApplicationIdentifier
key to your app'sInfo.plist
file. - Insert AdMob app ID to
<string>
, as shown below.
<!-- Sample AdMob App ID: ca-app-pub-3940256099942544~1458002511 -->
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy</string>
Or, edit it in the property list editor:
Key | Type | Value |
---|---|---|
Information Property List | Dictionary | |
▼ GADApplicationIdentifier | String | ca-app-pub-3940256099942544~145800251 |
Note that failure to add the GADApplicationIdentifier
key as shown above results in a crash with the message:
The Google Mobile Ads SDK was initialized incorrectly.
By default, the Google Mobile Ads SDK initializes app measurement and begins sending user-level event data to Google immediately when the app starts. This initialization behavior ensures you can enable AdMob user metrics without making additional code changes.
However, if your app requires user consent before these events can be sent, you can delay app measurement until CAS explicitly initialize the Google Mobile Ads SDK.
To delay app measurement, add the GADDelayAppMeasurementInit
key with a boolean value of YES
to your app’s Info.plist
. You can make this change programmatically:
<key>GADDelayAppMeasurementInit</key>
<true/>
Or, edit it in the property list editor:
Key | Type | Value |
---|---|---|
Information Property List | Dictionary | |
▼ GADDelayAppMeasurementInit | Boolean | YES |
Android SDK | iOS SDK | Unity SDK | Flutter SDK | App-ads.txt | cleveradssolutions.com | [email protected]
- Project Setup
- Include Android
- Include iOS
- Additional Network Steps
- App-ads.txt