You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After reading the documentation on AWS about AWS sdk for swift, I started coding the DynamoDBInterface for my simple project.
But I'm having an error from Xcode even if I follow the guidelines.
Here is the code
`
class DynamoInterface {
static let shared = DynamoInterface()
let dynamoDbClient: DynamoDbClient
private init() {
do{
try dynamoDbClient = DynamoDbClient(region: "eu-central-1")
} catch {
print("error while connecting to region")
exit(1)
}
}
func listAllTables() {
dynamoDbClient.listTables(input: ListTablesInput()) { result in
switch(result) {
case .success(let response):
guard let namesOfTables = response.tableNames else {
return
}
for currName in namesOfTables {
print("Table name is \(currName)")
}
case .failure(let err):
print(err)
}
}
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
After reading the documentation on AWS about AWS sdk for swift, I started coding the DynamoDBInterface for my simple project.
But I'm having an error from Xcode even if I follow the guidelines.
Here is the code
`
`
Here is the error:
Extra trailing closure passed in call
Is there something that I'm missing?
Thanks in advance for any answer.
Beta Was this translation helpful? Give feedback.
All reactions