iOS18 Live Activity failed to show sometimes

In a music streaming app, when using Activity.request to activate the Dynamic Island, the system’s Now Playing interface appears correctly. However, the app's live activities, lock screen, and other related features fail to display properly.

During debugging, the following code is used:

    activity = try Activity.request(attributes: attributes, contentState: contentState, pushType: .token)
    if !NMABTestManager.default().is(inTest: "FH-NewLiveActivityPush") {
        // Listen to push token updates
        if activity != nil {
            tokenUpdatesTask?.cancel()
            tokenUpdatesTask = Task.detached {
                for await tokenData in self.activity!.pushTokenUpdates {
                    let mytoken = tokenData.map { String(format: "%02x", $0) }.joined().uppercased()
                    // pushToken is Data, needs to be converted to String using the above method before being passed to the server
                    self.pushToken = mytoken
                }
            }
        }
    }
} catch (let error) {
    print("Error Starting Live Activity: \(error.localizedDescription)")
}

In this scenario, the push token is returned correctly, and no errors are triggered.

This issue did not occur in iOS 17 but appears sporadically in iOS 18. Once it occurs, it cannot be resolved through restarting or other means.

feedbackid:FB14763873, i upload my sysdisagnose

@Highmore are you creating a now playing experience with your Live Activity. If so, there isn't a supported update your LA interface. Please tell more about what your LA is doing.

Debugging Tips: The best first course of action here would be to use Console.app to monitor to the relevant processes related to your app and extensions.

A good way to start would be with filtering by the BundleID of the target and / or the target name itself (the process name). Also be sure to check the system processes for additional information. This will vary based on what and where you are looking but some examples: To debug APNS you'll want to monitor apnd along with other relevant processes. To debug WidgetKit, LiveActivities, Dynamic Island you'll want to monitor springboardd, liveactivitiesd along with other relevant processes.

Rico WWDR - DTS - Software Engineer

Purpose of the Live Activity (LA): The app is designed for music, and when switching tracks, it updates the content on the Dynamic Island based on push notifications. The issue doesn’t occur during the update phase but rather when the app is in the foreground and the Live Activity is initiated, which leads to an anomaly.

Exception Case:

Xcode 5 beta 5, iOS 18.1: The issue was also present in iOS 18.0, where the Live Activity failed to start. Currently, this problem is happening with the debug build, but the live version of the app (App Store version) on the same device is functioning normally, with no differences in the code.
Previously in iOS 18.0: The live version of the app also experienced similar anomalies, but sometimes it would mysteriously resolve on its own, with no apparent pattern.

Same Xcode & Code, Different Device (iOS 18.0): On another device running iOS 18.0, the Live Activity works perfectly. Console Log: Strangely, at 11:11:55.567636+0800, liveactivitiesd logged "Activity started: 553CD722-C06B-4615-89A9-787EB8E5951B." There is a clear record of a successful start, but it’s unclear what the issue might be at this point.

I’ve attached the log file link. I’d appreciate any help in analyzing the logs. Thank you!

iOS18 Live Activity failed to show sometimes
 
 
Q