Hi All,
I’m working on a football live score app with Dynamic Island support, using iOS 18 Broadcast Notifications for Live Activities. Our workflow is:
We use the Push-to-Start token to initiate the Live Activity.
For updates, we use the Channel ID.
Start, update, and end events for Live Activities are all handled via remote notifications.
We tested on 3-4 devices simultaneously, but noticed inconsistent UI updates: some devices update properly while others do not, even when using the same Channel ID.
Checking the notification console dashboard, last week we had around 1,397 notifications published but only 555 delivered — a significant discrepancy. All devices are active and connected to reliable internet, so we’re unsure why delivery rates are so low.
Additional details:
For the start event, we set notification priority to 10.
For updates, we lowered priority to 5 per Apple’s documentation, to reduce throttling.
This adjustment improved the situation compared to sandbox testing where all notifications were priority 10.
Despite this, during weekend matches, we observed a drastic drop: out of 140 published notifications, only 2 were delivered.
This large delivery gap risks missing critical update deadlines in our app. Could anyone help us understand what might be causing this and how to improve notification delivery reliability?
Thanks in advance!
Widgets & Live Activities
RSS for tagDiscuss how to manage and implement Widgets & Live Activities.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi all,
I'm currently implementing Live Activities using ActivityKit and facing a real-world limitation that I hope the community (or Apple) can clarify.
🔹 I can successfully start a Live Activity via APNs push (event: "start") even when the app is terminated — the Live Activity appears as expected on the Lock Screen and Dynamic Island.
However, I need to update that Live Activity using the name I assigned in the push payload (e.g., match-123). This requires calling:
Airship.channel.trackLiveActivity(activity, name: activity.attributes.matchID)
…or equivalent code in native implementations to associate the activity with its push token.
❓The problem:
If the user has never launched the app, or hasn't opened it after the Live Activity was started via push, then there’s no chance for the app to run this tracking code.
So:
✅ Live Activity starts fine via APNs
❌ I can't track the activity and register it for future push updates (by name) until the app is launched
❌ Therefore, I can't update the Live Activity without knowing the token-name mapping
🔍 My question:
Is there any way to programmatically track or associate a Live Activity (started via push) with a name for APNs updates, without requiring the app to launch?
Or put differently:
Can the system automatically track the name → token mapping if the activity is started via push?
Is there any way (via entitlement, plist config, or system event) to allow registering the activity in the background (without user launch)?
💡 Notes:
I already use pushType: .token and NSSupportsLiveActivitiesFrequentUpdates
Live Activity content is fine; only the ability to send future updates is blocked without initial app launch
Using Airship SDK for push + activity tracking, but the question is general to iOS + ActivityKit behavior
Any insight on how apps like FotMob, Uber, or sports apps handle this situation would be really helpful!
Thanks in advance.
Topic:
App & System Services
SubTopic:
Widgets & Live Activities
Tags:
APNS
User Notifications
WidgetKit
ActivityKit
I have start new live activity with push notifications,but sometimes this code"activity.pushTokenUpdates" can not callback to me,so I can't update the activity with push notifications. And I already click “Allow” button in my live activity widget.How can I solve this problem.
Here are my code:
fileprivate func observeLiveActivityForRemoteCreate() {
// obverser pushToStartToken
Task {
if #available(iOS 17.2, *) {
var beforeToken = ""
for await pushToken in Activity<HLPlatformActivityAttributes>.pushToStartTokenUpdates {
let pushTokenStr = pushToken.map{String(format: "%02.2hhx", arguments: [$0])}.joined()
// avoid send duplication
if beforeToken == pushTokenStr {
return
}
beforeToken = pushTokenStr
// send pushToStartToken to service
await HLPlatformLiveActivityBridge.registerLiveActivity(withAttributesName: self.activityAttributesName, pushToStartToken: pushToken, seq: seqCreate(), pushType: .jPush)
}
}else {
// Fallback on eralier versions
}
// obverser live activity update
Task {
for await activity in Activity<HLPlatformActivityAttributes>.activityUpdates {
if let businessLiveActivityId = activity.attributes.businessLiveActivityId, let liveActivityId = activity.attributes.liveActivityId {
Task {
var beforeToken = ""
for await pushToken in activity.pushTokenUpdates {
// here the problem:sometimes pushToken not update to me
let pushTokenStr = pushToken.map{String(format: "%02.2hhx", arguments: [$0])}.joined()
// avoid send duplication
if beforeToken == pushTokenStr {
return
}
beforeToken = pushTokenStr
// send pushToken to service
}
}
Task {
for await stateUpdate in activity.activityStateUpdates {
if stateUpdate == .active {
// live activity create
}
}
}
}
}
}
}
I know for start events, sending the timestamp isn't required. So that's easy.
However when I'm testing Live Activity using the Apple Push Notification Console. A lot of times I just need to copy/paste the payload and resend it again.
But then the timestamp field needs to get updated each time, because if it's from a time in the past, then it won't trigger.
This requires me to have to use an EPOCH converter to find the right time and then copy/paste it.
Is there a better solution to this? I know I can use curl, but that is not in the scope of my question.
I am building a widget that supports 2 different widget kinds, each supporting systemSmall, systemMedium, and systemLarge size families.
My widget does download and display images so I expect memory usage to be on the higher end, but in debugging some memory issues, I notice that when I build my widget scheme to a physical device, things start off reasonable at ~12MB of memory usage. But as I change the widgets intent, add the other widget kind, or add different widget size families, this memory usage grows until it ultimately hits the 30MB cap.
My question is, is the 30MB memory limit spread across all my supported widget kinds/sizes? Or does each individual widget get its own 30MB cap?
i.e., if I have systemMedium Widget A and systemLarge Widget B, are they sharing that 30MB memory limit?
Topic:
App & System Services
SubTopic:
Widgets & Live Activities
Tags:
Extensions
Instruments
Debugging
WidgetKit
When I use the Activity.request method to start the Dynamic Island widget, there have been continuous crash reports online, Could you please provide some ideas on how to fix this crash? Thanks!
Crash backtraces:
0ActivityKitblock_copy_helper.101 (in ActivityKit)+21416
1CombinePublishers.FlatMap.Outer.receive(B.Output) (in Combine)+296
2Combineprotocol witness for Subscriber.receive(A.Input) in conformance Publishers.FlatMap<A, B>.Outer<A1> (in Combine)+20
3CombinePublishers.HandleEvents.Inner.receive(A.Output) (in Combine)+204
4Combineprotocol witness for Subscriber.receive(A.Input) in conformance Publishers.HandleEvents<A>.Inner<A1> (in Combine)+20
5CombineFilterProducer.receive(B) (in Combine)+2508
6Combineprotocol witness for Subscriber.receive(A.Input) in conformance FilterProducer<A, B, C, D, E> (in Combine)+20
7Combinepartial apply for closure #4 (C) in Publishers._Merged.request(Subscribers.Demand) (in Combine)+52
8CombinePublishers._Merged.guardedApplyDownstream<A>((C)) (in Combine)+180
9CombinePublishers._Merged.receive(A, Int) (in Combine)+400
10CombinePublishers._Merged.Side.receive(A) (in Combine)+20
11CombineJust.Inner.request(Subscribers.Demand) (in Combine)+692
12Combineprotocol witness for Subscription.request(Subscribers.Demand) in conformance Just<A>.Inner<A1> (in Combine)+20
13CombinePublishers._Merged.receive(subscription: Subscription, _: Int) (in Combine)+496
14CombinePublishers._Merged.Side.receive(subscription: Subscription) (in Combine)+20
15CombineJust.receive<A>(subscriber: A1) (in Combine)+420
16CombinePublishers.Merge.receive<A>(subscriber: A1) (in Combine)+380
17CombinePublisherBox.receive<A>(subscriber: A1) (in Combine)+104
18CombineAnyPublisher.receive<A>(subscriber: A1) (in Combine)+60
19CombinePublishers.RemoveDuplicates.receive<A>(subscriber: A1) (in Combine)+220
20CombinePublishers.HandleEvents.receive<A>(subscriber: A1) (in Combine)+300
21CombinePublisherBox.receive<A>(subscriber: A1) (in Combine)+104
22CombineAnyPublisher.receive<A>(subscriber: A1) (in Combine)+60
23CombinePublishers.FlatMap.receive<A>(subscriber: A1) (in Combine)+416
24CombinePublishers.RemoveDuplicates.receive<A>(subscriber: A1) (in Combine)+220
25CombinePublisherBox.receive<A>(subscriber: A1) (in Combine)+104
26CombineAnyPublisher.receive<A>(subscriber: A1) (in Combine)+60
27CombinePublishers.CompactMap.receive<A>(subscriber: A1) (in Combine)+440
28CombinePublisherBox.receive<A>(subscriber: A1) (in Combine)+104
29CombineAnyPublisher.receive<A>(subscriber: A1) (in Combine)+60
30CombinePublishers.SetFailureType.receive<A>(subscriber: A1) (in Combine)+420
31CombinePublishers.FlatMap.receive<A>(subscriber: A1) (in Combine)+416
32CombinePublishers.RemoveDuplicates.receive<A>(subscriber: A1) (in Combine)+220
33CombinePublisherBox.receive<A>(subscriber: A1) (in Combine)+104
34CombineAnyPublisher.receive<A>(subscriber: A1) (in Combine)+60
35CombinePublishers.CompactMap.receive<A>(subscriber: A1) (in Combine)+440
36CombinePublisherBox.receive<A>(subscriber: A1) (in Combine)+104
37CombineAnyPublisher.receive<A>(subscriber: A1) (in Combine)+60
38CombinePublishers.ReceiveOn.receive<A>(subscriber: A1) (in Combine)+660
39CombinePublisher.sink(receiveCompletion: (Subscribers.Completion<A.Failure>), receiveValue: (A.Output)) (in Combine)+316
40ActivityKitblock_copy_helper.101 (in ActivityKit)+33364
41ActivityKitblock_copy_helper.101 (in ActivityKit)+26716
42ActivityKitblock_copy_helper.101 (in ActivityKit)+53192
43ActivityKitblock_copy_helper.101 (in ActivityKit)+52408
44ActivityKitblock_destroy_helper.25 (in ActivityKit)+1140
45ActivityKitblock_destroy_helper.62 (in ActivityKit)+8220
46ActivityKitblock_destroy_helper.62 (in ActivityKit)+9364
47libswiftDispatch.dylibpartial apply for thunk for @callee_guaranteed () -> (@out A, @error @owned Error) (in libswiftDispatch.dylib)+24
48libswiftDispatch.dylibthunk for @callee_guaranteed () -> (@out A, @error @owned Error)partial apply (in libswiftDispatch.dylib)+12
49libswiftDispatch.dylibclosure #1 () in closure #1 (()) in OS_dispatch_queue._syncHelper<A>(fn: (()), execute: (), rescue: (Error)) (in libswiftDispatch.dylib)+188
50libswiftDispatch.dylibpartial apply for thunk for @callee_guaranteed () -> () (in libswiftDispatch.dylib)+24
51libswiftDispatch.dylibthunk for @escaping @callee_guaranteed () -> () (in libswiftDispatch.dylib)+24
52libdispatch.dylib__dispatch_client_callout (in libdispatch.dylib)+16
53libdispatch.dylib__dispatch_lane_barrier_sync_invoke_and_complete (in libdispatch.dylib)+52
54libswiftDispatch.dylibimplicit closure #2 (()) in implicit closure #1 (OS_dispatch_queue) in OS_dispatch_queue.asyncAndWait<A>(execute: ()) (in libswiftDispatch.dylib)+188
55libswiftDispatch.dylibpartial apply for implicit closure #2 (()) in implicit closure #1 (OS_dispatch_queue) in OS_dispatch_queue.sync<A>(execute: ()) (in libswiftDispatch.dylib)+72
56libswiftDispatch.dylibOS_dispatch_queue._syncHelper<A>(fn: (()), execute: (), rescue: (Error)) (in libswiftDispatch.dylib)+400
57libswiftDispatch.dylibOS_dispatch_queue.asyncAndWait<A>(execute: ()) (in libswiftDispatch.dylib)+136
58libswiftDispatch.dylibOS_dispatch_queue.sync<A>(execute: ()) (in libswiftDispatch.dylib)+60
59ActivityKitblock_destroy_helper.62 (in ActivityKit)+3272
60ActivityKitblock_destroy_helper.62 (in ActivityKit)+724
61ActivityKit___swift_store_extra_inhabitant_indexTm (in ActivityKit)+24928
62ActivityKit___swift_store_extra_inhabitant_indexTm (in ActivityKit)+23900
63 XXXApp static LiveActivityService.request()
......
Hi,
My iOS app's home screen widget content was implemented to base on the preferred language of my main app (e.g. my app has the following preferred language options with this order English, Japanese, Traditional Chinese, Korean, Simplify Chinese).
Say the main app is currently using English as their preferred language, I can change the preferred language in the iOS Settings -> Apps -> My App -> Preferred Language.
My widget's content will respect to the preferred language option that I selected with only exception if I switch back to English language and my Widget's content won't get updated. The Main app content is always update with respect to the selected preferred language.
My app and widget is working without any issue in iOS 18.
Other things that I had discovered during my testing under iOS 26, the "first" language appeared in my preferred language always being the issue (e.g. if the first language is Japanese , once I change to other languages and than switch back to Japanese, my widget content won't respect to this but the main app content are ok).
Any one has a similar issues regarding the preferred language?
Topic:
App & System Services
SubTopic:
Widgets & Live Activities
Tags:
Internationalization
Localization
I'm developing an app which will show the driver ETA and rendering the progress bar of the current ETA.
Intuitively the backend server sends the push notification every 3 seconds through firebase cloud message service to APNS so that the device can refresh the dynamic island smoothly.
But the live activity doesn't refresh as frequently as the backend service does.
It should refresh every 3 seconds but it turns out like refresh 30 ~ 60 seconds, sometimes it didn't refresh at all.
any body facing the same?
https://communities.apple.com/fr/thread/256121053
Topic:
App & System Services
SubTopic:
Widgets & Live Activities
I'm struggling to understand what the impact of this flag is.
Docs only say:
For devices running iOS 18 and iPadOS 18 or later, you can add input-push-token: 1 to your payload to start a Live Activity and receive a new push token. After you receive a new push token, you can use it to send updates to a Live Activity.
But things were working fine for iOS 17. Right?
Does it somehow make the OS emit update tokens faster/more successfully?
Should I include in all start, update, end events?
Does the alert only serve the following purposes:
required for start events
require for any event that needs to alert the user (with sound or having the live activity show in expanded presentation)
while its content DO NOT matter. Only the presence of the field and its attributes matter.
The only time its content matter are when the receiving device is an Apple Watch.
Is that correct?
Hi there,
I'm using WCSession to communicate watchOS companion with its iOS app.
Every time watch app becomes "active", it needs to fetch data from iOS app, which works e.g. turning my hand back and forth.
But only when the app is opened after it was minimised by pressing digital crown, it didn't fetch data. My assumption is that scenePhase doesn't emit a change on reopen.
Here is the ContentView of watch app:
import SwiftUI
struct ContentView: View {
@EnvironmentObject private var iOSAppConnector: IOSAppConnector
@Environment(\.scenePhase) private var scenePhase
@State private var showOpenCategories = true
var body: some View {
NavigationStack {
VStack {
if iOSAppConnector.items.isEmpty {
WelcomeView()
} else {
ScrollView {
VStack(spacing: 10) {
ForEach(iOSAppConnector.items, id: \.self.name) { item in
ItemView(item: item)
}
}
}
.task {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
loadItems()
}
}
.onChange(of: scenePhase, initial: true) { newPhase, _ in
if newPhase == .active {
loadItems()
}
}
}
fileprivate func loadItems() -> Void {
if iOSAppConnector.items.isEmpty {
iOSAppConnector.loadItems()
}
}
}
What could be the issue?
Thanks.
Best regards
Sanjeev
Live Activity: no value in pushTokenUpdates and pushToStartTokenUpdates not called after app restart
When running application after installation I get a value in pushTokenUpdates and also the call to pushToStartTokenUpdates returns with the token value.
But, if I kill the app and restart it again, there is no value in pushTokenUpdates and the call to pushToStartTokenUpdates does not return.
Am I suppose to use the push to start token from the previous application run?
is there a different solution?
After opening 5 live activities using live activity push-to-start push notifications, I clear them from lock screen.
From this point forward I am unable to open new live activities.
Device log shows:
Could not create a new activity from push notification: ActivityKit.ActivityAuthorizationError.targetMaximumExceeded
How can I handle such use case?
shouldn't the count of opened live activities be reduced once the user clears the live activities? is this a bug?
Hello everyone,
I'm developing an app for iOS 18 using SwiftData, with iCloud synchronization enabled. My app also includes an interactive widget that allows users to mark tasks as complete, similar to Apple's Reminders widget.
I'm facing a specific issue with how iCloud sync is triggered when changes are made from the widget.
My Setup:
Xcode 16
Swift 6 / iOS 18
SwiftData with iCloud Sync enabled.
An interactive widget using App Intents to modify the SwiftData model.
What's working correctly:
App to Widget (Same Device): If I mark a task as complete in the main app, the widget on the same device updates instantly.
Widget to App (Same Device): If I mark a task as complete using the interactive widget, the main app on the same device reflects this change immediately.
App to App (Across Devices): If I make a change in the app on my iPhone, it syncs correctly via iCloud and appears in the app on my iPad.
The Problem:
The synchronization issue occurs specifically when an action is initiated from the widget and needs to be reflected on other devices, or when a change from another device needs to be reflected in the widget.
Widget Change Not Syncing to Other Devices: If I mark a task as complete in the widget on my iPhone, the change does not sync to my iPad. The task on the iPad only updates after I manually open the main app on the iPhone.
Remote Change Not Syncing to Widget: Similarly, if I mark a task as complete in the app on my iPad, the widget on my iPhone does not update to show this change. The widget only refreshes with the correct state after I open the main app on the iPhone.
It seems that the widget's AppIntent correctly modifies the local SwiftData store, but this action isn't triggering the necessary background process to push the changes to iCloud. The sync only seems to happen when the main app, with its active ModelContainer, is brought to the foreground.
My goal is for any change made in the widget to be reflected across all of the user's devices in near real-time, without requiring them to launch the main app to initiate the sync.
Is there a specific API I need to call from my AppIntent to force a SwiftData sync, or a project capability I might be missing to allow the widget extension to trigger iCloud pushes?
Any help or guidance would be greatly appreciated.
Thank you!
My start live activity CURL is not starting my live activity and I keep getting a decoding failure even though my curl matches my content state so my live activity is not starting. heres my CURL
--header "apns-topic: MuscleMemory.KimchiLabs.com.push-type.liveactivity" \
--header "apns-push-type: liveactivity" \
--header "apns-priority: 10" \
--header "authorization: bearer eyJhbGciOiJFUzI1NiIsImtpZCI6IjI4MjVTNjNEV0IifQ.eyJpc3MiOiJMOTZYUlBCSzQ2IiwiaWF0IjoxNzU3NDYwMzQ2fQ.5TGvDRk5ZYLsvncjKwXIZYN78X88v5lCwX4fRvfl1QXjwv8tOtO2uoId27LQahXA3zqjruu_2YoOfqEtrppKXQ" \
--data '{
"aps": {
"timestamp": '"$(date +%s)"',
"event": "start",
"content-state": {
"plain_text": "hello world",
"userContentPage": ["hello world"]
},
"alert": { "sound": "chime.aiff" }
},
"attributes-type": "KimchiKit.DynamicRepAttributes",
"attributes": {}
}' \
--http2 https://api.sandbox.push.apple.com/3/device/802fe7b4066e26b51ede7188a7077a9603507a0fa6ee8ffda946a864e75aa139602861538d6fb12100afbe9a3338d6c7c799d947dfacb2ee835f0339ecdc3165c9ed7e54839f5a3b89b76a011f5826cc
and here is my content state
public struct ContentState: Codable, Hashable {
public var plainText: String
public var userContentPage: [String]
public enum CodingKeys: String, CodingKey {
case plainText = "plain_text"
case userContentPage
}
public init(plainText: String, userContentPage: [String]) {
self.plainText = plainText
self.userContentPage = userContentPage
}
}
public init() {}
}
Durante o teste Uso do iOS 26 houve Build erro.
Foi ativado o recurso de Adiantamento de senha por seguranca. Bloqueio com tela azul e CRUZ AZUL e solicitando Recorvey.
O iPhone foi Resetado para IOS 18.6.2 pela Revendedora próxima
solicito apoio ao usuário
I have an app that has a Core Data store for dates with descriptions that I'd like to present in a widget with countdown calculations. In the app I have a button that just equates an active calculation to the currently selected item in the database (using an EnvironmentObject). I gather I can't use this mechanism inside a widget, right?
The user could put tons of items into the database - so I'm sure I don't want to have an editable widget allowing them to pick. I suppose I could create an intent and allow an independent entering from the app - but that seems rather user hostile since they've already entered it for the app - and I'm still trying to support iOS15 which doesn't support that.
I did create an App Group and have the Core Data store available from within the widget, but I don't see how to allow the user to choose which date is active. I also want multiple widgets to be able to point to different dates. Any help would be appreciated. Thanks!
I'm having problems with my released app with iOS & WatchOS 26 support.
I've added AppIntentConfiguration support in the WatchOS app such that users can configure the complication. My complications also support multiple families and so I have slightly different configuration options available if its in the .accessoryRectangular slot or the .accessoryCircular one.
This works fine on Apple Watch when editing the Watch face. Here you can then select the configuration options fine and they are correct for the different variants.
However on iOS when configuring in the Apple Watch app on iPhone, the different complication size is ignored and the same configuration options are offered meaning they are wrong for one of them.
I created a sample project, here is the app intent code:
struct TestWidgetConfigurationIntent: AppIntent, WidgetConfigurationIntent {
static var title: LocalizedStringResource = "New Widgets with Configuration"
static var description = IntentDescription("Lots of stuff.")
static var isDiscoverable: Bool { return false}
init() {}
func perform() async throws -> some IntentResult {
return .result()
}
@Parameter(title: "Enable More Detail", default: true)
var moreDetail: Bool
@Parameter(title: "Enable Other Parameter", default: true)
var otherParameter: Bool
static var parameterSummary: some ParameterSummary {
When(widgetFamily: .equalTo, .accessoryRectangular) {
Summary("Test Info") {
\.$moreDetail
\.$otherParameter
}
} otherwise : {
Summary("Test Info") {
\.$moreDetail
}
}
}
}
In WatchOS you get the correct configuration options:
In iOS you do not, you get the same configuration option regardless of which family size you select:
This could be a bug so I've filed feedback FB20328319. Otherwise if anyone has insights, it would be very appreciated. This is all tested on the current iOS 26.0 and WatchOS 26.0 versions. Thanks!
Topic:
App & System Services
SubTopic:
Widgets & Live Activities
Tags:
WatchKit
watchOS
WidgetKit
App Intents
Often times myself and others have left flashlight on by accident. Burning it out for sometime of being in pocket or left on table the light stays on the whole time because of just not realizing it was on. The front of phone shows flashlight icon is white when light is on, but this is not good enough! The icon needs to be a bright red or some other color so user can see that the light is actually still on. This would help alot , ty
Topic:
App & System Services
SubTopic:
Widgets & Live Activities