How is Production vs. Non-Production maintained in Xcode?

I always hear about Production vs. Non-Production and how you don’t want to work on the latter when testing (once the app is live). How is this maintained/managed in Xcode? As far as I know, there’s only one codebase I ever work on.

if you edit your schema you will see the option to run the app as “debug” mode (non production) or “release” mode (production)… it generally works the same but some functionalities like in-app purchases and other capabilities might be worth running on “release” mode to check if it works properly

You only ever work on a single code base.

Production vs non-production would be first creating an archive for your app and publishing that on the App Store (via App Store connect)

Non-prod would be like running the app on your personal device.

There’s new APIs you can use to test in app purchases in your app, you can also upload a build to TestFlight for beta testing to test it in a more production like environment (before fully deploying it)

Do you have a specific question with prod vs not?