ios - AWS Cognito error: Authentication delegate not set -


i developing ios app in swift using xcode 7.3. app communicates dynamodb database, allowing user read , write data. recently, updated pods, include awsdynamodb, awscognito, awscognitoidentityprovider, , other aws pods. set new user pool according instructions on page:

http://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-integrating-user-pools-with-identity-pools.html

as part of following these instructions, put following code in appdelegate class's didfinishlaunchingwithoptions method:

let serviceconfiguration = awsserviceconfiguration(region: .useast1, credentialsprovider: nil)     let userpoolconfiguration = awscognitoidentityuserpoolconfiguration(clientid:app_client_id, clientsecret: appsecret, poolid: user_pool_id)     awscognitoidentityuserpool.registercognitoidentityuserpoolwithconfiguration(serviceconfiguration, userpoolconfiguration: userpoolconfiguration, forkey: user_pool_name)     let pool = awscognitoidentityuserpool(forkey:user_pool_name)     let credentialsprovider = awscognitocredentialsprovider(regiontype: .useast1, identitypoolid: identity_pool_id, identityprovidermanager:pool)     let configuration = awsserviceconfiguration(region:.useast1, credentialsprovider:credentialsprovider)     awsservicemanager.defaultservicemanager().defaultserviceconfiguration = configuration 

i got value identity_pool_id navigating starting aws console cognito, federated identities, identity pool created while following instructions, "edit identity pool", , copying string shown next "identity pool id". obtained value app_client_id expanding "authentication providers" on same page , selecting "cognito" tab. user_pool_name, used "identity pool name" on page, , user_pool_id used "user pool id" value listed under "authentication providers". unclear whether set these values correctly, since wasn't entirely sure values developer guide saying should use.

after updating pods , making these changes, when run app, see error:

[error] awscredentialsprovider.m line:569 | __44-[awscognitocredentialsprovider credentials]_block_invoke.345 | unable refresh. error [error domain=com.amazonaws.awscognitoidentityprovidererrordomain code=-1000 "authentication delegate not set" userinfo={nslocalizeddescription=authentication delegate not set}]

it impossible access dynamodb data, though app still launch. suspect part of problem dynamodb database not in useast, i'm unsure whether result in error. have tried possible causes error in addition changing code in appdelegate, error remains same. causes can investigate? if makes difference, trying allow app authorize user in addition restoring dynamodb functionality, , accomplish both in process of fixing issue.

it looks issue having comes when trying have user sign or log in. in sample code not set pool.delegate value. line should in appdelegate

pool.delegate = self 

this should implement awscognitoidentityinteractiveauthenticationdelegate

this blog post should assist in getting started: https://mobile.awsblog.com/post/txgnh1aukdrzdh/announcing-your-user-pools-in-amazon-cognito

the sample application might helpful https://github.com/awslabs/aws-sdk-ios-samples/blob/75ada5b6283b7c04c1214b2e1e0a6394377e3f2b/cognitoyouruserpools-sample/objective-c/cognitoyouruserpoolssample/appdelegate.h