Live Activities Push-to-Start flows

Good morning,

We are implementing Live Activities in a push-to-start flow. We wrap the listener for push to start tokens in a high priority task:

if ptsListenerTask == nil || ptsListenerTask?.isCancelled == true {
    ptsListenerTask = Task(priority: .high) { [weak self] in
        for await pushToken in Activity<LiveAuctionAttributes>.pushToStartTokenUpdates {
        //Send token to back-end
     }
}

I've tried a few variations of this and they work well on most devices. I have seen a couple of devices that refuse to issue a push to start token.

The user will have logging for the init flow and starting the PTS listener then the logs just go silent, nothing happens.

One thing that seemed to work was getting the user to start a Live Activity manually (from our debugging tool) then the PTS token gets issued.

This is not very reliable and working a mock live activity into the flow for obtaining a PTS token is a poor solution.

Is anyone else seeing this and is there a known issue with obtaining PTS tokens?

Thanks!

Brad

Thank you for your post.

I appreciate the code provided. I always recommend developers to review this step-by-step process, starting with updating the Live Activity as it processes the starting push notifications token and then updating the push notifications. https://developer.apple.com/documentation/activitykit/starting-and-updating-live-activities-with-activitykit-push-notifications

Also in all cases the user allows the live activity correct?

You can also provide a focused sample project so that we can observe how you are utilizing the starting token and update token. The code you provided is commendable, but it does not provide a comprehensive understanding of your approach. It would be beneficial if you could also observe the live activity in the code. We eagerly anticipate the completion of your code.

Do you get the same results with just the relevant code in a small test project? If so, please share a link to your test project. That'll help us better understand what's going on. If you're not familiar with preparing a test project, take a look at Creating a test project.

Albert Pascual
  Worldwide Developer Relations.

Thanks for the quick response!

I will work on that today. We've seen this happen on two devices so far with no correlation on iOS version or device. Considering our test group is only about 10 people the implication is concerning.

I'll post here with a reply when I get the test project set up and sent to QA to see if we can reproduce it.

Looking forward to your sample! Can you tell me the iOS versions of those 2 devices?

Albert Pascual
  Worldwide Developer Relations.

The device I have on-hand is 18.3 but I've seen this happen across various versions of iOS. I updated my Test project again and also I have more information to add to my comment.

Included in my Test project is my debugging utility that we are using internally. It tracks changes to a @MainActor @Published variable that holds a list of push-to-start tokens labeled "Push-to-start tokens".

It appears getting a push-to-start token works when running from source. If you run the app you'll notice a token in the list. However, if you force close the test app then open it again you'll notice the push-to-start token is not given. You can then start an activity and a push-to-start token is provided.

Force close the app then start it again and you have the same situation.

https://github.com/bradp-dev/ios-test-projects/tree/main/liveactivitiestest

Since we weren't making any progress on this we decided to launch with some mitigation measures but we are still seeing this happen in close to half of our users. The other half are able to get push-to-start tokens on start easily.

@DTS Engineer

We have error reporting hooked up to a third party vendor. In the event that a device doesn't receive a push-to-start token 10 seconds after APNS has sent token via our delegate I send off a report and this is the list of devices that have reported this problem:

  • iPhone 17 Pro Max
  • iPhone 17 Pro
  • iPad (A16)
  • iPhone 16e
  • iPhone 16 Pro Max
  • iPhone 16 Pro
  • iPhone 16 Plus
  • iPhone 16
  • iPhone 15 Pro Max
  • iPhone 15 Pro
  • iPhone 15 Plus
  • iPhone 15
  • iPhone 14 Pro Max
  • iPhone 14 Pro
  • iPhone 14 Plus
  • iPhone 14
  • iPad Pro 12.9 inch 6th Gen
  • iPad 10th Gen
  • iPhone SE 3rd Gen
  • iPhone 13 Pro Max
  • iPhone 13 Pro
  • iPhone 13 Mini
  • iPhone 13
  • iPad mini 6th Gen (WiFi)
  • iPad 9th Gen (WiFi+Cellular)
  • iPad 9th Gen (WiFi)
  • iPhone 12 Pro Max
  • iPhone 12 Pro
  • iPhone 12 Mini
  • iPhone 12
  • iPhone SE 2nd Gen
  • iPhone 11 Pro Max
  • iPhone 11 Pro
  • iPhone 11
  • iPad Pro 12.9 inch 4th Gen (WiFi+Cellular)
  • iPad Pro 12.9 inch 4th Gen (WiFi)
  • iPad Pro 3rd Gen (12.9 inch, WiFi)
  • iPhone XR
  • iPhone XS

And list of OS versions:

  • iOS 26.2
  • iOS 26.1
  • iOS 26.0
  • iOS 18.7.2
  • iOS 18.7.1
  • iOS 18.7
  • iOS 18.6.2
  • iOS 18.6.1
  • iOS 18.6
  • iOS 18.5
  • iOS 18.4.1
  • iOS 18.3.2
  • iOS 18.3.1
  • iOS 18.3
  • iOS 18.2
  • iOS 18.1.1
  • iOS 18.1
  • iOS 18.0.1

@bradpriddy

Thank you for the post and the link to the code, this is really good with a great description as well as the comprehensive list of devices where the device fails to receive a push-to-start token.

I believe is a bug however, regrettably, I am not an expert in the APN start token and update token. However, I believe the most expedient course of action, to resolve the issue is to submit a bug report with a zip file containing the code you have provided and a concise summary of the problem.

Once you open the bug report, please post the FB number here for my reference.

If you have any questions about filing a bug report, take a look at Bug Reporting: How and Why?

Albert Pascual
  Worldwide Developer Relations.

@DTS Engineer I've submitted a Feedback report: FB21158660

@bradpriddy

Thanks so much for filing the bug and providing me the number. Please give our engineering team sometime as we are on a thanksgiving week.

You can see the status of your feedback in Feedback Assistant. There, you can track if the report is still being investigated, has a potential identifiable fix, or has been resolved in another way. The status appears beside the label "Resolution." We're unable to share any updates on specific reports on the forums.

For more details on when you'll see updates to your report, please see What to expect after submission.

Albert Pascual
  Worldwide Developer Relations.

Live Activities Push-to-Start flows
 
 
Q