aws-samples / api-gateway-secure-pet-store

Amazon API Gateway sample using Amazon Cognito credentials through AWS Lambda
Apache License 2.0
308 stars 113 forks source link

iOS Sample App - unrecognized selector - AWSSignatureV4Signer #25

Open fishhelper opened 7 years ago

fishhelper commented 7 years ago

With the iOS sample app, AWSSignatureV4Signer does not have a method signerWithCredentialsProvider, so the code will not compile with the latest dependencies.

The suspect line of code is 117 of PETLambdaMicroserviceClient.m:

        AWSSignatureV4Signer *signer = [AWSSignatureV4Signer signerWithCredentialsProvider:_configuration.credentialsProvider
                                                                                  endpoint:_configuration.endpoint];

Changing the signer to v2 does not fix the code - API Gateway requests requiring AWS_IAM do not succeed. The Xcode console reports

2017-01-11 18:09:54.934 PetTest[14093:751826] -[PETCredentials continueWithSuccessBlock:]: unrecognized selector sent to instance 0x618000424280

The unauthenticated AWS_IAM request for registering a user works, so connectivity is established new users are registered with the login screen.