soto-project / soto

Swift SDK for AWS that works on Linux, macOS and iOS
https://soto.codes
Apache License 2.0
882 stars 83 forks source link

Cannot find `NSString` in scope: soto 7.1.0 / xcode 16 #741

Closed mmaetzler closed 3 weeks ago

mmaetzler commented 3 weeks ago

Describe the bug When adding soto 7.1.0 to an empty iOS Swift project, the build fails with: Cannot find 'NSString' in scope

/Users/someuser/Library/Developer/Xcode/DerivedData/test-gwceghdpjkuyutdbcgkieedjljhs/SourcePackages/checkouts/soto-core/Sources/SotoCore/Credential/ConfigFileLoader.swift:302:16: error: cannot find 'NSString' in scope
        return NSString(string: filePath).expandingTildeInPath
               ^~~~~~~~

To Reproduce Steps to reproduce the behavior:

  1. Create new iOS/Swift app project in Xcode Version 16.0 (16A242d)
  2. Add soto as an SPM dependency, with exact version set to 7.1.0
  3. Add SotoSTS and SotoS3 to the build target
  4. build
  5. observe error

Expected behavior Adding Soto to an otherwise empty project should build.

Setup (please complete the following information):

Screenshots

image image image
adam-fowler commented 3 weeks ago

I have a fix for this. It was a Swift 6 compilation issue. Just waiting for a couple of other things to be approved and I'll do a release.

adam-fowler commented 3 weeks ago

soto-core 7.2.0 should fix this

mmaetzler commented 3 weeks ago

Thanks for the fast reply! Would you mind pushing a new soto SPM release that points to soto-core 7.2.0? The 7.1.0 release as-is is non-functional, so the ticket is still open as 7.1.0 cannot be used.

Background: We have updated our code from using the 6.x to the 7.x release but are stuck because soto does not build anymore.

adam-fowler commented 2 weeks ago

If you run update dependencies you should get 7.2.0 Soto-core. As the dependency is set to from: "7.1.0" it will pick up the latest minor release which is 7.2.0.