/

Quick Start

Protect your first iOS application in minutes. This guide walks you through installing Shield, creating a configuration, and protecting your IPA.


Step 1: Install Shield

Install the Shield CLI tool using pip:

Bash
pip install shield-ios

Verify the installation:

Bash
shield-ios version

Step 2: Get Your Project Token

Sign in to the ByteHide Cloud Panel and create a new Shield project for your iOS application.

Create your first projectClick to expand

Once the project is created, copy your project token from the project dashboard.

Get your project tokenClick to expand

For detailed instructions, see Project Token.


Step 3: Create a Configuration File

Generate a default configuration file in your project directory:

Bash
shield-ios init

This creates a shield-ios.json file. Open it and add your project token and the protections you want to apply:

JSON
{
  "projectToken": "your-project-token",
  "protections": {
    "symbol_renaming": true,
    "string_encryption": true,
    "control_flow": "medium",
    "anti_debug": true,
    "anti_jailbreak": true
  }
}

Step 4: Build Your IPA

Build your application from Xcode or the command line to produce the IPA file that Shield will protect:

From Xcode: Select Product > Archive, then export the archive as an IPA using Distribute App > Development or your preferred distribution method.

From the command line:

Bash
xcodebuild -project MyApp.xcodeproj \
    -scheme MyApp \
    -configuration Release \
    -archivePath build/MyApp.xcarchive archive

xcodebuild -exportArchive \
    -archivePath build/MyApp.xcarchive \
    -exportOptionsPlist ExportOptions.plist \
    -exportPath build/

This produces a MyApp.ipa file ready for protection.


Step 5: Protect Your Application

Run Shield on your compiled IPA:

Bash
shield-ios protect MyApp.ipa -c shield-ios.json -o MyApp_protected.ipa

Shield applies the selected protections to the binary and outputs the protected IPA file.


Step 6: Sign and Distribute

The protected IPA needs to be re-signed before distribution. Use your normal code signing process:

Bash
codesign --force --sign "iPhone Distribution: Your Team" MyApp_protected.ipa

Or let Xcode handle signing by integrating Shield into your build process. See Xcode Integration for details.


What's Next?

Previous
Introduction