我正在尝试使用AWS Cognito用户池为我的Swift iOS应用程序添加登录/注册功能。我已经使用Cocoapods设置了我的xcworkspace。在我的App Delegate中,我已经设置了我的凭证提供者和服务配置,如下所示。
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
}
但是当我尝试使用以下内容设置用户池配置时:
let configurationUserPool = AWSCognitoIdentityUserPoolConfiguration(clientId: "###", clientSecret: "#########", poolId: "###")
我遇到了一个编译错误 "use of unresolved identifier AWSCognitoIdentityUserPoolConfiguration",我不太理解,因为我已经导入了AWSCore和AWSCognito。希望能得到帮助或建议,非常感谢。