Skip to content

Configuring your app ID

To use Privy's Swift SDK, you must first configure iOS settings for your Privy app ID in the Privy Dashboard.

Follow the steps below to get started!

Register allowed application IDs

A Privy application can be configured to restrict which mobile apps can use its client-side App ID (similar to allowed domains for web apps). For this, we'll use the unique value that identifies your app in the Apple App Store.

  1. Copy your project's bundle identifier, which you can find under the "Identity" section of your app's target file. It may have the format "com.myorg.app".

  2. Add your bundle identifier in the Privy Developer Dashboard in the Domains page in the left sidebar. Allowed App IDs field in Privy Console

Note that:

  • Multiple app IDs can be added
  • An empty list will mean all requests from mobile apps are denied.

INFO

Before integrating authentication, you must enable the particular login method in the Privy Developer Dashboard.

3. Configure allowed URL schemes

To use Privy's oAuth login flows (Apple, Google, etc.), you must also register your app's URL scheme (e.g. myapp) with Privy.

First, register your URL scheme in your Xcode project. If you're unsure how, you can follow these steps.

Then, register it within the Domains page for your app in the Privy Dashboard. This configuration is right below the configuration for allowed application IDs, which you just completed.

Please note:

  • Multiple URL schemes can be added for the same Privy App ID.
  • An empty list will mean that requests coming from URL schemes other than web defaults (http and https) will be rejected. You must register at least one URL scheme.
Why is this required?

Certain flows within the Privy authentication process require Privy to register allowed callback URLs with third-party service providers. The plainest example of this is social login flows using the OAuth 2.0 Protocol, where Privy must register allowed callback URLs with Google, Apple, and other OAuth login providers.

Configuring your allowed URL schemes in the Privy Dashboard ensures Privy updates the appropriate settings with these third-party service providers!