mercredi 25 mars 2015

Generating AWS creditials through Cognito Using Swift iOS App

Trying to follow the example set on the amazon-cognito site with regards to obtaining AWS credentials from a facebook login on iOS. I am trying to translate the Objective C into swift and am running into an issue when setting the logins of the credential provider.


(http://ift.tt/1lDHFBg) under "Use Facebook"


Here in my viewController I try:



let token = FBSession.activeSession().accessTokenData.accessToken

let credentialsProvider : AWSCredentialsProvider = AWSServiceManager.defaultServiceManager().defaultServiceConfiguration.credentialsProvider

credentialsProvider.logins = NSDictionary(dictionary: [AWSCognitoLoginProviderKey.Facebook: token])


but on the third line xCode states AWSCredentialsProvider does not have a field "logins" though the tutorial makes it seem as such.


Thanks for your help! I assume I am incorrectly grabbing the credentialsProvider.





Aucun commentaire:

Enregistrer un commentaire