Providing Default Connection Settings at Application Startup

You can provide default connection settings for the application to use when it starts.

  1. In the Xcode Project Navigator, open CustomizationHelper.m, which is located in the WorkFlow\Classes group folder.
  2. Locate the customization tags that accompany the functions that begin with getDefaultConnection.
    For example, the function getDefaultConnectionServerName returns the server name value that is used by the application when it starts up. You can override these functions so they always return a default value.
  3. If you are providing a default activation code, you need change the implementation of the hasCredentials function.
    In the default implementation, this function checks the settings bundle to see if it contains a nonempty value. Since you know you are providing one, you can make hasCredentials always return YES, or you can call getDefaultConnectionActivationCode and test that the returned value is nonempty. Be sure you call getDefaultConnectionActivationCode only if you override its implementation so that it does not call getConfigProperty.Your implementation would look like this:
    - (BOOL) hasCredentials {      
    return [[self getDefaultActivationCode] length] != 0;
        }
    Note: Providing default connection settings only populates the initial values each time the application starts. The user can still change the values in the Settings screen, but those changes are disregarded when the application starts. This approach still does not prevent a server change from overwriting the properties on the client, but those changes will get reverted once the application restarts.