Skip to content

[Bug]: Using animation() Atom modifier on iOS16 causes a crash. #196

@kenmaz

Description

@kenmaz

Checklist

  • This is not a bug caused by platform.
  • Reviewed the README and documentation.
  • Checked existing issues & PRs to ensure not duplicated.

What happened?

Using .animation() on iOS16 simulator and actual device causes a crash.
You can reproduce this bug by modifying one line in Example app.

--- a/Examples/Packages/CrossPlatform/Sources/ExampleCounter/ExampleCounter.swift
+++ b/Examples/Packages/CrossPlatform/Sources/ExampleCounter/ExampleCounter.swift
@@ -8,7 +8,7 @@ struct CounterAtom: StateAtom, Hashable {
 }
 
 struct CounterScreen: View {
-    @Watch(CounterAtom())
+    @Watch(CounterAtom().animation())
     var count
 
     var body: some View {

Note that it works well on both iOS17 and 18

Expected Behavior

It should not crash.

Reproduction Steps

  1. Add .animation() modifier to any Atom
  2. Run it on iOS 16 simulator or actual iOS16 device
  3. Crash it when the atom is watched

Swift Version

Swift 6

Library Version

0.8.1

Platform

iOS

Scrrenshot/Video/Gif

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions