Step 1. Adding core dependencies
These dependencies provide core support for social sign-on. These are the minimum required dependencies for using the redirect method to send users to the IdP for authentication.
|
If you want to use an IdP’s native libraries for an embedded experience you can add additional dependencies and configuration in an optional step later. |
You can use Swift Package Manager (SPM) or CocoaPods to add dependencies to your iOS project.
-
Swift Package Manager
-
CocoaPods
-
With your project open in Xcode, select File > Add Package Dependencies.
-
In the search bar, enter the Ping SDK for iOS repository URL:
https://github.com/ForgeRock/ping-ios-sdk. -
Select the
ping-ios-sdkpackage, and then click Add Package. -
In the Choose Package Products dialog, ensure that the
PingDavinciandPingExternalIdplibraries are added to your target project. -
Click Add Package.
-
In your project, import the library:
import PingDavinci import PingExternalIdp
-
If you do not already have CocoaPods, install the latest version.
-
If you do not already have a Podfile, in a terminal window, run the following command to create a new Podfile:
pod init
-
Add the following lines to your Podfile:
pod 'PingDavinci' pod 'External-idp'
-
Run the following command to install pods:
pod install