Troubleshooting
An error code appears
If a BuzzAd SDK for iOS method fails, NSError is passed to the onFailure callback. Use the error code table below to identify and resolve the issue.
| Error code | Cause | Resolution |
|---|---|---|
BZVServerError | An error occurred on the Buzzvil server. | Send the error code to your Buzzvil representative. |
BZVInvalidRequest | The request did not meet the requirements. (For example, an ad was requested before the user logged in.) | Check that the request arguments contain valid values. |
BZVRequestTimeout | The network request timed out. | Check the network connection. |
BZVEmptyResponse | The network response is empty. (For example, an ad request succeeded but returned zero ads.) | Send the error code to your Buzzvil representative. |
BZVWaitingForResponse | May occur if you request another Feed preload while a preload request is already in progress. Ads are still loaded normally even when this error occurs. | Check for duplicate preload requests. |
BZVNetworkDisconnected | The network connection is unstable. | Check the network connection. |
BZVAgeUnsatisfied | The user is younger than the minimum age allowed to receive ads under the platform policy. | Set the age to 15 or older during login. |
BZVPrivacyPolicyDisagreed | The user has not agreed to the privacy policy. | Check that the user agreed to the privacy policy before requesting ads. |
BZVUnknownError | An unidentified error occurred. | Check for errors in the SDK integration and app build. |
The following example handles errors when requesting native ads.
let nativeAdRequest = BZVNativeAdRequest()
let buzzAdNative = BZVBuzzAdNative(unitId: "YOUR_NATIVE_UNIT_ID")
buzzAdNative.loadAd(with: nativeAdRequest) { nativeAd in
// 할당된 광고가 있으면 호출됩니다.
} onFailure: { error in
if let rawError = error as? BZVError {
switch rawError.code {
case .serverError:
print("server error")
case .invalidRequest:
print("invalid request")
case .requestTimeout:
print("request timeout")
case .emptyResponse:
print("empty response")
case .unkwounError:
print("unknown error")
default:
break
}
} else {
// BZVErrorDomain에 속하지 않는 오류를 처리합니다.
}
}
BZVNativeAdRequest *adRequest = [[BZVNativeAdRequest alloc] init];
BZVBuzzAdNative *buzzAdNative = [BZVBuzzAdNative nativeWithUnitId:@"YOUR_NATIVE_UNIT_ID""];
[buzzAdNative loadAdWithAdRequest:adRequest onSuccess:^(BZVNativeAd * _Nonnull nativeAd) {
// 할당된 광고가 있으면 호출됩니다.
} onFailure:^(NSError * _Nonnull error) {
if ([error.domain isEqualToString:BZVErrorDomain]) {
switch (error.code) {
case BZVServerError:
NSLog(@"server error");
break;
case BZVInvalidRequest:
NSLog(@"invalid request");
break;
case BZVRequestTimeout:
NSLog(@"request timeout");
break;
case BZVEmptyResponse:
NSLog(@"empty response");
break;
case BZVUnkwounError:
default:
NSLog(@"unknown error");
break;
}
} else {
// BZVErrorDomain에 속하지 않는 오류를 처리합니다.
}
}];
The app crashes on iOS 10 or earlier
-
Cause: BuzzAd SDK for iOS runs on iOS 11 and later. Calling the SDK on an earlier version may crash the app.
-
Solution: If your app supports versions earlier than iOS 11, call the SDK only on iOS 11 and later. See Run the SDK only on iOS 11 and later.
Feed ad text is invisible in dark mode
- Cause: The app's dark mode makes the text in Feed ad views invisible.
- Solution: Follow Implement your own standard ad design. Set the colors of text views, such as
titleLabelanddescriptionLabel, to contrast with the background and remain readable in dark mode.