henrique-eguchi / mac

Basic list of instructions to make setting up an Apple computer for development

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

macOs Setup

My basic list of instructions to make setting up an Apple computer for iOS development (based on Tania Rascia setup)

System Preferences

  • Trackpad > Point & Click > Tap to click > On
  • Keyboard > Text > Disable "Correct spelling automatically".
  • Security and Privacy > Firewall > On
  • Security and Privacy > General > App Store and identified developers
  • Sharing > File Sharing > Off
  • Users & Groups > Login Items > Spectacle / AlDente

Finder

Show Library folder

chflags nohidden ~/Library

Show hidden files

This can also be done by pressing command + shift + ..

defaults write com.apple.finder AppleShowAllFiles YES

Show path bar

defaults write com.apple.finder ShowPathbar -bool true

Show status bar

defaults write com.apple.finder ShowStatusBar -bool true

Homebrew

For managing operating system libraries.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Mac App Store (command-line)

brew install mas

Sign in

mas signin email@email.com

Brewfile

touch Brewfile
tap 'caskroom/cask'

brew 'git'

cask 'google-chrome'
cask 'spectacle'
cask 'visual-studio-code'

mas 'Slack', id: 803453959
mas 'Xcode', id: 497799835

## Applications that are not installable by cask
# AlDente
# Notion
# OneDrive
# Office
# Proxyman
# Spotify
brew bundle

Xcode configurations (optional)

Track build time in Xcode

defaults write com.apple.dt.Xcode ShowBuildOperationDuration -bool YES

Improve your Swift project build time

defaults write com.apple.dt.Xcode BuildSystemScheduleInherentlyParallelCommandsExclusively -bool NO

Use Simulator in full-screen mode with Xcode

defaults write com.apple.iphonesimulator AllowFullscreenMode -bool YES

Enable more secret features in Simulator using Apple hidden Internals menu

Create an empty folder with name “AppleInternal” in the root directory. Just run this command below and restart Simulator

sudo mkdir /AppleInternal

Capture iOS Simulator video

xcrun simctl io booted recordVideo <filename>.<file extension>

Press control + c to stop recording the video. The default location for the created file is the current directory

Use your fingerprint to sudo

Edit /etc/pam.d/sudo and add the following line to the top

auth sufficient pam_tid.so

Remove unavailable simulators from Xcode

xcrun simctl delete unavailable

GitHub

Config - ~/.gitconfig

[user]
	name = First Last
	email = email@email.com
[github]
	user = username
[alias]
	a = add
	ca = commit -a
	cam = commit -am
	s = status
	pom = push origin master
	pog = push origin gh-pages
	puom = pull origin master
	puog = pull origin gh-pages
	cob = checkout -b
[credential]
	helper = osxkeychain

SSH

Config - ~./ssh/config

Host example
    HostName example.com
    User example-user
    IdentityFile key.pem

Generate SSH key

ssh-keygen -t rsa -b 4096 -C "email@email.com"

Bash

Config - ~/.bash_profile

touch ~/.bash_profile; nano ~/.bash_profile

PS1='$(networksetup -getcomputername):\W \u\$ '

alias brewup='brew update; brew upgrade; brew prune; brew cleanup; brew doctor'
export EDITOR="code -w"
source ~/.bash_profile

Terminal Colors

export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
parse_git_branch() {
  git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\$(parse_git_branch)\[\033[m\]\$ "

About

Basic list of instructions to make setting up an Apple computer for development