swift-macro Questions
3
Solved
I just added my first Xcode 15, Swift 5.9 macro from an open source package that I'm referencing via Swift Package Manager. The first time I compiled locally, I had to trust the macro's package via...
Erotic asked 10/10, 2023 at 17:33
2
I'm using MetaCodable macro in my project, installed via SwiftPM, when I try to build the project using Microsoft Azure's Pipeline using my local machine as a run agent (MBP M1 Max - Sonoma - XCode...
Humane asked 30/10, 2023 at 7:9
1
I couldn't find a way to preview my SwiftUI views on multiple devices using the new XCode 15's #Preview macro.
It was working with XCode 14 and was showing side-by-side previews on the canvas, each...
Apotheosize asked 27/9, 2023 at 15:32
2
Solved
“Expand Macro” stays gray even though I’ve seen the @Observable macro expanding earlier.
However when I manually trigger build error it does expand the location of the error. In this case I target...
Alsatia asked 19/11, 2023 at 19:54
1
Did something change as far as how to use #Preview macros in Xcode 15 Beta 8? This code used to work fine but now no longer compiles because of == PREVIEW UPDATE ERROR: CompileDylibError: Failed to...
These asked 4/9, 2023 at 14:42
1
Solved
I'm trying to use the new Swift Macros using @Observable and @Environment with the following code:
import SwiftUI
import Observation
@Observable class Note {
var text = ""
}
struct Con...
Pablo asked 24/6, 2023 at 13:5
1
Solved
I'm fiddling around with the new Swift 5.9 Macros.
I have the following macro:
Given the following enum
@associatedValues
enum Fruit {
case banana(Banana)
case grape(Grape)
}
I want
@associatedV...
Longmire asked 9/6, 2023 at 6:40
1
© 2022 - 2024 — McMap. All rights reserved.