2016-10-03 5 views
0

iOSアプリケーションにAWS S3 ADKバージョン2.4.9を統合しました。私のxcodeには、以下の奇妙な問題があります。Swift 2.2でのAWS S3の統合Xcode 7.3でエラーが発生する

Couldn't read credentials provider configurations from `Info.plist`. Please check your `Info.plist` if you are providing the SDK configuration values through `Info.plist`. 

助けてください!

+1

はエラーがかなり明確ようです。 Info.plistをチェックしましたか?もしそうなら、あなたはまだそれを理解することができません、あなたはあなたの質問にそれを含める必要がありますそれ以外の場合私たちを助けることができなくなります。 – brandonscript

+0

AWS s3 sdkとの統合中に、このようなことは何も言及していませんでした。 info.plistに何を含めるべきかわからない。統合のためにhttp://docs.aws.amazon.com/mobile/sdkforios/developerguide/setup.htmlを参照し、また統合のためにcocoapodsを使用しています... – Bhat

答えて

3

defaultS3クライアントを使用するには、アプリのコードまたはinfo.plistファイルでデフォルトのSDK設定を設定する必要があります。 info.plistファイル経由でそれを行うには

あなたはcognito識別IDと以下のS3用プールIDと地域を交換する必要があります。コード

AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:CognitoRegionType 
                           identityPoolId:CognitoIdentityPoolId]; 
AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:DefaultServiceRegionType 
                    credentialsProvider:credentialsProvider]; 
AWSServiceManager.defaultServiceManager.defaultServiceConfiguration = configuration; 

経由でそれを行うには

<key>AWS</key> 
    <dict> 
     <key>CredentialsProvider</key> 
     <dict> 
      <key>CognitoIdentity</key> 
      <dict> 
       <key>Default</key> 
       <dict> 
        <key>PoolId</key> 
        <string>YOUR_POOL_ID_HERE</string> 
        <key>Region</key> 
        <string>USEast1</string> 
       </dict> 
      </dict> 
     </dict> 
     <key>S3</key> 
     <dict> 
      <key>Default</key> 
      <dict> 
       <key>Region</key> 
       <string>USEast1</string> 
      </dict> 
     </dict> 
    </dict> 

おかげで、 ローハン

関連する問題