How can I run an iOS app in a macOS sandbox?
Solution 1:
Yes, you can attach a debugger to such an "iOS process" just like you would attach debuggers to other processes. You'll probably want to disable SIP.
There's no sandbox that works like "an original iDevice" (whatever that might be).
In pure technical terms, you are actually running the iOS app in a virtual machine already (no, it doesn't have to be full machine emulation to be a virtual machine). However, for the intent of your question, no that is not something you can do.
I suspect your actual problem is that you're trying to run an app that tries to detect jailbroken iPhones. The detection method is within the app, and so it is not the same from app to app. If you knew what detection method was being used, you could most probably circumvent that. An alternative is simply to remove the check from the app binary.