Installation
๐ฆ Swift Package Manager Integrationโ
Add the SDK to your project using Swift Package Manager:
https://github.com/OCM-Digital-Media/ocm-adnetwork-sdk
โ ๏ธ Important: Choose dependency rule Branch "main"โ
๐ Required Permissionsโ
To ensure proper functionality of the SDK (including ad serving, SKAdNetwork attribution, and tracking transparency), add the following entries to your app's Info.plist:
๐งท SKAdNetwork Supportโ
<key>SKAdNetworkItems</key>
<array>
<dict><key>SKAdNetworkIdentifier</key><string>cstr6suwn9.skadnetwork</string></dict>
<dict><key>SKAdNetworkIdentifier</key><string>4fzdc2evr5.skadnetwork</string></dict>
...
</array>
tip
You can find the full, up-to-date list of identifiers in our Info.plist example file or in the official documentation of ad networks you're using.
๐ก App Tracking Transparency (ATT)โ
Add this key to show the user-facing permission dialog:
<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>
๐ App Transport Security (if needed)โ
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key><true/>
<key>NSAllowsArbitraryLoadsForMedia</key><true/>
<key>NSAllowsArbitraryLoadsInWebContent</key><true/>
</dict>
๐ฒ Google AdMob (or GAM) App IDโ
Make sure to include your AdMob or GAM Application ID:
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-3940256099942544~3347511713</string>
Next Stepsโ
Continue to Getting Started to initialize the SDK in your app.