gpt4 book ai didi

objective-c - 将 Applovin 集成到 Cocos2d-x iOS 应用程序

转载 作者:行者123 更新时间:2023-12-03 17:03:28 24 4
gpt4 key购买 nike

我想将 Applovin SDK 集成到我的 Cocos2d-x iOS 应用程序中,但委托(delegate)不起作用。

[ALInterstitialAd shared].adDisplayDelegate = self;  << Error: Use of undeclared identifier 'self'
[ALInterstitialAd showOver:[[UIApplication sharedApplication] keyWindow]];

或者

objClass *obj1 = [objClass alloc];
[ALInterstitialAd shared].adDisplayDelegate = obj1; << Error: assigning 'id<ALAdDisplayDelegate>' from incompatibile type "objClass *"

或者

init: objClass* obj1 = [[objClass alloc] init];
[ALInterstitialAd shared].adDisplayDelegate = obj1; << Error: assigning 'id<ALAdDisplayDelegate>' from incompatibile type "objClass *"

如何解决这个问题?我想捕获那些监听器事件。

最佳答案

我刚刚解决了这个问题,但我正在 Xcode 中使用纯 Object-C。在添加委托(delegate)方法之前,我遇到了错误:ALAdDisplayDelegate、ALAdLoadDelegate、ALAdUpdateObserver、ALAdVideoPlaybackDelegate

.h

#import "ALInterstitialAd.h"

@interface VSGalleryViewController : UIViewController <UICollectionViewDataSource, UICollectionViewDelegate, ALAdDisplayDelegate, ALAdLoadDelegate, ALAdUpdateObserver, ALAdVideoPlaybackDelegate>

希望对你有帮助

关于objective-c - 将 Applovin 集成到 Cocos2d-x iOS 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19136186/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com