Open cyrillelegrand opened 2 weeks ago
After further research, the problem also arises with the new Group(subviewsOf:transform:)
in iOS 18 (which coincidentally has the same API than this package).
This indeed seems like a bug in SwiftUI. I've filed a radar under #FB14070467 which you can feel free to duplicate.
Here's the attached demo project I sent to Apple. It both exhibits the problem with the new iOS 18 API, and with this package. As-is, it needs Xcode 16 to compile, but it also runs on Xcode 15 and iOS 16 when commenting out the few lines related to the new API.
Hi! I need to pass down custom environment values to my variadic children. I've noticed that this is impossible, see a minimal reproduction below:
Here is the result:
It should read
Test1 = 42
andTest2 = 42
. The system-provided environment (\.colorScheme
) is correctly passed down to each child, but not my custom environment value.It works if I do
but that's not what I want: in my actual project, the values can differ for each child, so I need it inside the
ForEach
.Is this a limitation from using a private-ish API like
_VariadicView
?I know this library might very well not be maintained for much longer because iOS 18 offers this natively, but my project targets iOS 16.