{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/433","repository_url":"https://api.github.com/repos/aws/aws-sdk-ios","labels_url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/433/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/433/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/433/events","html_url":"https://github.com/aws/aws-sdk-ios/issues/433","id":166575060,"number":433,"title":"NSError is imported as non-optional in swift in didCompletePasswordAuthenticationStepWithError","user":{"login":"jawwad","id":202240,"avatar_url":"https://avatars.githubusercontent.com/u/202240?v=3","gravatar_id":"","url":"https://api.github.com/users/jawwad","html_url":"https://github.com/jawwad","followers_url":"https://api.github.com/users/jawwad/followers","following_url":"https://api.github.com/users/jawwad/following{/other_user}","gists_url":"https://api.github.com/users/jawwad/gists{/gist_id}","starred_url":"https://api.github.com/users/jawwad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jawwad/subscriptions","organizations_url":"https://api.github.com/users/jawwad/orgs","repos_url":"https://api.github.com/users/jawwad/repos","events_url":"https://api.github.com/users/jawwad/events{/privacy}","received_events_url":"https://api.github.com/users/jawwad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-20T12:59:05Z","updated_at":"2016-07-22T16:56:38Z","closed_at":null,"body":"In AWSCognitoIdentityUserPool.h, the signature of the `didCompletePasswordAuthenticationStepWithError` method is the following:\r\n\r\n```objc\r\n-(void) didCompletePasswordAuthenticationStepWithError:(NSError *) error;\r\n```\r\n\r\nSince the `NS_ASSUME_NONNULL_BEGIN` and `NS_ASSUME_NONNULL_END` specifiers are used the `_Nullable` attribute needs to be added to `NSError` otherwise in swift the error parameter cannot be checked to see if it is nil since it is imported as a non-optional.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/202240/16987016/53101418-4ea3-11e6-82ed-7d79438226aa.png)\r\n\r\nThe method signature can be forced to use NSError? but that results in a warning:\r\n![image](https://cloud.githubusercontent.com/assets/202240/16987053/89725016-4ea3-11e6-9573-4ab0ed1d1878.png)\r\n\r\nUpdating the signature of the method in `AWSCognitoIdentityUserPool.h` to the following should fix it:\r\n\r\n```objc\r\n- (void)didCompletePasswordAuthenticationStepWithError:(NSError * _Nullable) error;\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/comments/234597376","html_url":"https://github.com/aws/aws-sdk-ios/issues/433#issuecomment-234597376","issue_url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/433","id":234597376,"user":{"login":"karthiksaligrama","id":3040416,"avatar_url":"https://avatars.githubusercontent.com/u/3040416?v=3","gravatar_id":"","url":"https://api.github.com/users/karthiksaligrama","html_url":"https://github.com/karthiksaligrama","followers_url":"https://api.github.com/users/karthiksaligrama/followers","following_url":"https://api.github.com/users/karthiksaligrama/following{/other_user}","gists_url":"https://api.github.com/users/karthiksaligrama/gists{/gist_id}","starred_url":"https://api.github.com/users/karthiksaligrama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karthiksaligrama/subscriptions","organizations_url":"https://api.github.com/users/karthiksaligrama/orgs","repos_url":"https://api.github.com/users/karthiksaligrama/repos","events_url":"https://api.github.com/users/karthiksaligrama/events{/privacy}","received_events_url":"https://api.github.com/users/karthiksaligrama/received_events","type":"User","site_admin":false},"created_at":"2016-07-22T16:56:38Z","updated_at":"2016-07-22T16:56:38Z","body":"Thanks , we will fix this in the next release."}}
{"actor":{"display_login":"karthiksaligrama"}}