Question

I was following this guide to open a Mac app from an unidentified developer.

So I open Terminal and enter the following code to get the Anywhere option

sudo spctl --master-disable

This leads to the following output

objc[7234]: Class SPExecutionPolicy is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[7234]: Class AppWrapper is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[7234]: Class AppWrapperPolicyResult is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[7234]: Class AppWrapperPolicy is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[7234]: Class SPLog is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[7234]: Class MIS is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[7234]: Class SPExecutionHistoryItem is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[7234]: Class SPExecutionPolicyItem is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[7234]: Class SPDeveloperPolicy is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.
objc[7234]: Class GKScanResult is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy and /usr/sbin/spctl. One of the two will be used. Which one is undefined.

but doesn't seem to enable the option in System Preferences.

Screenshot of System Preferences, Anywhere Option hidden

So how can I enable "Allow apps downloaded from Anywhere" via Terminal? Using macOS Big Sur Ver 11.1

Was it helpful?

Solution

If you download an application from the internet, then the following steps can be taken to open the application. Here the Startup application is used as an example.

I downloaded the Startup application from the SourceForge project Startup for rEFInd. Here is my Downloads folder.

Note: In Finder preferences, I have Show all filename extensions checked off.

When I double clicked on Startup.app, I received the following popup.

I selected the Cancel button. Next, I opened the Security & Privacy pane of the System Preferences application, as shown below.

Here, I selected Open Anyway and the the following popup occurred.

Here, I selected Open and the application opened.

The above steps only had to be done once. Afterwards, the application could be opened by simply double clicking on the icon.

Note: The above steps did not remove the com.apple.quarantine extended attribute placed on any files or folders.

How to Avoid the Above Steps

When a file is downloaded, the extended attribute named com.apple.quarantine is placed on the file. This is what initially kept the Startup the application from opening. The following steps can be taken to remove the com.apple.quarantine extended attribute from the application.

If you want to test these steps, then you will probably what to put any existing Startup application in the trash, and download a new copy of the application.

Right click the application in the Finder window and select New Terminal at Folder, as shown below.

This will open a Terminal application window, as shown below.

Enter the following command, as shown in the image below.

xattr -rd com.apple.quarantine .

Next, close the Terminal application window. Now you can open the application normally.

OTHER TIPS

You don’t fix the output. Apple shipped both classes so Apple has to patch the libraries that spctl links against to “fix” that log message.

It doesn’t harm any function I can test, so it’s highly likely it has no bearing to your running of spctl. Your main problem is likely that you didn’t boot to recovery and use terminal app to change the security.

You can’t enable or disable from the OS that’s running. (Think of a surgeon, they can operate on another person, not themselves for safety sake.)

Recovery is a different OS that can change entitlements on your daily driver OS when it’s not running. (Or don’t do maintenance on your car/bike/airplane while it’s moving.)

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top