2016-08-08 61 views
0

我試圖讓我的應用程序連接到Amazon S3並從存儲桶檢索文件只有我收到一些錯誤。類型AWS憑證提供程序沒有區域類型的成員憑據

let credentialsProvider = AWSCognitoCredentialsProvider.credentialsWithRegionType(AWSRegionType.EUWest1,identityPoolId: CognitoIdentityPoolId ,unauthRoleArn: unRoleArn, authRoleArn: RoleArn, accoundId: ID) 

這是給我一個錯誤代碼「類型‘AWSCognitoCredentialsProvider’沒有成員‘CredentialsWithRegionType’」希望一些可以傳播什麼,我一直做錯了一些光,因爲此刻我不不知道它是否在我的代碼中,或者我沒有用我的Podfile安裝正確的東西。

謝謝

回答

0

有一種新的,更簡單的方法來提供swift憑據。試試看看它是否修復你的錯誤:

let credentialsProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: cognitoIdentityPoolId)