T1PSDK-iOS for our partners
- Open your Podfile and add the following lines
platform :ios, '11.0'
target 'T1PSDK-Demo' do
use_frameworks!
pod 'T1PSDK', :git => 'https://github.com/The1Central/T1PSDK-iOS.git'
end
- Pod install
let t1p = T1P()
let environment: T1PEnvironment = T1PEnvironment.uat
let redirectURL: String = ""
let clientId: String = "ClientId"
let language: SDKLanguage = SDKLanguage.English
t1p.shared.initialT1P(environment: environment, redirectUrl: redirectURL, clientId: clientId, language: language)
let signUpVC: UIViewController = t1p.shared.signUp()
present(signUpVC, animated: true, completion: nil)
let signInVC: UIViewController = t1p.shared.signIn()
present(signInVC, animated: true, completion: nil)
t1p.shared.signOut { _ in
// Successful
} onFailure: { error in
// Failure wtih error
}
let accountRecoveryVC: UIViewController = t1p.shared.accountRecovery()
present(accountRecoveryVC, animated: true, completion: nil)
t1p.shared.getAccessToken { token in
// Successful with token value
} onFailure: { error in
// Failure wtih error
}