Questions tagged [swift5.7]

Use this tag only for questions directly related to changes in version 5.7 of Apple's Swift programming language. Use the tag [swift] for more general language questions, or the tags [ios], [cocoa], [apple-watch] etc. for questions about developing on Apple platforms.

Swift 5.7 is a version of the Swift language developed by Apple and was released 12th September 2022 with Xcode 14.0.

The following language, standard library, and Swift Package Manager proposals were implemented in Swift 5.7.

Concurrency

Type System Enhancements

  • SE-0309: [Unlock existentials for all protocols]
  • SE-0326: [Enable multi-statement closure parameter/result type inference]
  • SE-0328: Structural opaque result types
  • SE-0341: Opaque Parameter Declarations
  • SE-0345: if let shorthand for shadowing an existing optional variable
  • SE-0346: Lightweight same-type requirements for primary associated types
  • SE-0347: Type inference from default expressions
  • SE-0348: buildPartialBlock for result builders
  • SE-0352: Implicitly Opened Existentials
  • SE-0353: Constrained Existential Types
  • SE-0358: Primary Associated Types in the Standard Library
  • SE-0360: Opaque result types with limited availability
  • SE-0361: Extensions on bound generic types

String Processing

  • SE-0350: Regex Type and Overview
  • SE-0351: Regex builder DSL
  • SE-0354: Regex Literals
  • SE-0355: Regex Syntax and Run-time Construction
  • SE-0357: Regex-powered string processing algorithms
  • SE-0363: Unicode for String Processing

Pointer Usability

  • SE-0333: Expand usability of withMemoryRebound
  • SE-0334: Pointer API Usability Improvements
  • SE-0349: Unaligned Loads and Stores from Raw Memory

Swift Package Manager

  • SE-0292: Package Registry Service
  • SE-0339: Module Aliasing For Disambiguation
36 questions
0
votes
2 answers

How do I pass data from a variable in a view to a view model class

I have data contained in a variable called selectedFolderId, and the intent of this is I want to pass this data in this variable into a class whereby I read contents of my database from firestore anytime the ShoppingListItemsView loads. I would…
Emere
  • 45
  • 4
0
votes
2 answers

How to add custom value in charts for bottom label in swift iOS

I have to show [0, 25, 50, 75, 100] with dollar sign in Charts using swift iOS var xValue = [25.0, 50.0] var dollarValue = ["$25", "$50", "$75", "$100"] Added in view didLoad rightAxis.valueFormatter = IndexAxisValueFormatter(values: …
sham
  • 115
  • 9
0
votes
1 answer

Sheet wont dismiss if item changed while animating

I'm running XCode Beta 14.0 beta 3 although i dont think that's the issue. I have an app that has custom callbacks based on an AVCaptureSession in a dynamic Library called Engine. The enum/protocol listed below: public enum EngineState { case…
Jason
  • 11
  • 3
0
votes
1 answer

Protocol '...' as a type cannot conform to '...' - A generic protocol of a generic protocol issue

I've been playing around with Swift and SwiftUI. I've been trying to come up with a delegate based data store for various "data entities", the intention been to be able to replace the underlying data store implementations while keeping the code…
MadProgrammer
  • 343,457
  • 22
  • 230
  • 366
-1
votes
1 answer

read local text file content get Nil in swift

I would like to read the content from one text file in swift the step I did is go to terminal and read/create a file go to Xcode, File -> add file to My Project and select the test_this file into project use the following code to read the…
jacobcan118
  • 7,797
  • 12
  • 50
  • 95
-1
votes
1 answer

SwiftUI and Swift 5.7: Issue with View protocol and Opaque Types

I have a compilation error when i try to return different custom views that conform to the View protocol from a method. Here is a simple example that describes the issue. I want to have a method that returns a different custom view based on the enum…
Nahuel Roldan
  • 633
  • 8
  • 13
1 2
3