Configuring Client ID and Creating Redirect URI on iOS

Configure your Client ID

Open your project’s Info.plist and follow the steps below. Once complete, your Info.plist should resemble the sample shown here:

  1. Copy your client_id from the ZenKey developer portal dashboard.

  2. Open your application’s Info.plist and add a ZenKeyClientId key, then paste your client_id as the string value:

    <key>ZenKeyClientId</key>
    <string>{client_id}</string>

Create a redirect URI

Configure the Redirect URI. The Redirect URI is for callbacks to the SDK from several ZenKey services.

  1. Add CFBundleURLTypes — the list of URL schemes supported by the app — as a key:
    <key>CFBundleURLTypes</key>     

After adding this, Xcode will create an array with a "Type 0" dictionary containing a CFBundleURLName key.

  1. Add CFBundleTypeRole and CFBundleURLSchemes to the "Type 0" dictionary. If your project already has a CFBundleURLTypes key with an existing Type dictionary, this new data may still be added at any index.

  2. Add your client_id a second time, also as a string, under CFBundleURLSchemes:

    <key>CFBundleURLSchemes</key>     
    <array>
    <string>{client_id}</string>
    </array>

Did this page help you?