I would like to inquire about a concern related to the app review process. Specifically, I would like to understand if forcefully denying an application's execution on the iOS Simulator (for instance, by implementing a check in the code that prevents the app from running in a simulated environment) could negatively impact or delay the app’s approval during the App Store review process.
This measure is intended solely for security and integrity reasons during development and distribution. The app functions normally on real devices, and all other guidelines and requirements outlined by Apple are being strictly followed.
Could you please confirm whether such a restriction on the Simulator is acceptable, and if there are any best practices or recommendations from Apple regarding this?
Thank you for your support, and I look forward to your guidance.
iOS and the iOS Simulator are different platforms [1]. Given that, it’s impossible to build an app for the simulator and upload it to App Store Connect. And that means you can sidestep this issue completely by conditionally compiling this code so that it’s only in the simulator build. In Swift you do that like this:
#if targetEnvironment(simulator)
… your simulator code here …
#endif
That ensures that the code is only present in the simulator build, so it can’t possibly affect your app’s behaviour during App Review.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
[1] Even though they use the same CPU architecture. I talk more about this distinction in An Apple Library Primer.