Search Unity

IAD apple doesnt work

Discussion in 'iOS and tvOS' started by fdsfsdf, Aug 28, 2013.

  1. fdsfsdf

    fdsfsdf

    Joined:
    Apr 23, 2013
    Posts:
    5
  2. cirepa

    cirepa

    Joined:
    Aug 30, 2013
    Posts:
    3
  3. fdsfsdf

    fdsfsdf

    Joined:
    Apr 23, 2013
    Posts:
    5
    I tried to code by xcode but same result , so i hope this problem from apple. I read news from apple but have nothing to say about that.
     
    Last edited: Aug 30, 2013
  4. fraques

    fraques

    Joined:
    Aug 9, 2012
    Posts:
    8
    First, where is the problem? Is it in your code? Is it due to weak internet connection? It can be for any number of reasons, so let's pinpoint the problem. There is nothing like some logs to help you out. For example, you could change the ShowBanner function to something like

    Code (csharp):
    1.  
    2. function ShowBanner()
    3. {
    4.     while (!banner.loaded  banner.error == null)
    5.     {
    6.         Debug.Log("Still loading...");
    7.         yield;
    8.     }
    9.  
    10.     if (banner.error == null)
    11.     {
    12.         Debug.Log("Finished loading");
    13.         banner.Show();
    14.         Debug.Log("Ok, iAd should be visible now");
    15.     }
    16.  
    17.     else
    18.     {
    19.         Debug.Log("We got an error:");
    20.         Debug.Log(banner.error.description);   
    21.         banner = null;
    22.     }
    23. }
    24.  
    When you run the code with these logs, you will know:
    - if the banner is loading
    - if it finishes loading and calls banner.Show()
    - if there is an error and it's the description

    I hope it helps!
     
  5. fdsfsdf

    fdsfsdf

    Joined:
    Apr 23, 2013
    Posts:
    5


    I checked your problems which you guess .First time , the iad code worked , it just dont work few day ago and i dont change anything about that code. About weak internet connection i tried to another place but same result.


    I used your function and this is result :

    We got an error:
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:Log(Object)
    $:MoveNext()

    (Filename: /Applications/buildAgent/work/cac08d8a5e25d4cb/Runtime/ExportGenerated/iPhoneSimulatorPlayerUnityLib/UnityEngineDebug.cpp Line: 54)

    The operation couldn’t be completed. Ad inventory unavailable
    UnityEngine.Debug:Internal_Log(Int32, String, Object)
    UnityEngine.Debug:Log(Object)
    $:MoveNext()


    Anyway i am glad for your help. Thank you !