ForgeRock Developer Experience

Step 5. Configure the SDK

Add the configuration

If you run the project at this stage, you will see an emptyConfiguration message in the debug area. The FRAuth SDK requires a configuration file (usually named FRAuthConfig.plist) to retrieve information about the AM instance and the OAuth 2.0 client.

To add a configuration File

  1. Right-click the DemoApp project folder in your workspace, and select New File.

  2. Select iOS, then scroll down to Resource.

  3. Select Property List and click Next.

  4. Save the file as FRAuthConfig.plist and select Create.

  5. Right-click on the file and select Open As > Source Code.

  6. Replace the existing file content with the following:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
    <plist version="1.0">
         <string>openid profile email address</string>

    Ensure your values match your environment; especially forgerock_url and forgerock_cookie_name.

    The URL string for forgerock_url must match the URL you set in your AM cloud instance.

  7. Save your changes.

  8. Right-click the file, and select Open As > Property List.

    The Property List provides a clear view of the property values.

  9. Edit the values to match your AM server settings configuration.

    For forgerock_realm, if AM is local, set to root. If AM is in the Cloud, set to alpha.

    The SDK validates the information in the configuration file. For information about the configuration options in the file, see Step 4. Configuration file properties.

    If you use a different configuration file name, specify the configuration file name before you initialize the SDK. You might use a different name if you are using multiple configurations to test multiple environments.

    Specify the configuration file name as follows:

    FRAuth.configPlistFilename = "DemoApp"
  10. Save your changes.

  11. Run the application again.

Copyright © 2010-2024 ForgeRock, all rights reserved.