I am trying to use AWS Cognito User Pools to add login/signup functionality for my swift iOS app. I have set up my xcworkspace with Cocoapods. In my App Delegate I have set up my Credentials Provider and Service Configuration seen below.
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
let credentialsProvider = AWSCognitoCredentialsProvider(regionType: AWSRegionType.USEast1, identityPoolId: cognitoIdentityPoolId)
let defaultServiceConfiguration = AWSServiceConfiguration(region: AWSRegionType.USEast1, credentialsProvider: credentialsProvider)
AWSServiceManager.defaultServiceManager().defaultServiceConfiguration = defaultServiceConfiguration
return true
}
but when i try to set up the user pool configuration with:
let configurationUserPool = AWSCognitoIdentityUserPoolConfiguration(clientId: "###", clientSecret: "#########", poolId: "###")
i get a compilation error of "use of unresolved identifier AWSCognitoIdentityUserPoolConfiguration", which i dont understand because i have imported AWSCore and AWSCognito
any help or insight would be much appreciated thanks
A user pool is a user directory in Amazon Cognito. With a user pool, your users can sign in to your web or mobile app through Amazon Cognito. Your users can also sign in through social identity providers like Google, Facebook, Amazon, or Apple, and through SAML identity providers.
Enter the User Pool ID. Enter the App Client ID. This must be the same client app ID that you received when you created the app in the User pools section of the console. If you have additional apps or user pools, choose Add Another Provider and enter the User Pool ID and App Client ID for each app in each user pool.
ADMIN_NO_SRP_AUTH : Non-SRP authentication flow; you can pass in the USERNAME and PASSWORD directly if the flow is enabled for calling the app client. ADMIN_USER_PASSWORD_AUTH : Admin-based user password authentication. This replaces the ADMIN_NO_SRP_AUTH authentication flow.
import AWSCognitoIdentityProvider
Must also be added to the project and imported in your AppDelegate class in order for that method to be accessible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With