My computer setup is I work from an account with regular (non-admin) privileges. I login into the admin account to install apps, update the OS, that kind of stuff, but work is from the reduced privileges account.
And, when in it, I cannot preview swiftUI views in Xcode. Incredibly frustrating, have tried everything including a complete wipeout of the disk and reinstall, but no luck.
Don't have any iOS simulator targets installed, it's macOS target I am working on. If I fire up xcode from the admin account it's all good, previes work and so on. Not so in the non-admin account, consistenly getting the "Cannot preview in this file. Failed to launch xxxx"
Also tried elevating the privileges of the account to Admin, rebooting, no luck. Tried creating a new account, non-admin or admin, no luck.
The detailed error repeats something along the lines of:
== PREVIEW UPDATE ERROR:
GroupRecordingError
Error encountered during update group #3
==================================
| FailedToLaunchAppError: Failed to launch GIIK.Mesh-One
|
| /Volumes/Glyph 2TB/Developer/M4Book/Mesh One/DerivedData/Mesh One/Build/Products/Debug/Mesh One.app
|
| ==================================
|
| | [Remote] JITError
| |
| | ==================================
| |
| | | [Remote] XOJITError
| | |
| | | XOJITError: Could not create code file directory for session: Permission denied
Most telling is the double space between directory and for on the last error line, it sounds like a failed string interpolation because the directory name was nil or empty?
This is very frustrating (I also filed FB21900410). Am I missing something obvious? I also dumped the build settings and diffed the admin and non-admin accounts and they are an exact match (save for the path names).
There has to be something that's preventing the non-admin accounts from previewing, anyone know what it might be/where to look?
Cheers,