Skip to main content

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.