Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Yield while waiting to conect to itunes

Discussion in 'iOS and tvOS' started by renman3000, May 22, 2014.

  1. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,680
    I am connecting to the iTunes Store, and am wondering how I can get a yield to return null while connecting? Meaning, play some animation while the user waits. I am using Store Kit viaPrime 31 if that makes any difference.

    Thanks.
     
  2. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    What do you mean by connecting? Doing a purchase operation?
     
  3. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,680
    Yes.
    I have noticed recently there is a delay of up to ten seconds from btn pressed to a reaction from iTunes. In this case, the reaction is asking the user to log in. How can I detect while I wait and when it is "iTunes ready"?
     
  4. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    Look at the example code with the plugin. It shows how to set the appropriate success/fail/cancel events. Once you have started the purchase operation you need to wait for these events and act accordingly.
     
  5. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,680
    Ok, I just realized I have returns for failed, canceled, succesful.... etc.
    Thanks