Menu

iOS SDK access FAQs

This article contains answers to questions related to iOS, Unity, Flutter and Creator. If you cannot find the frequently asked questions in this article, you can also troubleshoot the frequently asked questions in Find.

1. Compilation error

1.1 After connecting to Unity SDK, compilation error unity cannot use '@try' with Objective-C exceptions disabled .How to solve it? (Keywords: Unity, @try, compilation error)

Answer: Modify the path target (UnityFramework)——>Bulid Settings——>Apple Clang- Language-Objective-C——>Enable Objective-C Exceptions——>YES.

1.2 After connecting to Unity SDK, the compilation is normal, but it crashes after running, and 'Library not loaded: @rapth/XX.framework/' appears on the console. XXX'. (Keywords: Unity, @rapth, running crash)

Answer: The problem can be eliminated in the following two ways:
1. Target——>Bulid Setting——>Runpath Search Paths, add @executable_path/Frameworks.
2. Check the Podfile file in the project to see if there is use frameworks!, remove it and try again pod install project.

1.3 After integrating the SDK, it conflicts with other SDKs in the project. How to solve it? (Keywords: SDK duplication, SDK conflict)

Answer: Follow the error message to find the corresponding library. If it is a duplicate import, then select a library to keep. ; If there is a conflict between class names or attribute names, you need to provide feedback to the corresponding platform or us to coordinate and resolve the naming conflict.

2. Docking questions

2.1 Regarding the native self-rendering information flow connected to TopOn SDK, there is no response when clicking. What's going on? ? (Keywords: native self-rendering ads, no response when clicking)

Answer: You need to check the steps to access the native self-rendering information flow;
1 . For controls that register click events, please do not register the parent view and dislikeButton to the click event, otherwise clicking to close the ad may trigger the click effect. Special note, regarding Youlianghui, you need to call [nativeADView getMediaView] to obtain the media view of Youlianghui, and use isVideoContents to determine whether it is a video advertisement to add the mediaView view.
2. The relationship between bound self-rendering views and SDK internal view controls.
3. Call the render view method.

// 1. Register the click event control
- (void)registerClickableViewArray:(NSArray *)registerClickViewArray;

//2. Bind a self-rendered view to the SDK's internal view controls
+ (instancetype)loadPrepareInfo: (void(^)(ATNativePrepareInfo *prepareInfo))loadPrepareInfoBlock;

//3. Call the render view method
- (void) rendererWithConfiguration:(ATNativeADConfiguration*)configuration selfRenderView:(UIView *_Nullable)selfRenderView nativeADView:(ATNativeADView *)nativeADView;

2.2 After receiving a complaint from a user, how can an online product prohibit advertising to the user? (Keywords: user complaints, complaints, ban on advertising)

Answer: The emergency plan is to persuade the user to give the IDFA device number, and then add a blank with the IDFA Traffic grouping allows users to install App-MyIDFA. The subsequent solution needs to be solved through publishing, which is to give the user a user ID and set customData->kATCustomDataUserIDKey. In the future, advertising distribution can be prohibited by restricting the UserID. Please refer to Documentation, sample code:

[ATAPI sharedInstance].customData = @{kATCustomDataUserIDKey:@"test_custom_user_id"};

2.3 How to load a native document to obtain three offer materials, and then obtain three offer ads for display in the agency? (Keywords: native advertising, multiple natives, native lists)

Answer: Native information flow can be set via the setting path:Aggregation management - advanced settings ——The number of advertisements loaded (N), this can make each layer of advertising sources in the advertising slot successfully load N advertisements. For example, this advertising slot is configured with two layers of advertising sources, assuming that they are all loaded and cached. , then there are 2N offer advertisements in the cache.
Since getNativeAdOfferWithPlacementID can only obtain one offer advertisement each time, it is recommended to obtain multiple offers through a for loop and display them. When the obtained result is nil, new advertisements need to be reloaded.
We recommend that developers fetch offer ads in a for loop that should be consistent with the number of requests set in the background. After fetching a loop, reload a round of native information flow to ensure that the value of the ads obtained is optimal.

2.4 After the advertisement is displayed, when are offers such as ATBanner destroyed, and the memory is released after the user closes the display? (Keywords: memory release, cache removal, advertising destruction)

