In Home Assistant App we access realm from the Widgets extension and since iOS 18 betas, when accessing Realm directly from the AppIntentProvider it is now crashing with 'Realm accessed from incorrect thread.' while if dispatched in main queue the issue does not happen.
BUT
If dispatched in the main queue then it crashes in iOS 17
How frequently does the bug occur?
-- select --
Description
In Home Assistant App we access realm from the Widgets extension and since iOS 18 betas, when accessing Realm directly from the AppIntentProvider it is now crashing with 'Realm accessed from incorrect thread.' while if dispatched in main queue the issue does not happen.
BUT
If dispatched in the main queue then it crashes in iOS 17
Home Assistant PR with the workaround used to prevent that: https://github.com/home-assistant/iOS/pull/2919
Stacktrace & log output
No response
Can you reproduce the bug?
Always
Reproduction Steps
No response
Version
10.35 (But also tested in 10.52.2)
What Atlas Services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
iOS 18 and 18.1 (Betas 6 and 2)
Build environment
Xcode version: 15.4 Dependency manager and version: Cocoapods, RealmSwift 10.35