Skip to content

Attachment saving SwiftUI xcode warning #1185

@agiguere

Description

@agiguere

SDK 25.8.0

I am using the AttachmentGroup with the operation CameraMenuItem

so far so good but Xcode complaint about this warning

\PurchaseOrderDetailsViewModel.attachmentUrls is isolated to the main actor. Accessing it via Binding from a different actor will cause undefined behaviors, and potential data races; This warning will become a runtime crash in a future version of SwiftUI.

I annotated my ViewModel property like so
@mainactor @published var attachmentUrls = URL

Image Image

thanks

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions