aws-doc-sdk-examples icon indicating copy to clipboard operation
aws-doc-sdk-examples copied to clipboard

[Bug]: Update package files for Swift examples

Open shepazon opened this issue 1 year ago • 0 comments

Expected behavior

Swift examples should build for both Linux and Mac/iOS, but don't.

Actual behavior

The changes made in this issue need to be reproduced across all of the examples for the Swift SDK. That is:

  • Add the platforms block to the Package.swift file. This is needed to build for Apple platforms, and was removed from all examples by mistake during a cleanup pass many months ago.
  • Rename the main.swift file to entry.swift. This works around a known bug in the Swift build chain when the main program uses asynchronous code.

Steps to reproduce

1. Try to build on Mac using either the command line or Xcode.
2. Errors occur.

Logs / stacktrace (if applicable)

No response

Which SDK were you using?

Swift

Which OS were you using?

macOS

SDK version

0.34.0

OS version

macOS Sonoma 14.3

shepazon avatar Feb 08 '24 18:02 shepazon