Skip to content

SwiftyShield/swiftyshield

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

18 Commits
ย 
ย 
ย 
ย 

Repository files navigation

SwiftyShield

็ฎ€ไฝ“ไธญๆ–‡ | English

Professional Swift Code Obfuscation Tool

Obfuscate Swift source code by renaming code identifiers without changing code logic to protect your source code
Validated by 100+ SDKs, no matter how complex your code is, it can accurately identify and perfectly obfuscate
Supports large-scale projects and complex dependencies, providing enterprise-grade security protection for your code
Battle-tested in production environments, you can confidently use it in your production projects


๐Ÿ“ฅ Download

Official Website: https://www.swiftyshield.com

Visit the official website to download the latest version of SwiftyShield

โœ… Notarized by Apple - This application has been notarized by Apple, ensuring security and reliability


๐Ÿ“บ Demo Video

๐Ÿ‘‰ Click here to watch the demo video


โœจ Features

๐Ÿ” Secure Source Code Protection

  • Smart Obfuscation: Only changes code names without affecting code logic
  • Global Declaration Obfuscation: Obfuscates class names, method names, property names and other global identifiers
  • Temporary Variable Obfuscation: Optional temporary variable obfuscation feature
  • Incremental Obfuscation: Supports incremental obfuscation based on history records, old code reuses historical mappings, only new code is obfuscated

๐ŸŽฏ Flexible Configuration Options

  • Module Selection: Freely choose modules to obfuscate
  • Ignore Lists: Configure ignored protocol names and variable names
  • Build Modes: Supports both Debug and Release build modes
  • Smart Module Association Handling: Automatically handles dependencies between modules

๐Ÿ“Š Complete Record Management

  • Obfuscation History: Saves all obfuscation operation records locally
  • Detailed Information: Records obfuscation duration, obfuscation count, module information, etc.
  • Import/Export: Supports JSON import and export of obfuscation records
  • Quick Reuse: Perform incremental obfuscation based on history records

๐Ÿ‘ค Account System

  • Apple ID Login: Secure login with Apple ID
  • Premium Membership: Upgrade to Premium to unlock more features
  • Personalized Customization: Premium users can customize obfuscation features

๐Ÿš€ Usage Guide

Step 1: Login to Account

  1. Open the SwiftyShield app
  2. Click the Sign in with Apple button
  3. Complete login verification with your Apple ID

๐Ÿ’ก Tip: You need to login before using the obfuscation feature

Step 2: Select Project

  1. On the homepage, click to select a .xcworkspace or .xcodeproj file
  2. Choose build mode:
    • Debug Mode: For development and debugging
    • Release Mode: For production releases
  3. Click to start building

Step 3: Select Modules

After successful build, the system will automatically enter the module selection page:

  1. View the list of all obfuscatable modules
  2. Click on a module to expand and view its file list
  3. Select modules to obfuscate (supports select all/deselect all)
  4. The system automatically handles module associations
  5. Click Next to continue

๐Ÿ“Œ Note: If module A is associated with module B, selecting A will automatically check B

Step 4: Configure Obfuscation Options

Configure the following options on the obfuscation configuration page:

1. Temporary Variable Obfuscation

  • Enable or disable temporary variable obfuscation
  • Click "Show Examples" to view obfuscation effect examples

2. Ignore Protocol Names

  • Add protocol names that should not be obfuscated
  • Supports adding multiple protocol names
  • Input restriction: Only English characters, max 40 characters

3. Ignore Variable Names

  • Add variable names that should not be obfuscated
  • Supports adding multiple variable names
  • Input restriction: Only English characters, max 40 characters

4. Encrypt Strings

  • Choose a file where the decrypt method will be written (as a String extension). During obfuscation, plaintext strings are encrypted using AES-128-CBC; the encryption key is generated at random
  • Note: Runtime string decryption adds extra performance overheadโ€”enable this option only when you need it

