- Download Xcode 14.3.1 via this link (you need to be signed in with your Apple Id) and install it
- Edit
Xcode.app/Contents/Info.plist
and change the Minimum System Version to12
- (Optional) Do the same for
Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/Info.plist
(might require a restart of Xcode and/or Mac OS to make it open the simulator on run) - (Optional) Replace
Xcode.app/Contents/Developer/usr/bin/xcodebuild
with the one from 14.2 (or another version you have currently installed, such as 14.0). - (Optional) Execute
sudo xattr -cr /Applications/Xcode.app
if Error "Xcode is corrupted and cannot be opened" - If there are problems with the simulator, reboot your Mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ $(arch) == 'arm64' ]]; then | |
export DOCKER_DEFAULT_PLATFORM=linux/amd64 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
do shell script "command" user name "username" password "pass" with administrator privileges |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -n operator: check if var is not empty | |
VAR="test" | |
if [ -n "$VAR" ]; then | |
echo "$VAR is not empty" | |
fi | |
# -z operator: check if var is empty | |
VAR="" | |
if [ -z "$VAR" ]; then | |
echo "$VAR is empty" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The script receives the limit as an argument. | |
limit=$1 | |
number_of_files=$(ls ./files | wc -l) | |
if [ $number_of_files -gt $limit ] | |
then | |
# There are more files than the limit | |
# So we need to remove the older ones. | |
cd files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wrappedProgram "$@" | |
# ^^^ this is correct and will hand over all arguments in the way | |
# we received them, i. e. as several arguments, each of them | |
# containing all the spaces and other uglinesses they have. | |
wrappedProgram "$*" | |
# ^^^ this will hand over exactly one argument, containing all | |
# original arguments, separated by single spaces. | |
wrappedProgram $* | |
# ^^^ this will join all arguments by single spaces as well and | |
# will then split the string as the shell does on the command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for var in "$@"; do | |
echo "$var" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
su -c '/home/annie/annie-script.sh' annie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ioreg -l | grep EDID |
- Go to "Keychain Access"
- Double click the Private Key under the certificate use to code sign your App
- Add "Xcode" to "Always allows these applications:" under the "Access Control" section list.