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

How to determine if app is running sandboxed or not on IOS

Discussion in 'iOS and tvOS' started by arkon, Nov 23, 2014.

  1. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    I have an app that on the device needs to know if it is in apple sandbox mode or a released version from the store.

    Currently I set a bool in the code but sometimes I forget to set it to not sandboxed when I release it to ITC.
    I'd like to make this check automatic on the device, any ideas?

    Just to clarify it's for when I send the base64encoded receipt to apple for a decoded receipt, I need to send it to one of 2 different apple URL's depending on wether the app is in sandbox (still in development) or released to the public and for sale.
     
  2. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,600
  3. Zenix

    Zenix

    Joined:
    Nov 9, 2009
    Posts:
    213
    The correct procedure is to send the receipt to Apple's live server and check the response. If the the response code indicates that you sent a sandbox receipt to the live server, you should then resend the receipt to the sandbox server.
     
  4. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    oh. Thanks. I'll try that.