Post

Replies

Boosts

Views

Activity

Control Center Widget: Unable to read configuration from ControlConfigurationIntent in SetValueIntent
I've created a control centre widget modelled on the talk in "Extend your app's controls across the system". In the talk, the user can select which timer they want to start ("work" or "violin"). The specific timer is passed to ToggleTimerIntent as follows: ControlWidgetToggle( timerState.timer.name, isOn: timerState.isRunning action: ToggleTimerIntent(timer: timerState.timer) ) { isOn in ... } However, I can't find a way to access the timer value from inside my ToggleTimerIntent, since this code isn't provided in the talk. An AppIntent must provide an empty init(), so I've specified timer as an option String: @available(iOS 18, *) struct ToggleTimerIntent: SetValueIntent { static let title: LocalizedStringResource = "Toggle Timer" // This value isn't never populated. var timer: String? @Parameter(title: "Running") var value: Bool func perform() async throws -> some IntentResult { if let timer { } else { // Always here } } } When I backtrace the code, ToggleTimerIntent is instantiated several times, however perform() is only called on an instance where the timer value isn't provided.
1
0
537
Jul ’24
Best wind down category for go to bed routine?
Hi, I'm integrating wind down into my app, Streaks. For tasks like brushing of teeth or taking medication, what is the recommended category? Best candidates: sleepMindfulness sleepPrepareForTomorrow sleepYogaAndStretching Brushing teeth is a physical activity, and to some degree it relates to mindfulness, but on first glance it seems like another type such as .sleepHealth or .sleepPreparation would be useful. The other 4 are obviously not related at all: sleepJournaling sleepMusic sleepPodcasts sleepReading Thanks! Quentin
2
0
994
Jun ’20
Provisioning for Runs as Current User
Hi, I've just enabled the "Runs as Current User" checkbox (I already had the "User Management > Get Current User" option checked. Automatic signing for development fails when "Runs as Current User" is checked. Additionally, I don't see any additional options in the "Certifications, Identifiers and Profiles" section of the Developer Portal in order to sign manually.
1
0
774
Jun ’20
UIDocumentPickerViewController not working in Catalyst
I'm attemping to use UIDocumentPickerViewController, but when I run the app in development, I get an entitlements error:[OpenSavePanels] ERROR: Unable to display save panel: your app is missing the User Selected File Read/Write app sandbox entitlement. Please ensure that your app's target capabilities include the proper entitlements.My entitlements do incldue "User Selected File: Read/Write" in the App Sandbox section.I'm using "Automatically manage signing" and I tried clearing out all provisioning profiles, but this doesn't seem to help.
2
0
2.2k
Jan ’20