#value of type 'UnsafeRawBufferPointer' has no member 'withMemoryRebound'

1 messages · Page 1 of 1 (latest)

cursive tide
#

Hi guys, I have installed Vapor for the first time with Xcode 14.0.1 & Swift 5.7. But when i run command "swift run" to build it throws an error like this.
Anyone can help me fix this. Thanks

umbral wedge
#

You cannot use SwiftPM (of which swift build is part) to build code for iOS (which is what it looks like you are doing, based on your path)

cursive tide
umbral wedge
#

Then I strongly recommend updating to a newer Xcode - 14.0.1 has Swift 5.7.0; IIRC the withMemoryRebound API on UnsafeRawBufferPointer didn't make it in until 5.7.1. The OS requirements for 14.2 (which has Swift 5.7.2) are the same as those for 14.0.x.

#

(If you're running Ventura, I'd recommend updating to Xcode 14.3 so you can benefit from the additional features of Swift 5.8.)

cursive tide
#

I still run Monterey, so i will try update my Xcode to ver 14.2. Thank you for support

umbral wedge
#

Glad to help - and thanks for pointing up this issue; I'll also update the code in question to use the fallback for Swift <5.7.1 instead of 5.7.0 as it does now.

quick ivyBOT