Using CocoaPods have added the AWS libraries to my project.
Created a BridgingHeader.h file:
#import "AWSCore.h"
#import "AWSCognito.h"
#import "AWSS3.h"
In application Build Settings > Objective-C Bridging Headers included this BridgingHeader.h file.
Now in my code when i use the credentials initialisation code:
let credentialsProvider = AWSCognitoCredentialsProvider.credentialsWithRegionType(
AWSRegionType.USEast1,
accountId: "999999999999",
identityPoolId: "us-east-1:ac328da6-63f3-4748-9b8f-999999999",
unauthRoleArn: "arn:aws:iam::69644888888:role/Cognito_s3tutorialUnauth_DefaultRole",
authRoleArn: "arn:aws:iam::69647777777:role/Cognito_s3tutorialAuth_DefaultRole")
On compilation the error i see is:
credentialsWithRegionType is not available, Use initWithRegionType... instead
I am unable to use initWithRegionType too...because then the error is: AWSCognitoCredentialsProvider does not have a member named initWithRegionType
Surprisingly i can even see the signature and help of this on the right pane of my IDE: AWSCognitoCredentialsProvider.credentialsWithRegionType
What am i missing? Could this be a version mixup?
You might have to use this function as constructor for
Swift
: