@Shared crashes app
Closed this issue · 0 comments
K3TZR commented
Description
Using 1.10.1 If I add the following to my State my app compiles but crashes at runtime
@Shared(.appStorage("testNil")) var testNil :String? = nil
In general, any optional String with a nil initial value causes a crash
Checklist
- I have determined whether this bug is also reproducible in a vanilla SwiftUI project.
- If possible, I've reproduced the issue using the
main
branch of this package. - This issue hasn't been addressed in an existing GitHub issue or discussion.
Expected behavior
No crash
Actual behavior
Steps to reproduce
- just add this line to State
@shared(.appStorage("testNil")) var testNil :String? = nil
The Composable Architecture version information
1.10.1
Destination operating system
macOS 14.4.1
Xcode version information
15.3
Swift Compiler version information
swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: arm64-apple-macosx14.0