Config File
Defender for iOS can process a config.yaml (or config.yml) file containing various settings, feature flags, and other options for building your protected iOS application. You can set the path to the config.yaml or config.yml file via the command line:
-c <path-to-config-file>
OR
--config <path-to-config-file>
If a path to a config file is not provided, Defender for iOS will use the default config.yaml file located in the current version’s installation directory, such as:
/Applications/PreEmptive/DefenderForiOS.app/Contents/version/1.1.2/
License
Defender for iOS can run by providing a license key at runtime by adding license details in the config file. To run the application, check the License page.
License:
key : <value>:<email>
Output Directory
If a custom path is not provided, the new files created by Defender for iOS will be placed in the ~/PreEmptive/ directory. You can specify the output directory using the following arguments:
output:
# Specify the path where the new, protected IPA file should be placed
# Default value: ~/PreEmptive/
dir: ~/PreEmptive/
Logs
Defender for iOS supports logging of various information during obfuscation. You can read more about this here. Log properties are set as follows:
log:
file:
# Specify the path where log files should be written
# Default value: ~/PreEmptive/log/
dir: ~/PreEmptive/log/
# Specify the level of file logging
# 0 - Disable
# 1 - General (Default) - Error messages and major task statuses
# 2 - Information - Include information about files during processing
# 3 - Debug - Include information about file contents during processing
level: 3
File Restriction & Renaming Disabling
File Restriction List
Defender for iOS has a configuration option to set a file restriction list.
# File restriction list (a list of files that should not be processed) (optional)
restrict-list:
- File1.swift
- File2.swift
Disable Renaming
Defender for iOS has a configuration option to disable the renaming feature.
# Renaming section (optional)
# This section can be added to disable renaming.
renaming:
# Disable renaming (Optional)
# Default value: false
disabled: false
Filter
Add Item to Filter List
Defender for iOS has a configuration option to filter items.
# For filtering some symbols (optional)
filter:
- '!DescriptionPoint'
- '!CommandLine'
- '!Renaming'
# Exclude symbols (optional)
exclude:
- addPost
- participants
- add
- remove
Symbol Mapping
Defender for iOS has a configuration option to specify symbols before obfuscation. If not specified by the user, default symbols will be generated.
# For using constant symbol mapping across different obfuscation runs (optional)
# The file format should have key/value pairs on each line.
# Each key should have the original item
# Each value should have the obfuscated result
#
# Example:
# key1: value
# key2: value
symbols-map-file: any-textfile.txt
Provisioning & Signing
Provision Profile for Signing
Defender for iOS has a configuration to specify Provision Profile for signing. Might be required for IPA file creation if no plist
file is present.
# Code signing options (optional)
signing:
# Provision Profile for signing:
provision-profile: 'MyCustomApp.mobileprovision'
# Signing Identity:
# It can be used to override the signing Identity for the project.
identity: 'Apple Distribution: User'
# xcodebuild export plist file:
# Option to specify xcodebuild export plist file.
plist: '/Users/user/Destribution/NIJetpackD/ExportOptions.plist'
Build Configuration
Defender for iOS has various optional arguments for building your protected application:
build:
# Expected processing result type: ipa, binary
# Default value: ipa
type: ipa
# Build configuration type: Debug, Release
configuration: Release
# Build scheme name
Scheme:app-scheme
# Build SDK type: (Consult xcodebuild -sdk option for supported values)
sdk: ios