Catalina (macOS 1.15) comes with tighter security.
Tighter security can cause headaches for developers.
I’m here to help out by providing you with some handy fixes.
To allow running any program from your command line terminal:
- Open the “Security & Privacy” system preference.
- Click the “Privacy” tab.
- Scroll down to “Developer Tools”. If “Developer Tools” is missing, you need to upgrade X-Code first; see below.
Add and enable (check the box) for all the terminal programs you use.
The “Developer Tools” access permission allows the terminals to ignore the quarantine flag and most “Security Assessment” rejections.
This is the biggest cause of issues and has been since Apple started tightening security down.
Removing the quarantine flag will fix most problems.
To see the quarantine flag:
$ xattr -p com.apple.quarantine <name-of-executable> 0082;5db07289;Safari;
To remove the quarantine flag:
$ xattr -d com.apple.quarantine <name-of-executable> # OR for .app bundles $ xattr -d -r com.apple.quarantine <name-of-app>.app
It’s unlikely that a security assessment rejection can cause.
Just in case though…
To see an assessment:
$ spctl --assess <name-of-executable-or-app> <name-of-executable-or-app>: rejected
To approve the executable
$ spctl --add --label 'Approved' <name-of-executable-or-.app>
If the App Store said something about failing to update X-Code then you have to delete X-Code and then re-install it.
Apparently this triggers when upgrading from 11 to 11.1 after upgrading to Catalina.
Once deleted, the App Store will take about 30 seconds to remove it from the Updates page.
When X-Code disappears, you can re-install it and all should be well again.
If X-Code doesn’t disappear from the Updates page then you may have to use something like AppCleaner to remove the bits left over.