Search Unity

[warning] Unity 2018.1.3f1 + Unity Ads 2.0.8 + iOS

Discussion in 'Unity Ads' started by josephsaade, Aug 24, 2018.

  1. josephsaade

    josephsaade

    Joined:
    Apr 18, 2016
    Posts:
    46
    Hello,

    I am using Unity 2018.1.3f1 + Unity Ads 2.0.8

    As I am using the editor extension, I am not calling Advertisement.Initialize
    This is done automatically I hoped as per the docs:
    https://docs.unity3d.com/2018.2/Doc.../Advertisements.Advertisement.Initialize.html
    Manually initializes the advertisement system. Normally this is done from editor, and you should only call this method if you are using UnityAds with automatic initialization disabled.

    The platforms are configured on services dashboard.

    The Ads work fine on Android, when I try on iOS, the logs show and error (in Xcode).
    the error is that the SDK is sending the Android ID instead of the iOS ID:

    Code (CSharp):
    1. message: Game Id xxxxxx provided is configured for platform android, while ads requested for platform ios...
    In order for the integration to work, I have to manually initialize the Advertisement with the correct id:

    Code (CSharp):
    1. Advertisement.Initialize(Application.platform == RuntimePlatform.IPhonePlayer ? "xxxxx" : "yyyyy");
     
  2. rasmus-unity

    rasmus-unity

    Unity Technologies

    Joined:
    Aug 15, 2014
    Posts:
    1,218
    Can you check ProjectSettings/UnityConnectSettings.asset, and verify that the following two lines has correct game id's?

    m_IosGameId:
    m_AndroidGameId:

    /Rasmus
     
  3. josephsaade

    josephsaade

    Joined:
    Apr 18, 2016
    Posts:
    46
    They do, I am not sure if it happened after I added the Initialize code, or from before.

    On another note, I have m_GameId showing the Android ID
     
  4. DenisasK

    DenisasK

    Unity Technologies

    Joined:
    Oct 13, 2016
    Posts:
    89
    Hello @josephsaade . "m_GameId showing the Android ID" this is the issue. While building the m_GameId should change to the current platform id. I was able to find a scenario how to reproduce your issue when you are building for the first time but on second attempt it works as expected. Also, are you building via UI or API?
     
  5. josephsaade

    josephsaade

    Joined:
    Apr 18, 2016
    Posts:
    46
    I am not sure what you mean with build with UI or API? Do you mean unity ads? I am using Package Control, I am building normally from Editor.
    I forced the value of m_GameId to the Apple ID and it worked, but yes it should be automatic like you said.
     
  6. DenisasK

    DenisasK

    Unity Technologies

    Joined:
    Oct 13, 2016
    Posts:
    89
    @josephsaade I have forwarded my finding to the responsible team. Can you fill out a bug report via BugReporter and post a ticket number here? Just to make sure that it is same issue.
     
  7. josephsaade

    josephsaade

    Joined:
    Apr 18, 2016
    Posts:
    46
    @DenisasK , I just did: 1074296_3jg6g5ckn0csersg
    Thank you.
     
unityunity