开屏广告
Last updated
63a57390cf26cfunc requestAppOpenAd() {
//userId
Adx3FullScreenAd.sharedManager().load(withPlacementID: "Your Placement ID", userId: "", delegate: self)
}- (void)requestAppOpenAd {
//userId Optional
[[Adx3FullScreenAd sharedManager] loadAdWithPlacementID:@"Your Placement ID" userId:@"" delegate:self];
}func didFinishLoadingAD(withPlacementID placementID: String!) {
print("----\(placementID!)----")
}
func didFailToLoadAD(withPlacementID placementID: String!, error: Error!) {
print("----\(error.debugDescription)----")
}- (void)didFinishLoadingADWithPlacementID:(NSString *)placementID {
NSLog(@"----%@----", placementID);
}
- (void)didFailToLoadADWithPlacementID:(NSString *)placementID error:(NSError *)error {
NSLog(@"----%@----", error.description);
}func tryToPresentAd() {
if Adx3FullScreenAd.sharedManager().fullScreenIsReady() {
Adx3FullScreenAd.sharedManager().showScreenView(withContrller: self, delegate: self) { isSuccess in
};
}else {
self.requestAppOpenAd()
}
}- (void)tryToPresentAd {
if ([[Adx3FullScreenAd sharedManager] fullScreenIsReady]) {
UIViewController *rootController = self.window.rootViewController;
[[Adx3FullScreenAd sharedManager] showScreenViewWithContrller:rootController delegate:self success:^(BOOL isSuccess) {
];
}else {
// If no ad is available, make a new request
[self requestAppOpenAd];
}
}func fullScreenDidStartPlayingVideo(forPlacementID placementID: String!, extra: [AnyHashable : Any]!) {
}
func fullScreenDidEndPlayingVideo(forPlacementID placementID: String!, extra: [AnyHashable : Any]!) {
}
func fullScreenDidFailToPlayVideo(forPlacementID placementID: String!, error: Error!, extra: [AnyHashable : Any]!) {
}
func fullScreenDidClose(forPlacementID placementID: String!, extra: [AnyHashable : Any]!) {
}
func fullScreenDidClick(forPlacementID placementID: String!, extra: [AnyHashable : Any]!) {
}-(void)fullScreenDidStartPlayingVideoForPlacementID:(NSString*)placementID extra:(NSDictionary*)extra {
}
-(void)fullScreenDidEndPlayingVideoForPlacementID:(NSString*)placementID extra:(NSDictionary*)extra {
}
-(void)fullScreenDidFailToPlayVideoForPlacementID:(NSString*)placementID error:(NSError*)error extra:(NSDictionary*)extra {
}
-(void)fullScreenDidCloseForPlacementID:(NSString*)placementID extra:(NSDictionary*)extra {
}
-(void)fullScreenDidClickForPlacementID:(NSString*)placementID extra:(NSDictionary*)extra {
}