Answer: Regarding the timing of removing the advertising cache in the SDK, screen opening, rewarded videos and inserts For these three types of on-screen ads, when the ad is turned off, the SDK will remove the corresponding object holding and cache, waiting for the system to recycle the memory; the timing for removing native ads and banner ads is to obtain the offer object of the ad. Remove the cache, and when the outside world no longer holds the object, it will wait for the system to reclaim the memory.

2.5 After watching the rewarded video advertisement, why was no reward issued? (Keywords: Incentive videos, rewards)

Answer: Most of these problems are caused by incorrect ad playback status, which results in the platform issuing rules not being triggered. When faced with this kind of problem, it is best to analyze the logs when this kind of problem occurs, and check whether there are any logs showing printing and playback errors. The second point is to capture the packet to obtain the material information of the advertisement and give it to the customer service of the corresponding platform for help. deal with.

2.6 Will the advertising-related agent callbacks be in child threads? (Keywords: agent callback, thread)

Answer: It is possible, so it is recommended that if developers want to operate some UI related things in the agent, please add Return to the main thread operation.

2.7 The log prints out "The advertising sdk was not initialized successfully. Please initialize the content sdk after the advertising sdk is initialized successfully"? (Keywords: initialization, loading failure)

Answer: Because the SDK of third-party advertising needs to be registered before it can load ads, developers are asked to call our initialization first. method.

2.8 How to integrate open-screen advertisements? (Keywords: launch screen advertising, recommended for integration)

Answer: For general launch screen logic, we recommend making a logo view to continue the launch screen process, with the bottom normal Load your main page and advertisements. After a certain period of time or after the open-screen advertisement is loaded successfully, display the open-screen view and remove the logo view. Explain in detail that the main interface will be loaded when the logoView is used, and there will be open-screen advertisements. When you return, show the opening screen advertisement, and then remove the logoView after the opening screen advertisement comes out. The rest is the normal logic. If the opening screen advertisement fails or the loading time exceeds your set time, then the above logoView will be moved directly. Except, open-screen ads will no longer be displayed.

2.9 The self-rendering information flow of  Vungle cannot be clicked to jump? (Keywords:Vungle, cannot jump)

Answer: There are some specialities in the self-rendering of the advertisements on the Vungle platform, which need to be called [nativeADView getMediaView]; to trigger this click event. Of course, if it is not a video advertisement, there is no need to add it to the self-rendering parent. view. Please refer to the following example:

The mediaView of the Vungle platform is passed back to Vungle during registration, so you need to call it to create Vungle's mediaView.

// When the AD platform is Vungle, get mediaView.
if (offer.networkFirmID == 13) { 
        [nativeADView getMediaView];
}

2.10 Our SDK can support interstitial ads. Will the ads disappear after the user clicks? (Keywords: turn off ads)

A: Each platform currently supports open screen, interstitial screen, rewarded video and banner ads, and does not provide an API to actively turn off ads. , so this requirement cannot be achieved.

2.11 Assume that our product application is a VPN application, and the application will proxy itself when it is started. Therefore, when pulling advertisements, they will be pulled through the proxy network. I wonder if you can provide the domain names pulled by advertisements so that we can filter out these addresses at our application layer? (Keywords: VPN, filtering domain name)

Answer: The advertising addresses loaded on each platform may change, and the corresponding domain name cannot be provided for filtering.

2.12 Load banner ads. Then after the display is removed and loaded again, it still won't come out? (Keywords: banner, banner, loading failure)

Answer: Banner ads have a special function, which is TopOn background aggregation management--automatic in advanced settings Refresh function, this function is turned on after the banner ad is displayed successfully. Developers do not need to worry about the loading problem of the banner. After the developer removes the banner, the next time it is displayed, it can directly determine whether the ad slot is ready ( isReady), you can directly obtain the creative material for display when you are ready. If you are not ready, you can manually try to load the banner ad, or you can cooperate with the background request failure and try again, so that when the loading fails, you can initiate a request again.

2.13 One scenario now is that we have a comprehensive incentive advertising space in topon, and then we have an internal advertising entrance entry, which is similar to your advertising scenario. . We now want to set the entry parameter (referring to extra) to different values during specific playback and pass it to the backend. (Keywords: incentive video, extra, server callback)

Answer: Our rules are the same as those of the three parties, which are passed in during load Extra is valid. Passing in different USERCUSTOMDATA during show is invalid. All this requirement may not be realized, and it can only be done by using multiple advertising slots.

2.14 Can we get the ID of the A/B test group before loading, so that we can load different cover ads? (Keywords: A/B grouping, group id)

