Why is my iOS Swift generated SDK missing a defaultClient member?

0

I ran through the Calc REST API tutorial given in the API Gateway guide and everything worked perfectly when I ran test invocations via the AWS Console. But when I generate the iOS Swift SDK from the deployed stage 'SDK Generation' tab, unzip and import into my Xcode project, the defaultClient member is missing in <API-Name>Client.swift.

The README.md file that comes with the SDK reads as follows:

# Use the SDK in your project

1. Grab the `defaultClient` from your code

        let client = <API-Name>Client.defaultClient()

1. You can now call your method using the client SDK

Does anyone know why this would be missing?

motivus
已提問 5 年前檢視次數 182 次
1 個回答
1

There was an error in the README.md generated with the REST API iOS Swift SDK. It should have referred to default() and not defaultClient(). This was confirmed by the Amplify team here: https://github.com/aws-amplify/aws-sdk-ios/issues/1357.

motivus
已回答 5 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南