Swift Package Manager (SPM) is Apple's official dependency manager, built into Xcode. It automates the process of downloading, compiling, and linking dependencies for Swift and Objective-C projects.
To add AMRSDK packages, open your project in Xcode and go to File > Add Package Dependencies, then enter the package URL.
Networks that share the AdMob adapter (A4G, ADX, ReklamUp) also use the AdMob SPM package.
All other networks require CocoaPods integration.
Can I use both CocoaPods and Swift Package Manager in the same project?
It is not recommended to mix CocoaPods and SPM for the same SDK or adapter, as this can cause duplicate symbol errors at link time. Choose one integration method and use it consistently across all AMRSDK packages.
How do I update AMRSDK using Swift Package Manager?
In Xcode, go to File > Packages > Update to Latest Package Versions. Xcode will fetch the latest compatible versions of all added packages, including AMRSDK and its adapters.
Why are ads not showing after integration?
Make sure you have completed the following steps:
1. At least one mediation adapter is added to your project.
2. AMRSDK is initialized with a valid App ID before requesting ads.
3. The zone ID used in ad requests is correct and active in the AMR dashboard.
4. Your device has an active internet connection.
5. If using AdMob, the GADApplicationIdentifier key is set in your Info.plist.
Do I need to add SKAdNetwork IDs to my Info.plist?
Yes. Since iOS 14, SKAdNetwork IDs are required for conversion tracking to work correctly. You must add the SKAdNetworkItems entries for each ad network you integrate. Use the documentation page to generate the correct list based on your selected networks.
How do I enable test suite?
To enable the test suite, add your device's IDFA to the Admost dashboard as a tester. Once added, the test suite will automatically start on that device without any code changes required.
How do I get my device's IDFA?
On iOS 14 and later, you can find your IDFA by going to Settings > Privacy & Security > Tracking. You can also retrieve it programmatically using ASIdentifierManager.shared().advertisingIdentifier.uuidString after the user grants App Tracking Transparency permission.
Alternatively, many ad network test apps (such as the AdMob sample app) display the IDFA directly on screen for convenience.
Why is my IDFA showing as zeros?
An IDFA of 00000000-0000-0000-0000-000000000000 means the user has not granted App Tracking Transparency (ATT) permission, or tracking is restricted on the device. Make sure you request ATT permission using ATTrackingManager.requestTrackingAuthorization before accessing the IDFA.
Do I need to request App Tracking Transparency permission?
Yes. Since iOS 14, apps must request ATT permission before accessing the IDFA. While the SDK will still function without it, granting permission significantly improves ad targeting and revenue. Add the NSUserTrackingUsageDescription key to your Info.plist with a clear explanation, and call ATTrackingManager.requestTrackingAuthorization before initializing the SDK for best results.
What is the minimum iOS version supported?
AMRSDK requires a minimum deployment target of iOS 9.0. However, most mediation adapters require iOS 13.0 or later. Refer to the documentation page for per-network requirements.
Why is the SDK not initializing?
The most common causes are:
1. An invalid or missing App ID — make sure the App ID from your Admost dashboard is passed correctly to the SDK initializer.
2. No internet connection at initialization time.
3. Network adapters that require additional credentials (e.g. AdMob requires GADApplicationIdentifier in Info.plist) are not configured.
4. The SDK is being initialized on a background thread — always initialize on the main thread.
What should I do if I get a duplicate symbol linker error?
Duplicate symbol errors are usually caused by including the same SDK or adapter twice — most commonly by mixing CocoaPods and Swift Package Manager for the same dependency. To fix this:
1. Choose a single integration method (CocoaPods or SPM) and remove the duplicate.
2. Check that no adapter pod or package is included more than once.
3. Run pod deintegrate and pod install if using CocoaPods to ensure a clean state.
How do I check which SDK and adapter versions are integrated?
You can check the integrated SDK and adapter versions directly from the Test Suite. The Test Suite displays version information for AMRSDK and all active adapters on your device.
Error Codes
0 - AMRErrorCodeUnknownError 500 - AMRErrorCodeServerError - No server response.
-1 - AMRErrorCodeAdRequestFailed - All placements returned no fill or timeouted.
1077 - AMRErrorCodeNoPlacementFound - No placements found for zone.
1078 - AMRErrorCodeFrequencyCappingFilled - Frequency capping is filled for zone.
1079 - AMRErrorCodeNoInternetConnection - No Internet Connection.
1081 - AMRErrorCodeTagDisabled - Tag disabled for zone.
1082 - AMRErrorCodeNoAdPolicyFoundForZone - NoAd Ad policy found for zone.
1083 - AMRErrorCodeNoAdPolicyFoundForTag - NoAd Ad policy found for tag.
1084 - AMRErrorCodeFrequencyCappingFilledForTag - Frequency capping is filled for tag.
1085 - AMRErrorCodeAdNotReady - Ad is not ready to show.
1086 - AMRErrorCodeInvalidZoneId - Invalid zoneId.
1088 - AMRErrorCodeInvalidAppId - Invalid appId.