Answer: There is currently no way to obtain the id of the A/B test group, so this cannot be achieved, topon this There's no way to differentiate between A/B testing's covert ad requests.

2.15 If it is a traditional waterfall placement advertisement, I should be able to get the callbacks of the corresponding platform through the callbacks of each third-party platform, which can prevent Client mock method. But what if it’s an advertisement for server bidding? Does this callback need to be connected to topon's callback? ? (Keywords: Bidding, server callback, TopOn server callback)

Answer: This bidding is the same as the ordinary incentive video server callback, which is triggered by the reward Send time. The difference is that when using TopOn, you trigger the proxy through the SDK, send a request to the server, and then the server sends the request to your address, which saves you from repeating the process of connecting to multiple platforms. However, you still need to add your own for anti-brushing. limit. The incentive callbacks of third-party platforms are the request formats returned by your server when connecting to different platforms. They match one by one. The advantage is that it has a certain degree of anti-spoofing.

3. Advertisement filling failed

3.1 Loading Mete (Facebook) ads keeps failing. What's going on? (Keywords: Meta, loading failure)

A: First confirm whether we are pressing If the docking document is still not filled with ads, you can change the test device and wait for a period of time for requests, or try switching VPN loading. You can pay attention to the reasons for loading failure; secondly, use the debug mode. The debug mode is a test advertising ID provided by Meta to the outside world, but it cannot guarantee 100% filling; finally, if you still don’t understand, you can give feedback to technical support.

// Test bid ads please set this value to improve the fill rate
[ATAPI setHeaderBiddingTestModeWithDeviceID:@"you device idfa"];

// implement ATAdLoadingDelegate agency
- (void)didFailBiddingADSourceWithPlacementID:(NSString*)placementID extra:(NSDictionary*)extra error:(NSError*)error;

3.2 Loading bidding ads (S2S and C2S) failed, and the error code 1003 was returned? (Keywords: Bidding advertising, 1003)

Answer: Bidding advertising will have one more step than normal advertising. The step of obtaining bidToken is not actually initiated at this time. Creative, at this time we can obtain the bidding status, including success, through the API containing Bidding in the agent ATAdLoadingDelegate Or the reason for the failure, so when the bidding type ad loading request fails, you can add this step to troubleshoot.

4. Abnormal ad display

4.1 After clicking on the splash ad, the ad details did not jump and the ad display page was closed. This is What's going on? (Keywords: ad jump)

Answer: Since the in-app jump of splash ads is a push method, there may be two reasons for the inability to jump. First, The current controller does not have a navigation bar controller. At this time, the developer needs to add a navigation bar. Second, after the ad is clicked, the ad display page is dismissed and removed, resulting in the details page being unable to be displayed. In this case, check the splash ad. Check whether there is an operation to remove the currently displayed controller in the close callback.

4.2 The rewarded video is loaded successfully, but the ad cannot be displayed after calling showAPI? (Keywords: unable to display, display failure)

Answer: This type of problem can be extended to other types of ads. You need to check the log printed by the console for troubleshooting. The key points for troubleshooting are: First, the display failure callback in the agent (banners and native information flows do not have it), solve the problem according to the failure prompts; Second, there is no agent or the agent does not print errors. At this time, you need to carefully find the key information in the log. You can locate the error printing information after the console information, and then solve it or feedback it to us.

💚💚 ATAdLogger(UA_6.1.88) Message:
API invocation info:
*****************************
{
    "ad_type" = xxxxx;
    api = show;
    "placement_id" = xxxxx;
    result = start;
} 

Here is an example of a common error:

// admob
Error Domaincom.google.admob Code17 "The provided view controller is already presenting another view controller." 
UserInfoNSLocalizedDescription The provided view controller is already presenting another view controller. 

// iOS
Warning: Attempt to present <UIViewController: 0x7fbcd2104220> on <ViewController: 0x7fccefd0e110> 
which is already presenting <UIViewController: 0x7fbcd2104220>
Copy

This error is probably caused by a call to present a new controller on a controller that has already been presented. The solution is to present the AD material using another controller, such as the current top controller.

//  Display advertising error
Attempt to present AdVc on VC whose view is not in the window hierarchy!
Copy

This error is a display error, warning: trying to display its view is not in the window hierarchy! This is because the rendering view controller (self) is not added as a subview controller. You can use in [UIApplication sharedApplication] keyWindow. RootViewController, rather than the self to solve the warning displayed on your vc. Another direction excluded is that the view controller's view is only created, but not added to any view hierarchy. If you want to come out of that view controller as quickly as possible, you should do it safest in viewDidAppear.

