【问题标题】:AppDelegate setFullscreen: unrecognized selector sent to instanceAppDelegate setFullscreen:无法识别的选择器发送到实例
【发布时间】:2013-06-18 10:21:30
【问题描述】:

我试图在我的 AppDelegate 中接收 RevMobAdsDelegate 事件,并且它们被调用并出现以下运行时信号错误。

[3496:207] [RevMob myapplication App]
SetChartBoostRequestFlag - StopLoadingWait
[3496:207] [RevMob myapplication App] StopLoadingWait routine
[3496:207] [RevMob] Starting RevMobAds
[3496:207] [RevMob] Initializing Fullscreen.
[3496:207] -[AppDelegate setFullscreen:]: unrecognized selector sent to instance    0xa20b4e0
(gdb) 

我已经在我的代码中添加了 RevModAds 框架,但它仍然给我这种信号错误。加载启动横幅后应用程序崩溃。

我已经从这里安装了 RevMobads sdk http://sdk.revmob.com/ios.html#fullscreen

【问题讨论】:

    标签: iphone cocos2d-iphone


    【解决方案1】:

    你可以这样做:

      #define REVMOB_APP_ID @"50cd7e844ae728120000003f"
    
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
      {  
                [RevMobAds startSessionWithAppID:REVMOB_APP_ID];
                [self showAds];
                ..
                ..
      }
    
      -(void)showAds  //call this from game over, game pause
      {
                [[RevMobAds session] showFullscreen];
      }
    

    【讨论】:

    • 我试过了,但仍然报错:-[AppDelegate setFullscreen:]: unrecognized selector sent to instance 0xd00022.在我的代码的这一行 >> self.fullscreen = [[RevMobAds session] fullscreen];
    • 这是 RevMobAd 类,便于理解:sdk.revmob.com/api/ios/Classes/RevMobAds.html
    • 我的游戏以初始横幅开始,然后生成如下信号错误:2013-06-18 18:45:17.085 mygame[7382:207] [RevMob mygame App] SetChartBoostRequestFlag - StopLoadingWait 2013-06-18 18:45:17.092 mygame[7382:207] [RevMob mygame App] StopLoadingWait 例程 2013-06-18 18:45:17.093 AvalancheMountain[7382:207] [RevMob] 启动 RevMobAds 当前语言:自动;目前objective-c++ 2013-06-18 18:45:28.348 AvalancheMountain[7382:207] [RevMob] 初始化全屏。 2013-06-18 18:45:28.354 mygame[7382:207]-[AppDelegate setFullscreen:]:无法识别的选择器发送到实例 0xd000220
    • 请帮助:我被这个错误困扰了几天
    【解决方案2】:

    您的 AppDelegate 中有 setFullscreen: 方法吗?如果没有,你最好实现它。文档说有一个showFullscreen,这是不同的。

    【讨论】:

    • 是的,我没有任何名为 setFullscreen 的方法仍在调用该方法,这就是我的查询。我真的不明白它为什么调用该方法。
    猜你喜欢
    • 2021-11-06
    • 1970-01-01
    • 1970-01-01
    • 2019-08-28
    • 2012-07-24
    相关资源
    最近更新 更多