/

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
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:

Bash
shield-ios init

Open shield-ios.json and add your project token and the protections you want:

JSON
{
  "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

If you used the automatic setup script or configured the Xcode post-archive action, just archive your app normally:

  1. Select Product > Archive in Xcode
  2. Shield runs automatically after the archive completes
  3. Distribute from the Organizer as usual (Xcode handles signing)

Option B: Protect via CLI

Protect an IPA directly:

Bash
shield-ios protect MyApp.ipa --config shield-ios.json

Or protect an xcarchive (then export the IPA with Xcode):

Bash
# 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

What Happens

Shield processes your compiled Mach-O binary and applies the selected protections:

CODE
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

Previous
Introduction