Starting live activities. Some fail and they are not displayed.

Sometimes when I am creating a new live activity, no error is detected (try-catch) but the activity is not displayed.

do{

                        let act =  try Activity.request(attributes:activityAttributes,contentState: initialContentState)

                    }catch (let error){

                        print("Error creando la actividad en directo (error.localizedDescription)")

                    } I have checked if the activity has been added to Activity.activities but the array is empty.Any help? I don't know why some activities are created without problems but others fail.

I finally found the problem. I am using svg images in widgets and I had not checked "Preserve vector data". Once the flag was checked the problem has disappeared. I hope this helps someone.

Accepted Answer

I finally found the problem. I am using svg images in widgets and I had not checked "Preserve vector data". Once the flag was checked the problem has disappeared. I hope this helps someone.

Starting live activities. Some fail and they are not displayed.
 
 
Q