#### « 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.

## 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).