Log in Taku management platform, click SDK download, you can enter the download SDK interface, you can choose manual import package and Cocoapods access two ways, select the need to access the advertising platform.
In order to increase domestic monetization income, it is recommended to additionally access WeChat Open SDK and associate the App ID in the TopOn developer backend. Specific access guidelines>
Cocoapod access Select No, click Generate Resource Pack below and download, and import tips and reference documents to access according to SDK.
Cocoapod access Select Yes, click Generate and add the following line to your Podfile, run the following command on the command line:
pod install --repo-update
After iOS14.5, you need to apply for App Tracking Transparency to obtain the permission to use IDFA. For details, please see App Tracking Transparency.
Before integrating this section, you should be aware that it is necessary to provide users with a detailed explanation of the relationship between the system permissions required by the Taku SDK and various business functions, as well as the timing for requesting these permissions.
For the optional system permissions required by the Taku iOS SDK, you can refer to the following table for detailed information on the relationship between these permissions and the corresponding business functions, as well as the timing for requesting them. Since not applying for these permissions may impact their associated features, you can configure them reasonably based on your actual business needs.
List of iOS Application Permissions:
Permission | Function | Purpose | Timing of Request |
---|---|---|---|
NSUserTrackingUsageDescription | [Optional] Obtain device identifier to recognize device information | For ad delivery and anti-cheat purposes | Invoked by the developer when calling SDK functions that require this permission. The permission is requested when the developer needs to adjust ad monetization strategies and data analysis services based on device information. |
2.1.1 Add a tracking permission request description to the info.plist file.
NSUserTrackingUsageDescription
This identifier will be used to deliver personalized ads to you.
2.1.2 Integrate the following code into your project:
#import
if (@available(iOS 14, *)) {
//iOS 14
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
//to do something,like preloading
}];
}
2.2 Add HTTP permissions
Add the tracking permission request description to the info.plist file as follows
NSAppTransportSecurity
NSAllowsArbitraryLoads
Apple provides SKAdNetwork as a privacy-safe way for ad networks like AD Networks to track installs. To use SKAdNetwork, determine the set of networks that have permission to show ads within your app, and check their checkboxes in the Info.plist Generator below. Then add each network’s SKAdNetworkIdentifier list, as shown in concatenated form in the code segment generated by the Info.plist Generator, to your app’s Info.plist file. For more information, see SKAdNetwork Documentation.
By copying the SKAdNetwork ID generated on the download platform and then adding it to the info.plist file
SKAdNetworkItems
SKAdNetworkIdentifier
xxxxxx.skadnetwork
.
.
.
Your App is required to develop a Privacy Policy, and to display the Privacy Policy and obtain consent from users when they first launch the App. Please refer to the Privacy Compliance Guide for the Privacy Policy formulated by the App. Please ensure that users agree with the Privacy Policy of the App before initializing Taku SDK.
Call the SDK to obtain advertising must first be initialized before, suggest the AppDelegate application: didFinishLaunchingWithOptions execution method. How do I get the App Key?
#import
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[ATAPI setLogEnabled:YES];//Turn on debug logs
[[ATAPI sharedInstance] startWithAppID:@"your appid" appKey:@"your appkey" error:nil];
return YES;
}
In order to quickly obtain the display effect of the advertisement, Taku provides a set of test mode, which can quickly view the actual effect of the platform advertisement, which is called before initializing the SDK. The code is as follows:
#import
// Set up an idfa for test bidding, such as Meta AD test equipment, etc
[ATAPI setHeaderBiddingTestModeWithDeviceID:@"your device idfa"];
/*
Note: Call this code, the AD request will use the AD configuration issued by the server, if the test is completed,
you need to use your own AD configuration, you need to remove this paragraph.
*/
[ATAPI setDebuggerConfig:^(ATDebuggerConfig *debuggerConfig) {
// device idfa
debuggerConfig.deviceIdfaStr = @"your device idfa";
// Specify the advertising platform for testing
debuggerConfig.netWorkType = ATAdNetWorkCSJType;
}];
Integrate the Admob advertising platform SDK. The platform requires adding GADApplicationIdentifier to the Info.plist of the xcode project to configure your Admob AppID, otherwise it will crash. Refer to the following, please use your Admob identifier to replace:
GADApplicationIdentifier
ca-app-pub-*************~**********
Due to the requirements of Meta platform, to test Meta ads, you need to download and log in to the Facebook client in the test phone to fill the ads. Please refer to the details.