5. Remove Comments

  • When enabled, all comment types are removed via AST-based analysis (not regex matching/replacement)
  • The syntax tree defines the removal boundaries, so it removes comments only and does not delete any business or executable code

6. Obfuscate File and Folder Names

  • When enabled, file names and folder names are obfuscated during the obfuscation process
  • The mappings for this feature are saved in the current obfuscation record, so incremental runs based on that record won't rename paths again unnecessarilyโ€”avoiding extra structural drift in the project
  • Note: If your project does not support Xcode's Folder-backed feature, after obfuscation you may need to manually add/import the obfuscated files back into the project

Click Next after configuration is complete

Step 5: Select Parent Obfuscation Record (Optional)

If there are historical obfuscation records for the current project, the system will ask whether to perform incremental obfuscation based on history:

  • Select Parent Record: New code will be obfuscated, old code reuses historical mappings
  • Don't Select: Perform fresh obfuscation, all code regenerates obfuscation mappings

๐Ÿ’ก Tip: Incremental obfuscation maintains code consistency and avoids repeatedly modifying already obfuscated code

Step 6: Start Obfuscation

During the obfuscation process, it displays in real-time:

  • Global Declarations Progress: Progress of global declaration obfuscation
  • Temp Declarations Progress: Progress of temporary variable obfuscation (if enabled)
  • Remove Comments Progress: Progress of comment removal (if enabled)
  • Encrypt Strings Progress: Progress of string encryption (if enabled)
  • Obfuscation Logs: Real-time output of obfuscation operation logs

You can click the Stop Obfuscation button to interrupt the operation during the process

After obfuscation is complete, click Next to view results

Step 7: View History Records

Click the Obfuscation History entry on the homepage to:

  • View all obfuscation operation records
  • Display grouped by Scheme
  • View detailed obfuscation information (duration, count, modules, etc.)
  • Export obfuscation records as JSON files
  • Copy JSON to clipboard
  • Delete unwanted records
  • Import history records

โš ๏ธ Important: All obfuscation records are saved locally, please backup regularly


๐Ÿ“ Version History

v1.1.7

  • Optimized property binding for CodingKeys cases
  • Added plain text string encryption
  • Added filename and folder path obfuscation
  • Added AST-based removal of all comment types in code

v1.1.6 ๐Ÿ”’ Custom Version

  • Added plain text string splitting and obfuscation feature

โš ๏ธ Custom Version - Not Publicly Available: This version is not available for public download. Please contact us if you need this feature.

v1.1.5

  • Optimized functionality: Ignore obfuscation of code that didn't participate in compilation

v1.1.4

  • Fixed crash caused by sourcekit forcing indexing of code that didn't participate in compilation

๐Ÿ“ž Contact Us

If you have any questions or suggestions, feel free to contact us:


โ“ FAQ

Q: Will obfuscation affect code functionality?

A: No. SwiftyShield only changes identifier names in the code, not the code logic, so it will not affect code functionality.

Q: Can obfuscated code be restored?

A: No, the obfuscated code cannot be automatically restored. Since we cannot determine whether you have made any modifications to the obfuscated code, we recommend using Git for version control to manage your code and preserve the original version before obfuscation.

Q: How can I compare the relationship between code before and after obfuscation?

A: The obfuscation records contain all the mapping relationships that you can view. You can check the detailed mapping of identifiers before and after obfuscation in the obfuscation history records.

Q: Which Swift versions are supported?

A: Supports Swift 5.0 and above.

Q: Can third-party libraries be obfuscated?

A: Yes, but it's recommended to only obfuscate your own code.

Q: Where can I get the Payment ID?

A: After completing payment, the Payment ID will be sent to your registered email, please check (may take a few minutes).

Q: How to ignore properties that map to server-side fields?

A: If your Model conforms to Codable protocol, no additional handling is needed - SwiftyShield will automatically handle it. Otherwise, you need to create a custom protocol, and add the protocol name to the ignore protocol list before obfuscation, so the mapping relationship won't be broken.

About

A Professional And Powerful Swift Code Obfuscation Tool

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors