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:
pip install shield-iospip install shield-iosVerify the installation:
shield-ios versionshield-ios versionStep 2: Get Your Project Token
Sign in to the ByteHide Cloud Panel and create a new Shield project for your iOS application.
Click to expand
Once the project is created, copy your project token from the project dashboard.
Click to expand
For detailed instructions, see Project Token.
Step 3: Create a Configuration File
Generate a default configuration file in your project directory:
shield-ios initshield-ios initThis creates a shield-ios.json file. Open it and add your project token and the protections you want to apply:
{
"projectToken": "your-project-token",
"protections": {
"symbol_renaming": true,
"string_encryption": true,
"control_flow": "medium",
"anti_debug": true,
"anti_jailbreak": true
}
}{
"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:
xcodebuild -project MyApp.xcodeproj \
-scheme MyApp \
-configuration Release \
-archivePath build/MyApp.xcarchive archive
xcodebuild -exportArchive \
-archivePath build/MyApp.xcarchive \
-exportOptionsPlist ExportOptions.plist \
-exportPath build/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:
shield-ios protect MyApp.ipa -c shield-ios.json -o MyApp_protected.ipashield-ios protect MyApp.ipa -c shield-ios.json -o MyApp_protected.ipaShield 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:
codesign --force --sign "iPhone Distribution: Your Team" MyApp_protected.ipacodesign --force --sign "iPhone Distribution: Your Team" MyApp_protected.ipaOr let Xcode handle signing by integrating Shield into your build process. See Xcode Integration for details.
What's Next?
- Xcode Integration - Automate protection as part of your Xcode build
- Configuration Reference - Explore all configuration options
- Protections Overview - Learn about every available protection
- CI/CD Integration - Protect builds in your CI pipeline