Skip to content

Instantly share code, notes, and snippets.

@spookyd
Last active June 28, 2019 17:57
Show Gist options
  • Select an option

  • Save spookyd/e57461b64653e869231bf1825459d3e5 to your computer and use it in GitHub Desktop.

Select an option

Save spookyd/e57461b64653e869231bf1825459d3e5 to your computer and use it in GitHub Desktop.
A collection of hidden gems found in Apple's private libraries

Apple's Hidden Commands


How to find the commands

Based on the stackexchange answer the following commands can be used to discover hidden functionality.

Simulator Functionality: strings /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator | grep -E '^[A-Z][[:alpha:]]+$'

To filter and sort apply to the end | grep -E '(Enable|Disable|Show|Number)' | sort

Full: strings /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator | grep -E '^[A-Z][[:alpha:]]+$' | grep -E '(Enable|Disable|Show|Number)' | sort

Xcode Functionality:

strings /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/IDEKit | grep -E '^IDE[[:alpha:]]+$'

How to find prefixes

How to use the commands

In terminal run the command

defaults write <PREFIX> <STRINGS_KEY> <VALUE_TO_WRITE>

where

PREFIX is the prefix used by Apple; like com.apple.dt.xcode or com.apple.iphonesimulator

STRINGS_KEY is the key out put from the strings command above

VALUE_TO_WRITE is the value to be used; example 1, false, etc.

Example: defaults write com.apple.iphonesimulator ShowSingleTouches 1

NOTE: These are private apis so do not rely on them to always be there

Known Commmands

MacOS 10.14.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment