Symbol Renaming
Protection ID: symbol_renaming
Symbol Renaming replaces meaningful class, method, and property names in your compiled binary with short, meaningless identifiers. This removes the most accessible source of information available to anyone analyzing your application.
Configuration
{
"protections": {
"symbol_renaming": true
}
}{
"protections": {
"symbol_renaming": true
}
}For fine-grained control:
{
"protections": {
"symbol_renaming": {
"enabled": true,
"prefix": "a",
"rename_classes": true,
"rename_methods": true,
"rename_properties": true,
"rename_protocols": false,
"exclude": ["AppDelegate", "SceneDelegate", "*Delegate"],
"exclude_patterns": []
}
}
}{
"protections": {
"symbol_renaming": {
"enabled": true,
"prefix": "a",
"rename_classes": true,
"rename_methods": true,
"rename_properties": true,
"rename_protocols": false,
"exclude": ["AppDelegate", "SceneDelegate", "*Delegate"],
"exclude_patterns": []
}
}
}| Option | Type | Default | Description |
|---|---|---|---|
enabled | bool | true | Enable/disable symbol renaming |
prefix | string | "a" | Prefix for generated obfuscated names |
rename_classes | bool | true | Rename class names |
rename_methods | bool | true | Rename method names |
rename_properties | bool | true | Rename property names |
rename_protocols | bool | false | Rename protocol names (disabled by default to preserve runtime conformance) |
exclude | list | [] | Wildcard patterns to exclude from renaming (e.g., "*Delegate") |
exclude_patterns | list | [] | Substring patterns to exclude third-party SDK symbols (e.g., "MySDK") |
How It Works
When you decompile an unprotected iOS application, class and method names reveal the application's architecture, business logic, and sensitive components. Names like PaymentProcessor, authenticateUser, or decryptLicenseKey give attackers a roadmap of where to focus their analysis.
Symbol Renaming replaces these names with short, meaningless identifiers throughout the Mach-O binary. After protection, decompilers show names like a, b, c instead of the original identifiers, forcing analysts to understand the code purely from its behavior rather than its naming.
Shield generates a mapping file that records the relationship between original and obfuscated names. This mapping is automatically uploaded to the Cloud Panel for stack trace deobfuscation.
What Gets Renamed
| Symbol Type | Renamed | Notes |
|---|---|---|
| Classes | Yes | Objective-C and Swift classes |
| Methods | Yes | Instance and class methods |
| Properties | Yes | Declared properties |
| Protocols | Optional | Disabled by default to preserve runtime protocol conformance |
Automatic Exclusions
Shield automatically preserves symbols that must not be renamed:
- Apple frameworks - UIKit, SwiftUI, Foundation lifecycle methods
- Objective-C runtime symbols - classes, protocols, selectors found in ObjC metadata sections
- Third-party libraries - classes with known SDK prefixes are excluded automatically:
| Prefix | Library |
|---|---|
FIR, GUL, GTM, GDT, GSD, GAD | Firebase / Google |
FB, FBSDK | Facebook SDK |
CLS, Crashlytics | Crashlytics |
GAI | Google Analytics (legacy) |
nanopb_ | nanopb (Firebase dependency) |
AF | Alamofire ObjC bridge |
SD | SDWebImage |
Realm | Realm |
RCT, RN | React Native |
Flipper | Flipper debugger |
Amplitude | Amplitude analytics |
Sentry | Sentry crash reporting |
DD | Datadog |
Braze | Braze push notifications |
Adjust | Adjust attribution |
Appsflyer, AppsFlyerLib | AppsFlyer |
Stripe, STP | Stripe payments |
IQKeyboard | IQKeyboardManager |
These are matched using startswith - FIR matches FIRApp, FIRDatabase, etc. but not MyFIRst.
Custom Exclusions
Some symbols must retain their original names. Common cases include Interface Builder references (view controllers and outlets connected in Storyboards), Codable types (properties used for JSON serialization), Objective-C bridging (symbols referenced from Objective-C by name), and third-party SDK entry points.
Wildcard Exclusions (exclude)
Use wildcard patterns to exclude specific symbols by name:
{
"symbol_renaming": {
"enabled": true,
"exclude": ["AppDelegate", "SceneDelegate", "*ViewController", "*Model"]
}
}{
"symbol_renaming": {
"enabled": true,
"exclude": ["AppDelegate", "SceneDelegate", "*ViewController", "*Model"]
}
}SDK Exclusions (exclude_patterns)
If your app uses a third-party library not in the automatic list, or you have internal frameworks you want to preserve, add them to exclude_patterns:
{
"symbol_renaming": {
"enabled": true,
"exclude_patterns": ["PepeAnalytics", "AcmeSDK", "MyInternalLib"]
}
}{
"symbol_renaming": {
"enabled": true,
"exclude_patterns": ["PepeAnalytics", "AcmeSDK", "MyInternalLib"]
}
}Custom patterns use substring matching - "Pepe" excludes PepeAnalytics, PepeTracker, and MyPepeHelper.
When to use exclude_patterns
Use exclude_patterns when your app crashes after enabling symbol renaming, when you use SDKs that rely on runtime reflection (NSClassFromString, protocol conformance), or when you have internal frameworks with specific naming conventions. Libraries in the automatic exclusions table (like Firebase) do not need to be added manually.
See Exclusions for detailed patterns and common configurations.
When to Use
Symbol renaming is recommended for all production applications. It is the most fundamental obfuscation protection and provides the highest return for the lowest impact. It is especially important for applications containing proprietary algorithms, financial or authentication logic, license validation code, and any business logic you want to protect.
Troubleshooting
App crashes after enabling symbol renaming
Add the SDK prefix that appears in the crash log to exclude_patterns:
{
"protections": {
"symbol_renaming": {
"enabled": true,
"exclude_patterns": ["YourSDKPrefix"]
}
}
}{
"protections": {
"symbol_renaming": {
"enabled": true,
"exclude_patterns": ["YourSDKPrefix"]
}
}
}Not sure which symbols to exclude?
Run with --verbose to see which symbols are being renamed:
shield-ios protect MyApp.xcarchive -o out.xcarchive --no-sign --verboseshield-ios protect MyApp.xcarchive -o out.xcarchive --no-sign --verboseCheck the mapping file to identify which renamed symbol is causing the issue.
Related
- Exclusions - Configure exclusion patterns
- Deobfuscate Stack Traces - Decode obfuscated crash reports
- Protections Overview - All available protections