Xcode: Cheat Sheet

A small collection of command lines for Xcode.

General
Compiling
Provisioning Profiles
IDE

General

# Print the path of the active developer directory
xcode-select -p

# Set active developer directory.
xcode-select -s <path>

Compiling

Provisioning Profiles

# List devices in provisioning profile
security cms -D -i *.mobileprovision

# Extract entitlements from provisioning profile
security cms -D -i *.mobileprovision

# If you have an IPA file and want to check entitlements. Rename app.ipa -> app.zip and extract the archive.
# Use the codesign tool to check the entitlements on the .app bundle like this:
codesign -d --entitlements :- "Payload/YourApp.app"

# Alternative: Use the security tool to check the entitlements of the app's embedded provisioning profile:
security cms -D -i "Payload/YourApp.app/embedded.mobileprovision"

Keyboard Shortcuts

KeysDescription
SHIFT+CMD+1Open Xcode welcome view with project history. Here you can quickly open your past project files.
CMD+BStart building the project.
CMD+RBuild and run.