Hi,
We need Wallet Boarding Pass Live Activity style countdown inside Live Activity.
Requirements
Show only hours+minutes (no seconds ever).
Format examples (Turkish locale concept):
T > 60 min: "1sa 14d" (HHh MMm)
T < 60 min: "58d"
At exactly zero show a single final zero value (e.g. "0d").
Do NOT show seconds or any upward (elapsed) counting after zero.
When remaining time < 0 immediately replace display with status text (e.g. "ON TIME").
Never display negative or increasing elapsed time.
Discovered Current Timer Methods (Observed)
Method 1 (Text(date, style: .relative)):
After reaching target it continues counting UP (should stop).
Seconds appear automatically once remaining < 1 hour.
Method 2 (Text(date, style: .timer)):
After reaching target it continues counting UP (should stop).
Seconds are always visible from start.
Method 3 (Text(timerInterval: Date.now ... targetDate, countsDown: true)):
Stops at target (no upward counting) but seconds are always visible; cannot limit to single zero then freeze before status swap.
Requested Enhancement
Provide a behavior where the countdown displays hours+minutes, renders a single zero-minute value at the boundary (no seconds), then transitions to supplied status text.
Request
Public API or configuration to:
Select displayed units (hours, minutes only).
Stop automatic updating after rendering the zero frame (prevent upward counting).
Prevent post-target elapsed counting (no positive re-growth).
Allow immediate swap-to-text after zero (remaining < 0) while permitting a single zero display at the boundary.
Why
Align UX with Wallet; need predictable single zero then status, no seconds, no elapsed confusion.
Thank you.
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
We currently have the need to develop Smart Island. We need to identify whether the current mobile phone supports Smart Island. At present, the solution we can think of is to maintain a model list if the current phone is in the white list, it supports Smart Island. But we think this method is not good enough. Is there a better solution to support identification? In addition, will the later models support smart Island?
Topic:
App & System Services
SubTopic:
Widgets & Live Activities
My widget has a background color set, but after the system sets custom transparency, my widget displays a blank space. I would like to solve this problem by obtaining the system's custom transparency settings and then setting the background color transparency, or do you have a better way to solve this problem
Topic:
App & System Services
SubTopic:
Widgets & Live Activities
import AppIntents
struct AddTodoIntent: AppIntent {
static var title: LocalizedStringResource = "Add Todo"
static var openAppWhenRun: Bool = true
func perform() async throws -> some IntentResult & ProvidesDialog {
.result(dialog: "New todo added successfully.")
}
}
struct ViewTodosIntent:AppIntent {
static var title: LocalizedStringResource = "View Todos"
func perform() async throws -> some IntentResult & ProvidesDialog {
.result(dialog: "Here are your todos...")
}
}
struct TodoAppShortcuts: AppShortcutsProvider {
static var appShortcuts: [AppShortcut] {
AppShortcut(
intent: AddTodoIntent(),
phrases: ["\(.applicationName) Add a new todo"],
shortTitle: "New Todo",
systemImageName: "plus.circle"
)
AppShortcut(
intent: ViewTodosIntent(),
phrases: ["\(.applicationName) Show my todoso"],
shortTitle: "Show todos",
systemImageName: "plus.app"
)
}
}
when we used, it wrong
How did i can do it success?
Q1. Can you place a sound on an end event? That doesn't seem to work for us
Additionally:
Q2. Is there any way that after you send the end event, still have the Live Activity remain on the Dynamic Island until the dismissal-date?
Currently when an end event is sent, it's abruptly ended from the Dynamic Island without any sound. Users are confused until minutes/hours later they see their Lock Screen.
I want to add my app to Controls, just a button to open the app. The end goal is to put it on a lock screen. However, I can get it to work on the iPhone simulator, but I am unable to get it on my actual device. No warnings or failed build or signing issues. I feel like I have changed and tinkered everything. I feel like my code is correct, so maybe it's an issue of the signing? I am lost. Running the control center stuff through Widgetkit.
Hello,
I would like to inquire about a specific behavior I've observed with Live Activities to determine if it is a bug.
When our application is closed but the device is in use, an alarm triggers a Live Activity to appear at the top of the screen. However, it seems that tapping the background area of this Live Activity does not trigger the .widgetURL and .onOpenURL
Could you please confirm if this is the intended behavior? or should I config another setting for desired action like trigger .onOpenURL?
Thank you for your time and assistance.
Best regards,
Hello,
We have observed a change in the presentation behavior of the AlarmKit Live Activity banner when our application is in the foreground, following the update from iOS 26.0 to iOS 26.1.
We would like to clarify which behavior is intended.
In iOS 26.0: When our application was in the foreground, the AlarmKit Live Activity banner did not present.
In iOS 26.1: The AlarmKit Live Activity banner now presents even when our application is in the foreground.
Could you please advise on what the correct or desired behavior is for this scenario?
Thank you for your clarification.
Topic:
App & System Services
SubTopic:
Widgets & Live Activities
I have developed a LiveActivity on my product that supports DynamicIsland. Recently, two users encountered this situation while updating the app:
LiveActivity was created with a status of. active, but after 100ms, it immediately started displaying as. dimiss. This process was repeated many times until the user restarted their iPhone and the display became normal
A user's LiveActivity was successfully created with a status of. active, and the data was updated using the. update method normally; But this user's interface keeps showing a gray component empty state
I am unable to obtain useful information regarding the bug encountered in processing. I would like to know how to obtain the reason why the user's LiveActivity has been modified to. dimiss by the iOS system in the face of these situations; How can I obtain useful information to determine the cause of the error when the user interface cannot display data without debugging.
Thank you~
Hey!
I'm working on enabling remotely started live activities. I'm running into 2 crashes:
Upon initializing ActivityAuthorizationInfo
Upon calling Activity<...>.activities array
Both stack traces look like this:
0 libsystem_kernel.dylib +0xce0 _mach_msg2_trap
1 libsystem_kernel.dylib +0x4398 _mach_msg2_internal
2 libsystem_kernel.dylib +0x42b4 _mach_msg_overwrite
3 libsystem_kernel.dylib +0x40fc _mach_msg
4 libdispatch.dylib +0x1cc04 __dispatch_mach_send_and_wait_for_reply
5 libdispatch.dylib +0x1cfa4 _dispatch_mach_send_with_result_and_wait_for_reply
6 libxpc.dylib +0x107ec _xpc_connection_send_message_with_reply_sync
7 BoardServices +0xaea8 -[BSXPCServiceConnectionMessage _sendWithMode:]
8 BoardServices +0x17938 -[BSXPCServiceConnectionMessage sendSynchronouslyWithError:]
9 BoardServices +0xeef0 ___71+[BSXPCServiceConnectionProxy createImplementationOfProtocol:forClass:]_block_invoke
They happen to a limited number of users, but not insignificant. Most are on iOS 18.6.2 and iOS 26.1, but there are others in the mix. I don't have a repro myself. It looks like the main thread gets blocked after we receive no response from these ActivityKit APIs. Both of these are called inside application:didFinishLaunchingWithOptions:.
For ActivityAuthorizationInfo, we need the app to communicate with the server whether the user has live activities enabled; hence, calling this object's init as early as possible in the app.
For activities array, I'd like to do some logging whenever the live activity is started or ended (for example, if activities array no longer contains any activities, we can log the activity as dismissed). For this logging to happen, as far as I understand, it has to happen inside didFinishLaunchingWithOptions since this is the only method being called upon the terminated app receiving background runtime when the live activity starts/ends remotely.
After some research, one potential reason is ActivityKit APIs are just not ready to return values via xpc connection at app startup, so moving these methods to applicationDidBecomeActive could resolve the problem. That's fine for ActivityAuthorizationInfo init, but for accessing activities, there is no other place in the lifecycle to see if an activity has been dismissed (especially in the scenario where app is terminated, so we get only 30 seconds ish of background runtime).
Curious if anyone has run into this or has any insights into ActivityKit API behavior.
The iap package typed with macos26 xcode26 crashed on ios12
add WidgetKit and set its Status to "Optional"
#if canImport(WidgetKit)
import WidgetKit
#endif
We have already modified the configuration in these two ways. There are no issues on ios13 and above systems, but it won't start on ios12. However, we want to support the lowest version of ios12. How can we solve this problem,The crash might still be the one below
dyld: Library not loaded: /System/Library/Frameworks/WidgetKit.framework/WidgetKit
Referenced from: /private/var/containers/Bundle/Application/CA01C3C8-5010-4EDC-8089-058A3A4E79E7/bodianplayer.app/bodianplayer
Reason: image not found
Topic:
App & System Services
SubTopic:
Widgets & Live Activities
I'm developing car control software that allows unlocking via a widget.
Currently, it executes through appintents within the main application. It works fine if the app is active, but fails if the app is killed. (The car control SDK must be in the main application). How can I resolve this issue?
Topic:
App & System Services
SubTopic:
Widgets & Live Activities
I've created a Snippet for my iOS app which I want to be able to run from the LockScreen via a Shortcuts widget.
All works fine except when I run the shortcut and the App Snippet appears, it doesn't always render the SwiftUI view in the same way.
Sometimes the width boundaries are respected and sometimes not.
I've tested this on iOS 26.1 and iOS 26.2 beta 3
I think this is a bug but it would be great if anyone could see what I might be doing wrong if it's not.
Incase it is a bug I've filed a feedback (FB21076429) and I've created a stripped down sample project showing the issue and added screenshots showing the issue.
Basic code to reproduce issue:
// Intent.swift
// SnippetBug
import AppIntents
import Foundation
import SwiftUI
struct SnippetEntryIntent: AppIntent {
static let title: LocalizedStringResource = "Open Snippet"
static let description = IntentDescription("Shows a snippet.")
// Don’t open the app – stay in the snippet surface.
static let openAppWhenRun: Bool = false
func perform() async throws -> some ShowsSnippetIntent {
.result(snippetIntent: TestSnippetIntent())
}
}
struct TestSnippetIntent: SnippetIntent {
static let title: LocalizedStringResource = "Snippet Intent"
static let description = IntentDescription("Action from snippet.")
@MainActor
func perform() async throws -> some IntentResult & ShowsSnippetView {
.result(view: SnippetView(model: SnippetModel.shared))
}
}
@MainActor
final class SnippetModel {
static let shared = SnippetModel()
private init() {
}
}
struct SnippetView: View {
let model: SnippetModel
var body: some View {
HStack {
Text("Test Snippet with information")
Spacer()
Image(systemName: "heart")
}.font(.headline)
}
}
struct Shortcuts: AppShortcutsProvider {
static var appShortcuts: [AppShortcut] {
AppShortcut(
intent: SnippetEntryIntent(),
phrases: [
"Snippet for \(.applicationName)",
"Test Snippet \(.applicationName)"
],
shortTitle: "Snippet",
systemImageName: "barcode"
)
}
}
You also need these lines in your main App entry point:
import AppIntents
@main
struct SnippetBugApp: App {
init() {
let model = SnippetModel.shared
AppDependencyManager.shared.add(dependency: model)
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
This is correct
This is incorrect
I built a couple of app intents for macOS, which generally work great. However, I'm struggling with configuring an app intent that takes a parameter, so that it doesn't require the app to launch before presenting people with the list of options.
If the app is running and I run the intent in Spotlight, I can see the message defined by the intent's parameterSummary and I can select a parameter from the list of entities.
If the app is not running, it is launched first and only then the intent message fully populates in Spotlight and allows parameter selection.
What I've tried:
Support background or deferred mode in the intent.
Conformed the entities to IndexedEntity.
Conformed the entity query to EnumerableEntityQuery, implementing suggestedEntities and allEntities.
Conformed the entity query to EntityStringQuery.
Donated the intent to Spotlight on app launch.
Donated the entities to Spotlight on app launch, both using indexSearchableItems and indexAppEntities. Not sure if both are required or if the latter is just a more convenient version of the former.
Do I have to conform to or implement something else?
Do I need to work with an app intent extension? If so, would I put all app intent code into the extension instead of the main app?
Is this a system bug I should file?
Topic:
App & System Services
SubTopic:
Widgets & Live Activities
Tags:
Extensions
macOS
Core Spotlight
App Intents
(I truly appreciate all the responses you all have written for me :bow: )
I was under the assumption that for Live Activity, in order for you to be able to update the Activity, you need an update token. And for the OS to issue you the update token, user must hit the "Allow" from the lock screen.
However based on these screenshots it seems that you don't need to hit "Allow" to be able to update the Live Activity.
Live Activity was updated — even without the user hitting "Allow"
So now I'm wondering if:
Is hitting Allow required for the update token to get issued? Or that assumption is incorrect? In our tests (when connected to Proxyman, the OS emits the update token after user hits "Allow" / "Always Allow")
If you don't hit allow, are there alternate ways to update the Live Activity without having the update token?
I'm guessing you could set a short stale time and then when the OS launches the app in the background you query the server and then update the Live Activity. Is that a worthy approach?
I also noticed that the "The Philly Inquirer" App has 'Background App Refresh" enabled, but this happened in 2 minutes. In our architecture assessments, after reviewing Apple's docs on 'Background Processing", we didn't think of it as a viable option, because it can't guarantee if the OS is given time in the next 2 minutes or 10 hours later when the phone is getting charged again.
Are any of these workarounds viable or are there alternate approaches?
Our requirement is:
be able to use Live Activity between 2-72hrs after app install. (I mention this because perhaps Apple may impost some restrictions for new installs)
be able to update an active Live Activity within 1-2 minutes after it has began.
I’m manipulating some data inside a widget extension, and at the same time there is an active Live Activity (Dynamic Island / Lock Screen).
How can I update the Live Activity’s local notification when the data changes?
I tried accessing the current activity using Activity.activities, but it seems that this API is not accessible from inside the widget extension. What is the correct way to refresh or update the Live Activity in this case?