Small knowledge, big challenge! This article is participating in the creation activity of “Essential Tips for Programmers”.

The introduction

The annual iOS API adaptation is in place. Starting September 14, App Store Connect opened up iOS 15 and iPadOS 15 App submissions, and Apple announced that starting in April 2022, All iOS and iPadOS apps submitted to the App Store must be built using Xcode 13 and the iOS 15 SDK.

The official version of Xcode 13 includes iOS 15, iPadOS 15, tvOS 15, watchOS 8, and the macOS Big Sur 11.3 SDK. Xcode 13 must run on macOS 11.3 or later and supports iOS 9, tvOS 9, watchOS 2 or later.

Vim is also officially supported.

Xcode 13 Release Notes: developer.apple.com/documentati…

It is based on the recent iOS15 out, need to upgrade IDE for adaptation. Found disk space is insufficient, even the operating system can not upgrade.

The current Mac disk space is 121GB, you need to replace it with at least 256GB.

To see the importance of cleaning the Mac, I would like to share some knowledge about backup and cleaning when changing the Mac.

It’s good practice to always back up important configuration and files, especially if your Mac’s configuration can’t keep up with development requirements.

I, the backup

1.1 Backup Software/Tools

  • alfredapp

www.alfredapp.com/help/

  • charlesproxy

www.charlesproxy.com 4.2

  • Oh-my-zsh:github.com/ohmyzsh/ohm…

  • SmartPush

1.2 Backup Configuration

  • ~/Library/Developer/Xcode/UserData/CodeSnippets

Download.csdn.net/download/u0…

  • ~/.ssh/config

  • ~/.bash_profile

# additional WeChat
alias wx='nohup /Applications/WeChat.app/Contents/MacOS/WeChat > /dev/null &'

Copy the code

1.3 Backup Codes/Common Scripts

  • ~/bin

1.4 Backing up Common Browser extensions or Websites

It is recommended to log in to Google account and select sync data (extension, bookmark).

  • CSDN plug-in comes with advertising shielding, can be customized to add personal common sites (remember manual backup).

  • Axure RP Extension for Chrome

  • Markdown Nice (Markdown editor that supports custom styles)

  • New bang small assistant (to provide advertising order realization and operation tool services for public account operators)

  • lanhuapp.com/xd

  • mp.weixin.qq.com

  • Git.weixin.qq.com/users/autho…

II, clear

2.1 Clearing personal information

  • Exit the appID
  • Clear passwords remembered by the browser

  • Clean up browser extensions
  • Clean up social apps (including corporate wechat)

2.2 Clearing debugging files generated by Xcode

When you install Xcode, your company Mac often tells you “There is not enough disk space available, so you cannot install the product. “, so write it down.

If upgrading Xcode from the AppStore fails, Xcode can be downloaded via the URL

Xcode12:https://download.developer.apple.com/Developer_Tools/Xcode_12/Xcode_12.xip

11 Modify THE URL parameters

https://download.developer.apple.com/Developer_Tools/Xcode_11/Xcode_11.xip

https://download.developer.apple.com/Developer_Tools/Xcode_10/Xcode_10.xip

Copy the code
  • Clean up scripts
#! /bin/sh
# The ~/Library/Developer/Xcode/iOS DeviceSupport folder is basically only needed to symbolicate crash logs.
# You could completely purge the entire folder. Of course the next time you connect one of your devices, Xcode would redownload the symbol data from the device.
# I clean out that folder once a year or so by deleting folders for versions of iOS I no longer support or expect to ever have to symbolicate a crash log for.
killall -9 Xcode
killall -9 com.apple.CoreSimulator.CoreSimulatorService

rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/*
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Developer/Xcode/Archives/*
rm -rf ~/Library/Developer/Xcode/Products/*

rm -rf ~/Library/Developer/CoreSimulator/Devices/*

killall -9 com.apple.CoreSimulator.CoreSimulatorService
killall -9 Xcode
rm -rf ~/.Trash/
exit 0%      

Copy the code

2.3 Clearing cache

open ~/Library/Caches

Copy the code

2.4 close TimeMachine

3.4 Disk Space Management

On my Mac, for example, the only things the Mac system can clean up are documents and applications, not the system or anything else that occupies 87GB.

III. Installation of common tools

  1. Install Homebrew: / bin/ZSH – c “$(curl – fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)”

  2. Install the ZSH

Brew Install ZSH Install ZSH

	git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
	cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

# <! -- Change the theme -->
	open ~/.zshrc 
# modify 'ZSH_THEME= "robbyrussell", the theme is under ~/. Oh-my-zsh /themes.

Copy the code

References bash’s configuration source ~/.bash_profile in ~/.zshrc

To configure bash, use ~/.bash_profile; To configure ZSH, run the open ~/.zshrc command

  1. Brew install autojump

Autojump is a command line tool that uses shortcut commands tojump directly to a configured directory, regardless of where you are, depending on ZSH. J -a Shortcut command you define ‘directory location to jump to’

Using vim ~ /. ZSHRC

Git autojump =(git autojump)

B. a new line, add: [[-s (the brew — prefix)/etc/profile. D/autojump. Sh]] &&. (the brew — prefix)/etc/profile. D/autojump. Sh

C. :wq Save the configuration and exit and restart the terminal.

plugins=(
  git autojump
)

[[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh
Copy the code
  1. Install cocoapods:sudo gem install cocoapods

IV. Common Configurations

Show/hide files

alias fs='defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder'
alias fh='defaults write com.apple.finder AppleShowAllFiles -boolean false ; killall Finder'

Copy the code

Git config –global –edit

see also

Connection-github -with-ssh Password-free SSH connection

GitHub SSH keys is also applicable to gitlab

The original link: blog.csdn.net/z929118967/…

— — — — — — — —

Copyright notice: This article is an original article BY CSDN blogger “iOS Reverse”. It follows CC 4.0 BY-SA copyright agreement. Please attach the link of the original source and this statement.

Clearing Mac Files

For more, check out # Applets: iOS Reverse, which presents valuable information only for you, focusing on the mobile technology research field.

The copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please indicate the source.