The inspiration for this question comes from an apparent requirement to hard-code a production org id. Is it safe to rely on the production org id always remaining the same?
Reason for hard-coding is because this is in a mobile app rather than part of the Salesforce environment.
Context: we want our app to be able to download documents successfully when logged in to Sandbox as well as Production. In order to determine the correct URL to build to use servlet.shepherd, we need the mobile app to be able to determine whether it is logged into production or not, and if it's logged into a sandbox, ideally specifically which sandbox. We are using the iOS Mobile SDK version 4.0
EDIT: for the avoidance of doubt my question is not "how else can I solve my problem", my question is exactly as specified in the title. I'm looking more to discover whether hard coding production id in a mobile app is safe, than alternatives to doing so.