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

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.

this might do the trick

though it is for debugger, so you need to run from xcode

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.

oh. Thanks. I’ll try that.