ios – Live activity not showing up


I’m having a problem where live activities are not showing up on either simulator or device 🙁 I’ve set the project and target to iOS 16.2, here is my code on how I call the activity:

    let a = SessionAttributes()
    let initial = SessionAttributes.ContentState(time: "king", exercise: "bja")
    let activityContent = ActivityContent(state: initial, staleDate: nil) 
    do {
        let activity = try Activity<SessionAttributes>.request(attributes: a, content: activityContent, pushType: nil)
        print(activity.id)

    } catch {
        print("error showing live activity")
    }

When calling this the activity id is printed to console without problem, but the live activity doesn’t show up. I’ve double checked so that live activities is indeed enabled for the app in the settings. I’ve tried to clear derived data. Thankful for any help!

Kind regards Pontus

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img