eNROLL iOS Framework
Last updated
Last updated
1. REQUIREMENTS
minimum Xcode version 14.2
minimum iOS Deployment 13.0
Download the zip file from Versions page.
Unzip the file you will find EnrollFramework.xcframework file
Add the EnrollFramework.xcframework to your project folder then drag and drop the file to the Frameworks extension like the screenshot below with Embed & Sign:
Add the following sources to the Podfile
if you don't have pod file, run pod init on your project directory from the terminal.
Add the following pods to the Podfile
run the following command on the project directory
add the following to your project info.plist file
if you are using XCode 15 search for User Script Sandboxing in Project Build Settings and set it to FALSE like screenshot below.
Finally, ask for your license then drag and drop it to your project navigator files with copy files if needed checked like the below screenshot
First Apply to EnrollCallBack Protocol to use callbacks from the framework
Initialize Steps:
Initialize EnrolIInitModel and wrap it with do catch block
Call EnrollFramework.initViewController in the present method
Do not forget to wrap the code block in a do-catch block. as it may throw an error when the data sent is not valid
Launch Enroll:
tenantId
String argument represents the organization id (Tenant ID) (should not be empty or nill)
tenantSecret
String argument represents organization secret (Tenant Secret) (should not be empty or nill)
enrollEnviroment
enum argument represents the working environment (production || staging) (staging is the default)
localizationCode
enum argument represents the framework language ( .ar || .en ) (default is .en) pass it based on your app language to match it.
enrollCallBack
a delegate for the enroll callbacks
onSuccess
Call back function when the enrollment finishes successfully.
onError
Call back function fires when an error occurs during the enrollment
EnrollColors
An object used to change the default enroll colors. (it is an optional and the default is enroll main colors)
EnrollMode
The you want to operate with and it has four types ( onboarding, authentication, update and forget ). Specify one that you need to do the job
levelOffTrustId
the id for the authentication methods you have set (Required in case of authentication mode)
applicantId
the id for the user you want to authenticate or update (Required in case of authentication and update modes)
updateSteps
is is enum for the steps you want to show to the user when update. You can leave it nil value if you want to show all the available update steps to the user.
skipTutorial
in can of onboarding mode, passing true skipTutorial parameter make the user pass the tutorial screens and navigate to the first step of the onboarding process. (default is false)
primary
The Primary color used for all buttons and main items
secondary
Used for the minor views and items
appBackgroundColor
Used for the main background
textColor
Used for the text and content color
errorColor
Used for the error color
successColor
Used for the successful color
warningColor
Used for the warning color
appWhite
The main white color
appBlack
The main black color