Cocos Helper Error

  • DJEclipse
    Likes 0

    Problem Description

    Hi I followed the instructions in the Cocos Helper videos to set up admob for one of my projects, but for some reason I get the error: 

    Undefined symbols for architecture x86_64:

      "SonarCocosHelper::IOS::Setup()", referenced from:

          HelloWorld::init() in HelloWorldScene.o

     

    I imported the correct frameworks and everything. I’m not sure why it doesn’t work.

  • DJEclipse
    Likes 0

    It appears that I fixed it by taking the files in “SonarCocosHelperCPP” out of the folder and putting them directly into the classes folder. I guess the computer wasn’t linking the code in the folder? I’m not sure what happened.


    This reply has been verified.
  • DJEclipse
    Likes 0

    The ads now appear, but for some reason real ads are being showed instead of test ads. What’s going on? I don’t want my Admob account to be banned because of this.


    This reply has been verified.
  • Sonar Systems admin
    Likes 0

    Have you added the test device ID into the SCHSettings.h file?


    This reply has been verified.
  • DJEclipse
    Likes 0

    Yea I have this line of code inside the SCHSettings.h file.

    #define SCH_AD_MOB_TEST_DEVICE @"kGADSimulatorID"


    This reply has been verified.
  • Sonar Systems admin
    Likes 0

    Are you using the simulator?

  • DJEclipse
    Likes 0

    Yes I am using the simulator. I can try doing it again, but I don’t know what I could have possibly done wrong. Since it’s loading ads I’m assuming I set everything up correctly. It’s just that’s #define SCH_AD_MOB_TEST_DEVICE @"kGADSimulatorID" not working. Could you try it and see if this problem is just related to me? I used the newest version of Cocos Helper.

  • Sonar Systems admin
    Likes 0

    Try leaving #define SCH_AD_MOB_TEST_DEVICE @"" empty

  • DJEclipse
    Likes 0

    That didn’t work either. Do I need to update the Admob sdk?

  • Sonar Systems admin
    Likes 0

    Try the latest admob sdk

  • DJEclipse
    Likes 0

    That didn’t work either. Is anyone else experiencing this problem?

  • Sonar Systems admin
    Likes 0

    Have you followed the video for setting it up?

  • DJEclipse
    Likes 0

    I believe I did everything correctly. I will go back and try doing everything from scratch again and will post again with the results.

  • Sonar Systems admin
    Likes 0

    OK, keep us informed and good luck

  • DJEclipse
    Likes 0

    Hey, sorry I haven’t posted in a while. I’ve been busy with other things, but I just recently revisited this problem. I tried setting up a brand new project, but it still doesn’t work for some reason. I tried running test ads on Android and that worked, but when I try running test ads on iOS simulator it still shows real ads. I used the kGADSimulatorID thing for the test devices, but it just won’t work. Is Cocos Helper not saying that the ads should be test ads in its requests?

  • Sonar Systems admin
    Likes 0

    What do you mean by this  Is Cocos Helper not saying that the ads should be test ads in its requests?

Login to reply