Quick Start
Protect your first iOS application in minutes. This guide walks you through installing Shield, creating a configuration, and protecting your app.
Step 1: Install Shield
The fastest way is the automatic setup script. Run this from your Xcode project directory:
bash <(curl -sL https://raw.githubusercontent.com/bytehide/shield-ios/main/scripts/setup.sh)bash <(curl -sL https://raw.githubusercontent.com/bytehide/shield-ios/main/scripts/setup.sh)This installs the CLI, creates shield-ios.json, and configures your Xcode project automatically. See Automatic Setup for details.
Alternative installation methods
You can also install Shield manually via Homebrew (brew install bytehide/tap/shield-ios), pip (pip install bytehide-shield-ios), or Fastlane plugin.
Step 2: Get Your Project Token
Sign in to the ByteHide Cloud Panel and create a new Shield project for your iOS application.
Once the project is created, copy your project token from the project dashboard. It starts with bh_.
For detailed instructions, see Project Token.
Step 3: Create a Configuration File
If you used the automatic setup script, shield-ios.json was already created for you. Otherwise, generate a default configuration:
shield-ios initshield-ios initOpen shield-ios.json and add your project token and the protections you want:
{
"projectToken": "bh_YOUR_TOKEN",
"protections": {
"anti_debug": true,
"anti_jailbreak": true,
"string_encryption": true,
"symbol_renaming": true,
"control_flow": "medium"
}
}{
"projectToken": "bh_YOUR_TOKEN",
"protections": {
"anti_debug": true,
"anti_jailbreak": true,
"string_encryption": true,
"symbol_renaming": true,
"control_flow": "medium"
}
}Step 4: Protect Your Application
Option A: Archive in Xcode (Recommended)
If you used the automatic setup script or configured the Xcode post-archive action, just archive your app normally:
- Select Product > Archive in Xcode
- Shield runs automatically after the archive completes
- Distribute from the Organizer as usual (Xcode handles signing)
Option B: Protect via CLI
Protect an IPA directly:
shield-ios protect MyApp.ipa --config shield-ios.jsonshield-ios protect MyApp.ipa --config shield-ios.jsonOr protect an xcarchive (then export the IPA with Xcode):
# 1. Archive
xcodebuild archive \
-project MyApp.xcodeproj \
-scheme MyApp \
-archivePath build/MyApp.xcarchive
# 2. Protect
shield-ios protect build/MyApp.xcarchive \
-o build/MyApp.xcarchive \
--config shield-ios.json \
--no-sign
# 3. Export IPA (Xcode handles signing)
xcodebuild -exportArchive \
-archivePath build/MyApp.xcarchive \
-exportOptionsPlist ExportOptions.plist \
-exportPath build/output# 1. Archive
xcodebuild archive \
-project MyApp.xcodeproj \
-scheme MyApp \
-archivePath build/MyApp.xcarchive
# 2. Protect
shield-ios protect build/MyApp.xcarchive \
-o build/MyApp.xcarchive \
--config shield-ios.json \
--no-sign
# 3. Export IPA (Xcode handles signing)
xcodebuild -exportArchive \
-archivePath build/MyApp.xcarchive \
-exportOptionsPlist ExportOptions.plist \
-exportPath build/outputWhat Happens
Shield processes your compiled Mach-O binary and applies the selected protections:
Shield iOS v1.0.0
✓ Unpacked: MyApp
✓ Anti-Debug: ptrace + sysctl checks injected
✓ Anti-Jailbreak: 12 detection vectors active (sensitivity: 1)
✓ String Encryption: 347 strings encrypted (XOR)
✓ Symbol Renaming: 182 symbols renamed (prefix: a)
✓ Control Flow: medium obfuscation applied to 94 functions
✓ Repacked: MyApp_protected.ipa (12.4 MB → 13.1 MB)
✓ Your iOS app is now protected!Shield iOS v1.0.0
✓ Unpacked: MyApp
✓ Anti-Debug: ptrace + sysctl checks injected
✓ Anti-Jailbreak: 12 detection vectors active (sensitivity: 1)
✓ String Encryption: 347 strings encrypted (XOR)
✓ Symbol Renaming: 182 symbols renamed (prefix: a)
✓ Control Flow: medium obfuscation applied to 94 functions
✓ Repacked: MyApp_protected.ipa (12.4 MB → 13.1 MB)
✓ Your iOS app is now protected!What's Next?
Xcode Integration
Automate protection as part of your Xcode workflow
Configuration Reference
Explore all configuration options
Protections Overview
Learn about every available protection
CI/CD Integration
Protect builds in your CI pipeline