Wie Daniel Storm sagte, machen Werbebanner auf einem Fernseher keinen Sinn. Aber wenn Sie darauf bestehen, können Sie Ihre eigenen Banner natively erstellen.
Zum Beispiel in Ihrem View-Controller:
@interface ALDemoNativeAdProgrammaticViewController()<ALNativeAdLoadDelegate, ALNativeAdPrecacheDelegate, ALPostbackDelegate>
@property (nonatomic, strong) ALNativeAd *nativeAd;
@end
- (void)viewDidLoad
{
[super viewDidLoad];
[[ALSdk shared].nativeAdService loadNativeAdGroupOfCount: 1 andNotify: self];
}
#pragma mark - Native Ad Load Delegate
- (void)nativeAdService:(nonnull ALNativeAdService *)service didLoadAds:(nonnull NSArray *)ads
{
// At this point, the native ad is loaded, but assets not retrieved yet.
self.nativeAd = [ads firstObject];
// You can use AppLovin's pre-caching to retrieve assets (app icon, ad image, ad video) locally. OR you can do it with your preferred caching framework.
// iconURL, imageURL, videoURL needs to be retrieved manually before you can render them. For our example, we'll use AppLovin's caching framework.
[[ALSdk shared].nativeAdService precacheResourcesForNativeAd: self.nativeAd andNotify: self];
}
- (void)nativeAdService:(nonnull ALNativeAdService *)service didFailToLoadAdsWithError:(NSInteger)code
{
// Handle error
}
#pragma mark - Native Ad Precache Delegate
- (void)nativeAdService:(nonnull ALNativeAdService *)service didPrecacheImagesForAd:(nonnull ALNativeAd *)ad { }
- (void)nativeAdService:(nonnull ALNativeAdService *)service didPrecacheVideoForAd:(nonnull ALNativeAd *)ad
{
// This delegate method will get called whether an ad actually has a video to precache or not
//
// FINALLY, perform whatever view logic you want with the assets provided in your ALNativeAd property, and show the ad.
}
- (void)nativeAdService:(nonnull ALNativeAdService *)service didFailToPrecacheImagesForAd:(nonnull ALNativeAd *)ad withError:(NSInteger)errorCode
{
// Handle error
}
- (void)nativeAdService:(nonnull ALNativeAdService *)service didFailToPrecacheVideoForAd:(nonnull ALNativeAd *)ad withError:(NSInteger)errorCode
{
// Handle error
}
Beachten Sie, dass AppLovin der Rückrufe werden nicht guanranteed zu auf der Haupt Warteschlange aufgerufen werden.
Es ist auch in Ihrer Verantwortung
Ihre eigene Eindrücke zu verfolgen
[[ALSdk shared].postbackService dispatchPostbackAsync: ad.impressionTrackingURL andNotify: self];
und starten Sie den Store App, wenn
[self.nativeAd launchClickTarget];
geklickt Sie sollten Code bereitstellen und anderen Hilfen – TommyBs