#### « Reveal Integration Guide

# Reveal Server Configuration Options

## Logging Levels

You can control the level of information that Reveal logs using the user defaults key, `IBARevealServerLogLevel`.

The following logging levels are available, and the default levels are `ERROR,WARN,INFO`:

- `NONE`
- `DEBUG`
- `INFO`
- `WARN`
- `ERROR`

The logging level is usually configured via a launch argument passed to your app by Xcode:

1. Select the scheme for your app ("Product → Scheme → Your Scheme")
2. Edit the scheme ("Product → Scheme → Edit Scheme…" or `⌘<`)
3. Navigate to "Run → Arguments"

4. Insert a new argument using the "+" button at the bottom of the "Arguments Passed On Launch" table, and enter the following:

        -IBARevealServerLogLevel LEVEL1,LEVEL2,LEVEL3

   As shown above, multiple levels can be specified, separated by a comma.

5. Click "Close"

6. Run your app — you should now see Reveal Server logging to Xcode's console (or not, if you set the level to `NONE`)

## Stop Reveal Server from Automatically Starting

By default, Reveal Server will automatically start when your iOS application starts, and when the application is brought to the foreground. You can prevent this by using a launch argument passed to your app by Xcode:

1. Select the scheme for your app ("Product → Scheme → Your Scheme")
2. Edit the scheme ("Product → Scheme → Edit Scheme…" or `⌘<`)
3. Navigate to "Run → Arguments"

4. Insert a new argument using the "+" button at the bottom of the "Arguments Passed On Launch" table, and enter the following:

        -IBARevealServerDisableAutoStart YES

5. Click "Close"

6. Run your app — you should now see Reveal Server logging to Xcode's console that it has not automatically started.

You can now start Reveal Server manually at a time of your own choosing.

## Communication Port

By default, Reveal Server automatically selects a high range port for communication. In most environments, this is fine, however it is possible to force Reveal Server to advertise a single port of your selection for communication.

To do this, configure the port via a launch argument passed to your app by Xcode:

1. Select the scheme for your app ("Product → Scheme → Your Scheme")
2. Edit the scheme ("Product → Scheme → Edit Scheme…" or `⌘<`)
3. Navigate to "Run → Arguments"

4. Insert a new argument using the "+" button at the bottom of the "Arguments Passed On Launch" table, and enter the following:

        -IBARevealServerPort PORT

   Where `PORT` is the port you want to use to communicate with your iOS app.

5. Click "Close"

6. Run your app.

## Allow Reveal Server to start when running under XCTest

By default, Reveal Server will not start if it detects that your application is linked against XCTest. You can override this by using a launch argument passed to your app by Xcode:

1. Select the scheme for your app ("Product → Scheme → Your Scheme")
2. Edit the scheme ("Product → Scheme → Edit Scheme…" or `⌘<`)
3. Navigate to "Run → Arguments"

4. Insert a new argument using the "+" button at the bottom of the "Arguments Passed On Launch" table, and enter the following:

        -IBARevealServerDisableXCTestLoadPrevention YES

5. Click "Close"

6. Run your app — you should now see Reveal Server start normally.

## Prevent Reveal from automatically turning on accessibility

By default, Reveal Server will attempt to inject Apple's accessibility library and forcibly enable accessibility. You can prevent this by using a launch argument passed to your app by Xcode:

1. Select the scheme for your app ("Product → Scheme → Your Scheme")
2. Edit the scheme ("Product → Scheme → Edit Scheme…" or `⌘<`)
3. Navigate to "Run → Arguments"

4. Insert a new argument using the "+" button at the bottom of the "Arguments Passed On Launch" table, and enter the following:

        -IBARevealServerDisableAccessibilityOverride YES

5. Click "Close"

6. Run your app — Reveal will not attempt to enable accessibility if it is not already enabled. Please be aware that this may prevent the Accessibility Workspace from functioning.

## NSUserDefaults

If you wish, you can also set the configuration options above using standard `NSUserDefaults` from within your iOS app. Note that for these defaults to take effect they must be set very early in the lifecycle of your app (before the `UIApplicationDidBecomeActiveNotification` notification is posted by UIKit).

## Getting Help

If you have any problems or questions about using Reveal with your app, head over to our support site.

Visit Support Site