Updating a value with local notification action

Hi everyone,

I am trying to update the "repeatNumber" value that I created in a struct.

struct ItemModel: Identifiable, Codable  {     let id: String     let title: String     let detail: String     let isCompleted: Bool     let repeatNumber: Int // <--- }

I have a class named ListViewModel that conforms NSObject, ObservableObject, UNUserNotificationCenterDelegate. In this class I have userNotificationCenter "didReceive" function to control notification action responses but I could not reach and change the repeatNumber value.

I hope you guys help me and I will be appreciated.

Thanks.

Please add some actual code (and use the "Code Block" button to format it correctly), and we'll see if we can help.

Updating a value with local notification action
 
 
Q