{"id":22690365,"url":"https://github.com/shtnkgm/ioscommandcheatsheet","last_synced_at":"2026-03-19T23:26:29.924Z","repository":{"id":187980466,"uuid":"161633516","full_name":"shtnkgm/iOSCommandCheatSheet","owner":"shtnkgm","description":"CheetSheet for iOS Developer","archived":false,"fork":false,"pushed_at":"2026-02-09T01:35:44.000Z","size":91,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-09T07:50:02.496Z","etag":null,"topics":["cheetsheet","ios"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shtnkgm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-13T12:06:26.000Z","updated_at":"2026-02-09T01:35:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"cb661e30-996b-43fd-b152-f56fb53ed89f","html_url":"https://github.com/shtnkgm/iOSCommandCheatSheet","commit_stats":null,"previous_names":["shtnkgm/ioscommandcheatsheet"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shtnkgm/iOSCommandCheatSheet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shtnkgm%2FiOSCommandCheatSheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shtnkgm%2FiOSCommandCheatSheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shtnkgm%2FiOSCommandCheatSheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shtnkgm%2FiOSCommandCheatSheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shtnkgm","download_url":"https://codeload.github.com/shtnkgm/iOSCommandCheatSheet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shtnkgm%2FiOSCommandCheatSheet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29478355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T11:35:25.641Z","status":"ssl_error","status_checked_at":"2026-02-15T11:34:57.128Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cheetsheet","ios"],"created_at":"2024-12-10T00:33:54.246Z","updated_at":"2026-03-19T23:26:29.912Z","avatar_url":"https://github.com/shtnkgm.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# iOS Command CheatSheet\n\nThis is a console command cheat sheet for iOS developers.\n\nCommand CheatSheet for iOS Developer\n\n- [Certificates / Provisioning Profiles](#certificates--provisioning-profiles)\n- [CocoaPods](#cocoapods)\n- [Carthage](#carthage)\n- [Swift Package Manager](#swift-package-manager)\n- [Fastlane](#fastlane)\n- [Swift Compiler](#swift-compiler)\n- [SwiftLint](#swiftlint)\n- [Xcode](#xcode)\n- [Simulator](#simulator)\n- [Homebrew](#homebrew)\n- [.gitignore](#gitignore)\n- [Firebase](#firebase)\n\n## Certificates / Provisioning Profiles\n\nCreate Private Key\n```bash\nopenssl genrsa -out private.key 2048\n```\n\nCreate CSR\n```bash\nopenssl req -new -key private.key -out CertificateSigningRequest.certSigningRequest -subj \"/emailAddress=[YourMailAddress], CN=[CommonName], C=JP\"\n```\n\nPrint certificates in keychain\n```bash\nsecurity find-identity -p codesigning -v\n```\n\nPrint provisioning profiles (〜Xcode 15)\n```bash\nls ~/Library/MobileDevice/Provisioning\\ Profiles/\n```\n\nPrint provisioning profiles (Xcode 16〜)\n```bash\nls ~/Library/Developer/Xcode/UserData/Provisioning\\ Profiles/\n```\n\n## CocoaPods\n\nInstall\n```bash\nsudo gem install cocoapods\n```\n\nDelete Pods\n```bash\nrm -rf Pods\n```\n\nDelete Podfile\n```bash\nrm Podfile\n```\n\nDelete Podfile.lock\n```bash\nrm Podfile.lock\n```\n\nInit Podfile\n```bash\npod init\n```\n\nInstall libraries\n```bash\npod install\n```\n\nUpdate libraries\n```bash\npod update\n```\n\nCreate PodSpec\n```bash\npod spec create pod_name\n```\n\nLint PodSpec\n```bash\npod lib lint\n```\n\nCreate your trunk account \n```bash\npod trunk register mail_address 'your_name'\n```\n\nPublish pods\n```bash\npod trunk push pod_name.podspec\n```\n\nDelete caches\n```bash\npod cache clean --all\n```\n\nDelete caches\n```bash\nrm -rf ~/Library/Caches/CocoaPods/\n```\n\n## Carthage\n\nInstall\n```bash\nbrew install Carthage\n```\n\nInstall Libraries\n```bash\ncarthage bootstrap --platform iOS --cache-builds\n```\n\nUpdate Libraries\n```bash\ncarthage update --platform iOS --cache-builds\n```\n\nCreate XCFileList\n```bash\nls Carthage/Build/iOS | grep -E .+framework$ | sed 's/.*/$(SRCROOT)\\/Carthage\\/Build\\/iOS\\/\u0026/' \u003e Carthage.xcfilelist\n```\n\nBuild\n```bash\ncarthage build --no-skip-current \n```\n\nDelete Caches\n```bash\nrm -rf ~/Library/Caches/org.carthage.CarthageKit \n```\n\nDelete Caches\n```bash\nrm -rf ~/Library/Caches/carthage\n```\n\n## Swift Package Manager\n\nDelete Caches\n```bash\nrm -rf ~/Library/Caches/org.swift.swiftpm\n```\n\n## Fastlane\n\nInstall\n```bash\nbrew install fastlane\n```\n\nInit fastlane\n```bash\nfastlane init\n```\n\nDownload Metadata\n```bash\nfastlane deliver download_metadata --force\n```\n\nUpload Metadata\n```bash\nfastlane deliver --force --skip_screenshots --skip_binary_upload --skip_app_version_update --skip_metadata false\n```\n\nDownload Screenshot\n```bash\nfastlane deliver download_screenshots --force\n```\n\nCreate Screenshot\n```bash\nfastlane run frameit path:\"./fastlane/screenshots/\" white:false\n```\n\nUpload Screenshot\n```bash\nfastlane deliver --force --skip_binary_upload --skip_metadata --skip_app_version_update --overwrite_screenshots --skip_screenshots false\n```\n\nUpload Binary\n```bash\nfastlane deliver --force --skip_screenshots --skip_metadata --skip_app_version_update\n```\n\nSubmit for AppStore review\n```bash\nfastlane deliver --force --skip_screenshots --skip_metadata --skip_app_version_update  --skip_binary_upload --automatic_release --submit_for_review\n```\n\nDelete session cookie\n```bash\nrm ~/.fastlane/spaceship/**/cookie\n```\n\n## Swift Compiler\nParse and type-check input file(s) and pretty print AST(s)\n```bash\nswiftc -print-ast file\n```\n\nParse and type-check input file(s) and dump AST(s)\n```bash\nswiftc -dump-ast file\n```\n\n## SwiftLint\n\nInstall\n```bash\nbrew install swiftlint\n```\n\nLint\n```bash\nswiftlint\n```\n\nAutoCorrect\n```bash\nswiftlint autocorrect\n```\n\nPrint Docs\n```bash\nswiftlint generate-docs\n```\n\nCopy All Opt-In Rules\n```bash\nswiftlint rules | awk -F \"|\" '$3 ~ \"yes\" { print $2 }' | tr -d ' ' | sed 's/^/  - /' | pbcopy\n```\n\nDelete Caches\n```bash\nrm -rf ~/Library/Caches/SwiftLint\n```\n\n## Xcode\n\nSwitch the developer path to the specified Xcode application\n```bash\nsudo xcode-select --switch /Applications/Xcode.app\n```\n\nCheck the number of cores on the system\n```bash\nsystem_profiler SPHardwareDataType | grep \"Cores\"\n```\n\nSet the number to use for building\n```bash\ndefaults write com.apple.dt.Xcode IDEBuildOperationMaxNumberOfConcurrentCompileTasks [number_of_cores]\n```\n\nEnable Xcode to show the build duration\n```bash\ndefaults write com.apple.dt.Xcode ShowBuildOperationDuration YES\n```\n\nPrint out the targets, configurations, and schemes in the current project\n```bash\nxcodebuild -list\n```\n\nPrint out the available SDKs that Xcode can build against\n```bash\nxcodebuild -showsdks\n```\n\nClean the disk by removing old build archives to save space\n```bash\nrm -rf ~/Library/Developer/Xcode/Archives\n```\n\nRemove iOS Device Support data to save disk space\n```bash\nrm -rf ~/Library/Developer/Xcode/iOS DeviceSupport/\n```\n\nRemove old simulator data\n```bash\nrm -rf ~/Library/Developer/CoreSimulator/Devices\n```\n\nRemove CoreSimulator caches\n```bash\nrm -rf ~/Library/Developer/CoreSimulator/Caches\n```\n\nClean build by deleting the build cache\n```bash\nxcodebuild -alltargets clean\n```\n\nRemove Xcode's derived data to clear any cached build settings or intermediates\n```bash\nrm -rf ~/Library/Developer/Xcode/DerivedData/\n```\n\nRemove Xcode Previews data\n```bash\nrm -rf ~/Library/Developer/Xcode/UserData/Previews\n```\n\nClear Xcode's cache to ensure a clean build environment\n```bash\nrm -rf ~/Library/Caches/com.apple.dt.Xcode/\n```\n\nRemove cache files related to iOS Device Support\n```bash\nrm -rf ~/Library/Developer/Xcode/iOS\\ DeviceSupport/*/Symbols/System/Library/Caches\n```\n\nDelete Xcode's cache files\n```bash\nxcrun --kill-cache\n```\n\nTerminate the Xcode build service to stop any ongoing build processes\n```bash\nkillall XCBBuildService\n```\n\nRemove Clang module cache to prevent potential conflicts or outdated modules\n```bash\nrm -rf \"$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache\"\n```\n\nRemove Clang module cache to prevent potential conflicts or outdated modules\n```bash\nrm -rf \"$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache\"\n```\n\nRemove temporary Clang module cache\n```bash\nrm -rf \"$TMPDIR/../C/clang/ModuleCache\"\n```\n\n## Simulator\n\nList all available devices, device types, runtimes, and device pairs\n```bash\nxcrun simctl list\n```\n\nList all available device types that can be created\n```bash\nxcrun simctl list devicetypes\n```\n\nList only the devices that are currently booted\n```bash\nxcrun simctl list | grep Booted\n```\n\nOpen a URL in a device with the specified UUID\n```bash\nxcrun simctl openurl \u003cUUID\u003e \u003cURL scheme\u003e\n```\n\nOpen a URL in the currently booted device\n```bash\nxcrun simctl openurl booted \u003cURL scheme\u003e\n```\n\nGrant the Photos app permission for the booted device using the specified bundle ID\n```bash\nxcrun simctl privacy booted grant photos \u003cBundle ID\u003e\n```\n\nRevoke the Photos app permission for the booted device using the specified bundle ID\n```bash\nxcrun simctl privacy booted revoke photos \u003cBundle ID\u003e\n```\n\nReset the privacy permissions for all apps on the booted device using the specified bundle ID\n```bash\nxcrun simctl privacy booted reset all \u003cBundle ID\u003e\n```\n\nSend a simulated push notification to the booted device from the specified payload file\n```bash\nxcrun simctl push booted payload.json\n```\n\nOverride the status bar display for the booted device to a specific time, cellular bars, network type, and Wi-Fi mode\n```bash\nxcrun simctl status_bar booted override --time 12:01 --cellularBars 1 --dataNetwork 3g --wifiMode failed\n```\n\nClear any status bar overrides and revert to the device's default status bar settings\n```bash\nxcrun simctl status_bar booted clear\n```\n\nAdd a root certificate to the booted device's keychain from the specified file\n```bash\nxcrun simctl keychain booted add-root-cert myCA.pem\n```\n\nRecord a video of the booted device's screen and save it to a file\n```bash\nxcrun simctl io booted recordVideo video.mp4\n```\n\nRecord a video of the booted device's screen with the specified codec and ignore the mask\n```bash\nxcrun simctl io booted recordVideo --codec h264 --mask ignored video.mp4\n```\n\nRecord a video of an externally displayed screen of the booted device\n```bash\nxcrun simctl io booted recordVideo --display external video.mp4\n```\n\nPaste the contents of the device's clipboard to the host machine\n```bash\nxcrun simctl pbpaste booted\n```\n\nSynchronize the clipboard content from the host to the booted device\n```bash\nxcrun simctl pbsync host booted\n```\n\nGet information about the booted device's clipboard\n```bash\nxcrun simctl pbinfo booted\n```\n\nSend a simulated APNS push notification to the booted device using the specified bundle ID and payload\n```bash\nxcrun simctl push booted \u003cBundle ID\u003e payload.apns\n```\n\nDelete all simulators that are set to show in the device previews\n```bash\nxcrun simctl --set previews delete all\n```\n\nErase all content and settings from all simulators\n```bash\nxcrun simctl erase all\n```\n\n## Homebrew\n\nInstall\n```bash\n/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n```\n\nDelete Caches\n```bash\nrm -rf ~/Library/Caches/Homebrew \u0026\u0026 brew cleanup -s \u0026\u0026 rm -rf \"$(brew --cache)\"\n```\n\n## .gitignore\n\nCreate .gitignore\n```bash\nbrew install gibo\n```\n\nCreate .gitignore\n```bash\ngibo dump Swift Xcode \u003e\u003e .gitignore\n```\n\nQuick Commit .gitignore\n```bash\ngit add .gitignore \u0026\u0026 git commit -m \"add .gitignore\"\n```\n\nQuick Commit Ignored Files\n```bash\ngit rm -r --cached . \u0026\u0026 git add . \u0026\u0026 git commit -m \"rm ignore files\"\n```\n\n## Firebase\n\nFind dSYM UUID\n```bash\nfind ./ -name \"*.dSYM\" -maxdepth 2 -type d -print0 \\\n| xargs -0 -I{} dwarfdump --uuid \"{}\"\n```\n\nUpload dSYM\n```bash\n./Pods/FirebaseCrashlytics/upload-symbols -gsp GoogleService-Info.plist -p ios ~/Downloads/appDsyms.zip\n```\n\nUpload dSYM\n```bash\nScripts/upload-symbols -gsp GoogleService-Info.plist -p ios ~/Downloads/appDsyms*.zip\n```\n\nUpload dSYM\n```bash\n./Frameworks/Firebase/FirebaseCrashlytics/upload-symbols -gsp GoogleService-Info.plist -p ios ~/Downloads/appDsyms*.zip\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshtnkgm%2Fioscommandcheatsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshtnkgm%2Fioscommandcheatsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshtnkgm%2Fioscommandcheatsheet/lists"}