If you’re using Swift, you need to use an .h file to bridge between Objective-C and Swift.
Here’s how to do it:
Create a Header file where you will add the #imports from the headers.
Go to Build Settings > Swift Compiler – Code Generation.
In Objective-C Bridging Header, set the path and file name as below:
Add the necessary imports with Objective-C code:
#import <TappxFramework/TappxAds.h>There are various reasons why an ad load could fail. If this happens, the SDK will show the error details in Logs console (Xcode).
Also if you’re actively loading the ad will receive an error in the delegates functions through the TappxErrorAd object.
| Code | Type | Explanation |
| NO_FILL | Notice | This means that at this moment the system is not getting an ad that fits your request. You should try and request an ad again. However, if you keep getting NO_FILL for your ad requests, you may want to use an additional ad network to ensure higher fill rates. |
| DEVELOPER_ERROR | Error | There’s an error with your SDK integration. Check our guides again and make sure you’re using the correct Tappx key. You can find more details in Log. |
| SERVER_ERROR | Error | There’s a server error. Try again in a few seconds. |
| VIEW_INCONSISTENCY_ERROR | Error | An inconsistency was detected in the ad view. |
| CANCELLED | Error | The ad request was cancelled. |
| NO_CONNECTION | Error | There’s a network error. This error usually happens when the device doesn’t have an internet connection or the connection is restricted. |
Once the integration is complete, you can test that everything is working fine using test ads. To activate them, please follow the instructions below.
Please note: These test campaigns are intended for testing purposes only, not for end users, and they are not monetizable.
When initiating the SDK and adding your Tappx key, you can also add the testMode.
[TappxFramework addTappxKey:@"**YOUR-APP-KEY**" testMode:YES];
TappxFramework.add(tappxKey:"**YOUR-APP-KEY**", testMode: true)
TappxFramework.add(tappxKey:"**YOUR-APP-KEY**", testMode: true)
ATT is Apple's user privacy framework and allows the user to choose whether an app can track their activity across other companies’ apps and websites for the purposes of advertising or sharing with data brokers.
According to the new Apple advertisement policy, every time you upload a new update, you must adjust your settings in order to accept the new conditions.
That is why you will see the following screen, and you must accept the options we have marked with a red circle.
Complete demo: Objective-C | Swift | SwiftUI
If you get an error that’s not explained here or if you need help, please contact us