Post

Replies

Boosts

Views

Activity

Reply to Decoding Error when starting a Live Activity via Push Notification
After thinking a bit more, I understand the problem. the decoder already is set to use Dates in Seconds from Epoch format, as the JSON includes the timestamp. Then any other dates as part of the attributes, need the same format Which looking back, makes total sense. It was difficult to build the live activity without knowing that the date was the problem and no other property
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
Reply to EXC_BAD_ACCESS crash in some Swift Testing test on a macro
As extra context. I realized the test was "wrong", instead of testing #expect(viewModel.isSavedSearchButtonDisabled) I needed to test #expect(viewModel.isSavedSearchButtonDisabled == false) With this change, the test passed correctly without crashing. This implies that this crash happens on test failures Also, If I wrote the expectation like #expect(viewModel.savedSearchState == .active && viewModel.isSavedSearchButtonDisabled) The test would fail (as per logic), but it wouldn't crash. huh?
Dec ’24