Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Xcode and Playground use different runtime environments. Playground has a more permissive security model that allows it to access the macOS input devices, while Xcode has a more restricted security model that prevents direct access to input devices by default to ensure the security and privacy of the user's data. To enable access to input devices in Xcode, you need to add the appropriate entitlements to your app's code signing options.