Installation & Setup
Shield for iOS is distributed as a Python package and installed via pip. This guide covers installation, verification, and initial setup.
Requirements
- Python 3.8 or later
- pip package manager
- macOS recommended (required for code signing and full Xcode integration)
- Linux supported for CI/CD pipelines and headless builds
Install Shield
Install the Shield CLI tool from pip:
pip install shield-iospip install shield-iosThis installs the shield-ios command-line tool and all required dependencies.
Verify Installation
Confirm that Shield is installed correctly:
shield-ios versionshield-ios versionThis displays the installed version and confirms the tool is available in your PATH.
Initialize a Project
Navigate to your iOS project directory and generate a default configuration file:
cd /path/to/your/ios-project
shield-ios initcd /path/to/your/ios-project
shield-ios initThis creates a shield-ios.json file with a default configuration template. Open it and add your project token and desired protections.
Dependencies
Shield installs the following dependencies automatically:
| Dependency | Purpose |
|---|---|
lief | Binary parsing and modification |
click | Command-line interface |
pyyaml | Configuration file parsing |
colorama | Terminal output formatting |
pycryptodome | Cryptographic operations |
requests | Cloud Panel communication |
All dependencies are installed automatically when you run pip install shield-ios.
Updating Shield
To update to the latest version:
pip install --upgrade shield-iospip install --upgrade shield-iosVirtual Environments
For isolated installations, you can use a Python virtual environment:
python3 -m venv shield-env
source shield-env/bin/activate
pip install shield-iospython3 -m venv shield-env
source shield-env/bin/activate
pip install shield-iosThis is useful when you want to keep Shield separate from your system Python packages.
Related
- Quick Start - Protect your first application
- Xcode Integration - Integrate Shield into your Xcode build
- CI/CD Integration - Set up Shield in CI pipelines