Shield for iOS uses a JSON configuration file to control all aspects of the protection process. This page documents every available option.
Configuration File
Shield reads its configuration from a shield-ios.json file. Generate a default configuration with:
Bash
shield-ios init
shield-ios init
Complete Structure
JSON
{"projectToken":"bh_YOUR_TOKEN","protections":{"symbol_renaming":true,"string_encryption":true,"swift_stripping":true,"control_flow":"medium","dead_code_injection":"medium","opaque_predicates":"medium","arithmetic_obfuscation":"medium","instruction_substitution":"medium","register_shuffling":"medium","api_hiding":"medium","class_encryption":true,"resource_encryption":true,"anti_debug":true,"anti_jailbreak":true,"rasp":true,"polymorphic":true},"code_signing":{"identity":"iPhone Distribution: Your Team","provisioning_profile":"path/to/profile.mobileprovision","skip_if_not_macos":true},"build_integration":{"skip_debug":true,"skip_simulator":true,"verbose":false},"output":{"suffix":"_protected"},"mapping":{"output_file":"mapping.txt","format":"proguard"},"logging":{"level":"info","file":"shield.log","console":true}}
{"projectToken":"bh_YOUR_TOKEN","protections":{"symbol_renaming":true,"string_encryption":true,"swift_stripping":true,"control_flow":"medium","dead_code_injection":"medium","opaque_predicates":"medium","arithmetic_obfuscation":"medium","instruction_substitution":"medium","register_shuffling":"medium","api_hiding":"medium","class_encryption":true,"resource_encryption":true,"anti_debug":true,"anti_jailbreak":true,"rasp":true,"polymorphic":true},"code_signing":{"identity":"iPhone Distribution: Your Team","provisioning_profile":"path/to/profile.mobileprovision","skip_if_not_macos":true},"build_integration":{"skip_debug":true,"skip_simulator":true,"verbose":false},"output":{"suffix":"_protected"},"mapping":{"output_file":"mapping.txt","format":"proguard"},"logging":{"level":"info","file":"shield.log","console":true}}
Project Token
Property
Type
Description
projectToken
string
Your ByteHide project token (starts with bh_). Required for license validation and cloud features. Can also be set via the SHIELD_PROJECT_TOKEN environment variable (takes priority over the config file value).
Protections
Each protection can be enabled with true (default settings) or configured with a specific level or options object. See Protections Overview for details on each protection.
Boolean Protections
These protections accept true or false:
Protection
Description
symbol_renaming
Rename classes, methods, and properties
string_encryption
Encrypt string literals in the binary
swift_stripping
Remove Swift metadata and debug symbols
class_encryption
Encrypt Objective-C class metadata
resource_encryption
Encrypt bundled resources and assets (AES-256)
anti_debug
Detect and block debugger attachment
anti_jailbreak
Detect jailbroken devices
rasp
Runtime Application Self-Protection (hook, trace, and tamper detection)
polymorphic
Generate unique binary on each build
Level-Based Protections
These protections accept an intensity level as a string:
Protection
Levels
Description
control_flow
"light", "medium", "aggressive"
Control flow obfuscation
dead_code_injection
"light", "medium", "heavy"
Insert unreachable code paths
opaque_predicates
"simple", "medium", "complex"
Add always-true/false conditions
arithmetic_obfuscation
"simple", "medium", "complex"
Transform arithmetic operations
instruction_substitution
"simple", "medium", "complex"
Replace instructions with equivalents
register_shuffling
"simple", "medium", "complex"
Randomize register allocation
api_hiding
"simple", "medium", "complex"
Hide system API calls
Set to false to disable any level-based protection.
Protection-Specific Options
Some protections accept an options object for fine-grained control instead of a simple true or level string.
Code signing identity name (e.g., "Apple Development", "iPhone Distribution")
code_signing.provisioning_profile
string
Path to .mobileprovision file (optional)
code_signing.skip_if_not_macos
boolean
Skip signing if not on macOS — useful for CI/CD on Linux runners
When to use --no-sign
When using the Xcode post-archive integration, use --no-sign on the command line and let Xcode handle signing during distribution. The code_signing config section is for standalone CLI usage where you want Shield to re-sign the IPA.
Build Integration
Property
Type
Default
Description
build_integration.skip_debug
boolean
true
Skip protection for Debug builds
build_integration.skip_simulator
boolean
true
Skip protection for Simulator targets
build_integration.verbose
boolean
false
Show detailed output during protection
Output
Property
Type
Description
output.path
string
Full path for the protected output file
output.suffix
string
Suffix added to the input filename (default: _protected)