4.3 The display of the advertisement is black screen or incomplete picture, and there is no close button, may I ask why? (Key words: black screen, incomplete picture, missing picture, close button)

A: First of all, because the advertising platform may be http materials, so please check whether the Http permission is authorized; Secondly, whether the network environment is normal. If the network environment is abnormal, the material loading fails or is too slow, resulting in a black screen. The second is to get the information of the material through the capture package and feed it back to the corresponding platform, so that they can check the correctness of the material or block the advertisement.

If it is a problem such as the close button, due to the type of advertising may not appear the same time to close the button, such as incentive video, normally is displayed after watching the advertisement, at this time you can check whether the setting of the code bit (three-way advertising position) allows the close button, other advertising types have the corresponding close button Settings, please check it first. Secondly, in addition to the self-rendering information flow is self-rendered by the developer, other ads are returned by the platform. In the case of missing ads, it is necessary to confirm which advertising platform is the AD through the logo, and then obtain the address of the advertising material, which may need to capture the packet, screenshot or screen recording so as to provide the platform with the problem solving material. For example, the Pangolin platform can get the address of their material by clicking on the logo icon, and finally feed back to the advertising platform that has the problem for a solution.

4.4 The video AD that was shown didn't play and stuck. (Key words: video stuck, interface stuck)

A: Confirm the version of SDK, which advertising platform is, which SDK version of the advertising platform is, and send the relevant information to the corresponding advertising platform through screen recording. If possible, give the address of the mock material to the platform.

4.5 Get the first banner normal, close the pop-up window to request the same banner AD space again, can not get the banner AD, callback no response? (Key words: banner loading, banner)

A: 1, first confirm whether the banner advertising position is turned on the automatic refresh function, if it is turned on, then you only need to call the loaded API for the first time, and then load by the SDK internal, you can choose the solution that meets your needs.

2. Whether to set bannerView to nil when removing ads.

4.6 On the iPad, it was integrated into a banner AD, and the height was cropped. (Key words: banner, cut)

A: Because the banner ads of some platforms are limited by fixed sizes, such as Pangolin, Youmoi and Mintegral, we recommend that when configuring banner ads, choose a template with similar proportions and load and display by AD size or size ratio. For example, the configured pangolin banner AD 640*100, in order to fill the screen width, calculate the height H = (screen width *100)/640; Then the extra size of the load is (screen width: H).

4.7 Can't control the mediaView size of gromore's native self-rendered ads? (Key words: Gromore, native self-rendering)

A: to the configuration. MediaViewFrame set frame, and obtain mediaView, also want to frame to set it up.

4.8 There is a problem with the incentive video display, the horizontal advertisement appears on the portrait phone, resulting in a truncated view. (Key words: advertising view, view is intercepted)

A: This possible reason is that when loading the incentive video, the direction of the device is in the landscape state, resulting in the loaded advertisement fitting the landscape screen, and then the direction of the device returns to the portrait screen when displaying, resulting in such a phenomenon.

4.9 Rendering admob's native self-rendered ads, why are the controls different from my XIB constraints? (Key words: xib constraint, admob, native self-rendering)

A: Currently, we do not support the integration of admob's native self-rendered ads by using drag line controls such as xib. Please use the manual creation method to integrate.

4.10 Native news stream ads in Unity project, the same AD spot used twice show, why only one native AD appeared? (Key words: Unity native advertising, display anomaly)

A: The Unity project does not support displaying two or more native news streams in the same interface.

4.11 Integrated self-rendered admob native ads, showing styles that didn't match the frame we set. ? (Key words: admob native advertising, self-rendering, UI display exception)

A: Since Admob's native self-rendered ads need to be displayed with their GADNativeAdView, our SDK will carry out a conversion pass through, so when integrating with Admob's native self-rendered ads, it does not support the use of xib or storyboard system drag controls to set up self-rendered views. When rendering GADNativeAdView inside the SDK, this type of view may not get the frame, resulting in an abnormal UI position during display. Also hope that in the rendererWithConfiguration code integration way: selfRenderView: nativeADView before ensure that the frame has a value of the child controls.

Previous
Rewarded AD and Interstitial exception
Next
SKAdNetwork ID
Last modified: 2025-05-30Powered by