3
我正在嘗試使用AWS Cognito用戶池爲我的swift iOS應用程序添加登錄/註冊功能。我用Cocoapods建立了我的xcworkspace。在我的App Delegate中,我已經設置了我的Credentials Provider和Service Configuration,如下所示。AWS用戶池設置(Swift)
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: "###")
我得到的「利用未解決的標識符AWSCognitoIdentityUserPoolConfiguration的」編譯錯誤,我不明白,因爲我有進口AWSCore和AWSCognito
任何幫助或洞察力將不勝感激感謝
通過安裝並導入AWSCognitoIdentityProvider – jackets14