Hi,
We’ve developed a workout app with a Live Activity feature to help users launch the mirroring view on iPhone, similar to the built-in workout app for biking activities.
While Live Activities are now available on watchOS 11, the integration feels a bit off for our Workout app. Is there a way to disable or exclude our Live Activity from appearing on watchOS?
Currently, when a user starts a workout, the Live Activity appears at the bottom of the screen, requiring users to tap the screen before they can use our app. The built-in Workout app doesn’t have this issue.
Additionally, our Live Activity appears in the Smart Stack, duplicating content with the built-in Workout Live Activity.
We’re unsure if we missed any keys or settings to exclude Live Activity from watchOS.
Post
Replies
Boosts
Views
Activity
Hi,
I have some questions about the new AssistantSchema.CameraEnum.captureDevice introduced with iOS 18 beta 4.
Here's the context. I create a intent:
@AssistantIntent(schema: .camera.setDevice)
struct SetDeviceIntent {
var device: CaptureDevice
func perform() async throws -> some IntentResult {
.result()
}
}
@AssistantEnum(schema: .camera.captureDevice)
enum CaptureDevice: String {
case front
case back
case ultrawide
}
Some CaptureDevice cases are not available on some devices. e.g: CaptureMode.ultrawide is only available on iPhone, not on iPad.
How can we make CaptureDevice dynamic? I don't think AppEnum supports @Dependency or something else.
Hi,
I have some questions about the new AssistantSchema.CameraEnum.captureMode and AssistantSchema.CameraEnum.captureDevice introduced with iOS 18 beta 4.
Here's the context. I create a intent:
@AssistantIntent(schema: .camera.startCapture)
struct StartCaptureIntent {
var captureMode: CaptureMode
var timerDuration: CaptureDuration?
var device: CaptureDevice?
func perform() async throws -> some IntentResult {
.result()
}
}
And these app enums:
@AssistantEnum(schema: .camera.captureDevice)
enum CaptureDevice: String {
case front
case back
case ultrawide
}
@AssistantEnum(schema: .camera.captureMode)
enum CaptureMode: String {
case modeA
case modeB
}
Some CaptureDevice cases are not available in some CaptureMode. e.g: CaptureMode.modeA only supports CaptureDevice.back and CaptureDevice.front.
In a classic AppIntent, I would create an AppEntity to represent CaptureDevice and use @IntentParameterDependency<CapturePhotoIntent>( \.$captureMode) to create a dependency between the captureMode and the captureDevice parameters.
How can we create this dependency between two @AssistantEnum? I'm not sure this is possible as @AssistantEnum creates AppEnum.
Hi,
I have a AppEnum and I try to use a custom SF Symbol as DisplayRepresentation.Image but it's not working. I get a blank image when AppEnum picker appears.
The custom SF Symbol is stored in the target's asset catalog and it works in the target (eg: Image(named: "custom_sfsymbol"). The issue occurs when I try to use it in a DisplayRepresentation
static var caseDisplayRepresentations: [Self: DisplayRepresentation] = [
.sample : DisplayRepresentation(title: "sample_title", image: DisplayRepresentation.Image(named: "custom_sfsymbol")),
Can we use a custom SF Symbol in a DisplayRepresentation.Image?
From what I understood from watching the session LockedCameraCapture, the extension doesn't have access to the App Group User Defaults, so I'm wondering how I can synchronize preferences between the extension and the main app.
From what I can see, the builtin iOS Camera app is able to synchronize its preferences. For example, the "Live Photo" mode toggle state is preserved whether in the main app or in the lock screen.
Is there anything I'm not aware of?
Hi,
I try to fetch weather information for multiple dates through a single query but I only get information for the first day.
let today = Date()
let tomorrow = Calendar.current.date(byAdding: DateComponents(day: 1), to: today)!
let forecast = try? await WeatherService.shared.weather(for: location, including: .daily(startDate: today, endDate: tomorrow))
Can we get weather information for a range of day?
Hello,
I presents a View inside a NavigationView. I use the .toolbar modifier to set a navigation bar items. One of them must be in red as it represents a destructive action.
.toolbar(content: {
ToolbarItem(placement: .navigationBarLeading) {
Button { } label: {
Text("Delete").foregroundColor(.red)
}
}
}
How can we set a foregroundColor/fontWeight for a Button in a ToolBarItem? I've tried to set a custom ButtonStyle, foregroundColor to the Text, foregroundColor to the Button.
Hi,
First, thank you for bringing ButtonRole to SwiftUI. Is there any way to add title (Debug Menu) to the Menu in iOS?
Is there any way to add title (Debug Menu) to the Menu in iOS? I know it's possible in Swift/UIKit but I don't find a way in SwiftUI.
Hello,
I'm currently facing an issue with compositional layout. (FB8812336)
The item height is set to .estimated(100) and the width is set to .fractionalWidth(1.0). On the initial display the cell is not wrapping the label content. The layout of the cells are corrected after scrolling.
The issue doesn't occurred on iOS 13 (screenshot) - https://www.icloud.com/iclouddrive/0I3N81VDpmlMOw7bbtogeVuJA#Screen_Shot_2020-10-19_at_16.16 and can also be seen in the Apple's sample code - https://developer.apple.com/documentation/uikit/views_and_controls/collection_views/implementing_modern_collection_views
Do I miss a flag or a property introduced in iOS 14? Does someone know how to fix this issue?
Thank you.