Skip to content

The following is a list of useful commands for various aspects of iOS development.

Notifications You must be signed in to change notification settings

seanmcneil/UsefulCommands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

Useful Commands

The following is a list of useful commands for various aspects of iOS development.

File System

Delete derived data

rm -rf ~/Library/Developer/Xcode/DerivedData

Delete Xcode archives

rm -rf ~/Library/Developer/Xcode/Archives

Set the created and modified file date for all files & folders to current date

find . -exec touch '{}' \;

General Commands

Generate a UUID

uuidgen

Generate a UUID with lowercase letters

uuidgen | tr ][:upper:]' '[:lower:]'

Cocoapods

Remove Cocoapods from a project

pod deintegrate 

Remove cached version of a specific pod

pod cache clean <POD_NAME> 

Remove cached version of all pods

pod cache clean --all 

Lint a pod

pod lib lint 

Lint a private pod

pod lib lint --sources=trunk,<REPO_NAME>

Update local podspec repo

pod repo update

Simulator

List all simulators

xcrun simctl list

Erase all simulators

xcrun simctl erase all

Delete old simulators

xcrun simctl delete unavailable

Delete app by bundle id

xcrun simctl uninstall booted <BUNDLE_IDENTIFIER>

Record a video

xcrun simctl io booted recordVideo --codec=h264 --mask=black --force output.mov

git

Squash commits on current branch

git checkout branchToSquash
git reset $(git merge-base main $(git branch --show-current))
git add -A
git commit -m "squashed branch"

Delete local branches that have been merged on remote

git fetch -p ; git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d

FFmpeg

Preview sizes for App Store videos (sizes in portrait)

  • 750 x 1334 iPhone
  • 886 x 1920 iPhone Pro Max
  • 900 x 1200 iPad 9.7
  • 1080 x 1920 iPhone Plus
  • 1200 x 1600 iPad Pro 12.9

Resize a video

ffmpeg -i input.mp4 -s <WIDTH>x<HEIGHT> -c:a copy ouput.mp4

Resize a video to precise dimensions

ffmpeg -i input.mp4 -strict -2 -vf scale=<WIDTH>x<HEIGHT> -aspect 1.779 output.mp4

Rotate a video, right by 90 degrees

ffmpeg -i input.mp4 -vf "transpose=1" output.mp4

About

The following is a list of useful commands for various aspects of iOS development.

Resources

Stars

Watchers

Forks

Packages

No packages published