Adjust your app’s behavior and filter incoming notifications based on the user's Focus settings.

Posts under Focus tag

16 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Apps cannot be on multiple screens in iOS 18
Since using the iOS 18 beta in July I am unable to add apps to multiple screens at a time. For example, I have a screen for my work focus and I cannot add the calculator app to this screen while it is on another screen. If I try to add it to a screen it is removed from the other screen. Has anyone else noticed this? Is this expected to be fixed in iOS 18 or could it be a retrogressive feature?
0
0
139
1w
focusedSceneValue doesn't work with Window
My observations: Passing a FocusState.Binding using focusedSceneValue seems to work only when the app uses a WindowGroup. When the app uses a Window (single window) passing the FocusState.Binding in focusedSceneValue doesn't seem to work. When app uses Window passing FocusState.Binding using focusedValue and receiving it in @FocusedValue seems to work. Question: Is this expected behaviour? (should focusedSceneValue only work for WindowGroup and not for Window?)
0
0
183
2w
FocusState not working on ipad
I created this simple view to test focus in preview mode and I have no idea why it works absolutely fine on iphone, but not at all on ipad? import SwiftUI struct SimpleFocusTestView: View { @FocusState private var isFocused: Bool var body: some View { Text("Test Focus") .focusable() .focused($isFocused) .onTapGesture { isFocused.toggle() print("Tapped to toggle focus: \(isFocused)") } .onAppear { isFocused = true } .onChange(of: isFocused) { oldValue, newValue in print("Focus changed: \(newValue)") } .background { if isFocused { Capsule() .fill(.indigo) .opacity(0.3) } } } } #Preview { SimpleFocusTestView() } The printouts I get are: if I click on ipad I get this: Tapped to toggle focus: false Tapped to toggle focus: false Tapped to toggle focus: false why is it impossible to change the value of isFocused on ipad? it all works fine on iphone: Tapped to toggle focus: true Focus changed: false Tapped to toggle focus: false Focus changed: true
2
0
231
3w
Auto reply" Does not work while Focus Mode "Driving" Mode is ON
Dear Apple Support Team and Community Members, Despite the recent updates on the iOS 18.5 Beta version, several users, including myself, are experiencing issues with the Driving Focus mode. Specifically, when this mode is enabled with all the recommended settings, the iPhone fails to send auto-reply text messages to incoming callers, a critical feature meant to minimize distractions while driving. Key Issues Reported: Driving Focus Not Sending Auto-Reply Messages: Many users have meticulously configured the Driving Focus settings, ensuring that auto-reply is enabled and contacts are correctly set, but the feature still does not function as expected. Beta Updates Not Resolving the Issue: Even after installing the latest iOS 18.5 Beta updates, this problem persists, indicating that the bug has not been addressed in the current beta release. Request for Escalation and Resolution: We kindly request that this issue be escalated to the Apple development team for further investigation. Driving Focus is a crucial safety feature, and its malfunctioning could have serious implications. We hope for a prompt and concrete solution in the upcoming updates to ensure that this feature works reliably for all users. Thank you for your attention to this matter. Best regards, Tejas Desai A Concerned iOS User
0
0
149
Aug ’24
SetFocusFilterIntent `perform()` method is not called on iOS 18 beta
I’ve set up a focus filter, but the perform() method in SetFocusFilterIntent isn't called when the focus mode is toggled on or off on my iPhone since I updated to iOS 18 beta (22A5326f). I can reproduce the issue for my app, but focus filters are also broken for any third-party apps installed on my phone, so I guess it's not specific to how I've implemented my filter intent. This used to work perfectly on iOS 17. I didn't change a single line of code, and it broke completely on the latest iOS 18 beta. I've filed a bug report including a sysdiagnose (FB14715113). To the developers out there, is this something you are also observing in your apps?
0
0
225
Aug ’24
Unable to observe Focus status changes from an Intents app extension
I am writing a communication app that relies on the INShareFocusStatusIntentHandling protocol. However, it appears this API is not functional, even with the proper permissions and entitlements. Given the example code here, I am unable to trigger the logs in the INShareFocusStatusIntentHandling extension. In this code, when enabling or disabling focus, line 33 of IntentHandler.swift never gets logged, even though FocusStatusCenter is authorized for parent app, UserNotifications authorized for parent app (target), and Communication Notifications entitlement has been added to the parent app. I am also unable to hit any breakpoints in the extension. It seems as if the extension is simply never triggered -- maybe even broken at the OS-level. I have tried both iOS 17 and the latest 18 beta. Other users have reported similar difficulties in these forums. To replicate, Install the example app. Give the app UserNotifications and FocusStatus permissions. Background the app. Change focus status. Check console. Notice that the extension handler is never triggered/logged.
1
0
340
Jul ’24
SwiftUI app runs differently on hardware platforms
I have a simple SwiftUI app that has a picker, textfield and several buttons. It is using a Enum as a focus state for the various controls. When I compile and run it on Mac Studio desktop it works as expected: Picker has initial focus, Selection in Picker changes focus to TextField, Tab key moves through buttons; last button resets to Picker However when I run the exact same app on MacBook Pro (same version of MacOS, 14.5) it does not work at all as expected. Instead: Initial focus is set to TextField, Tab does not change the focus, Clicking on last button resets focus to TextField rather than Picker The content view code: enum FFocus: Hashable { case pkNames case btnAssign case tfValue case btn1 case btn2 case noFocus } struct PZParm: Identifiable { var id = 0 var name = "" } struct ContentView: View { @State var psel:Int = 0 @State var tfVal = "Testing" @FocusState var hwFocus:FFocus? var body: some View { VStack { Text("Hardware Test").font(.title2) PPDefView(bSel: $psel) .focused($hwFocus, equals: .pkNames) TextField("testing", text:$tfVal) .frame(width: 400) .focused($hwFocus, equals: .tfValue) HStack { Button("Button1", action: {}) .frame(width: 150) .focused($hwFocus, equals: .btn1) Button("Button2", action: { tfVal = "" hwFocus = .tfValue }) .frame(width: 150) .focused($hwFocus, equals: .btn2) Button("New", action: { tfVal = "" hwFocus = .pkNames }) .frame(width: 150) .focused($hwFocus, equals: .btnAssign) } } .padding() // handle picker change .onChange(of: psel, { if psel > 0 {hwFocus = .tfValue} }) .onAppear(perform: {hwFocus = .pkNames}) } } #Preview { ContentView() } struct PPDefView: View { @Binding var bSel:Int // test defs let pzparms:[PZParm] = [ PZParm.init(id:1, name:"Name1"), PZParm.init(id:2, name:"Name2") ] // var body:some View { Picker(selection: $bSel, label: Text("Puzzle Type")) { ForEach(pzparms) {Text($0.name)} }.frame(width: 250) } }
3
0
605
Jun ’24
Cannot add Focus Filter
I added a SetFocusFilterIntent to my project, but when I try to add the Focus Filter, the "add" button is disabled. I want to know why I cannot add a Focus Filter. I tried the same implementation of SetFocusFilterIntent in an empty project, and it works as expected.
0
0
309
Apr ’24
Focus Modes on Watch
I have had issue with sleep focus on my watch 8 since late in the iOS 16/ WatchOS 9 betas. I opened a feedback in Oct 2023 when 10.1 betas. When sleep focus is on the watch shows it's active and did not alert but it still works like normal. It used to go dark and I could tap the screen to see the time and press the crown to exit from that mode to use it. I wish this would be fixed. I'm tried of having to use theater mode with I go do bed. The light of the watch is
1
0
483
Feb ’24
Watch OS Sleep Focus
I have noticed since later 9.x betas that sleep focus no long switches the watch to just a clock. In the past, when sleep focus is turned on, my screen would go blank and if I tapped the screen the time would appear. if I held the crown in, it would "unlock" from time display only and allow me to use my watch. Since this has started I have posted in the feedback app starting in 10.1. Now I have to set my watch into Theater mode every night so that the screen is off and not lighting up the room. After each new beta release I update my feedback. Any idea if anyone has seen my feedback?
2
0
643
Jan ’24
Enhancing 3rd Party Alarm Clock Apps on iOS: A Call for More Flexibility and User Control
Hello Apple Community, I am writing to discuss a limitation I’ve encountered with third-party alarm clock apps on iOS. As it stands, these apps are unable to function like the native Clock app, primarily due to the restrictions imposed by the operating system. Currently, third-party alarm apps rely on standard local notifications, which fire once and then cease. This means that if a user misses the initial notification, there’s no backup mechanism to ensure they are alerted. This is a significant drawback for users who rely on these apps to manage their time effectively. Moreover, some apps have found a workaround by playing a silent sound in the background to keep the app active. However, this method is not only against Apple’s guidelines but also drains the device’s battery life. I propose that Apple consider allowing third-party apps to push notifications from the background in an alarm style, with clear permissions granted by the user. This would enable users to clearly define acceptable notifications and specify an alarm-like display, providing a more personalized and effective alarm experience. By implementing this change, Apple could greatly enhance the functionality and user-friendliness of third-party alarm clock apps, ultimately benefiting the end-users and developers alike. Because this alarm feature is so important for productivity and quick responses to critical events or triggers I'm trying to see how some concepts could be reimagined if we had a little more flexibility. Apple iOS has a feature called StandBy mode that activates when an iPhone is charging and positioned on its side. This feature can be thought of as a kind of smart display for your iPhone that offers fast access to different screens of glanceable information. Always-On Display: StandBy mode can keep the display on even when the phone is locked, which is useful for an alarm app. Users can glance at the time without having to unlock their phone w/ Low-Light Adaptation Customizable Screens: StandBy mode consists of screens that can be accessed by swiping horizontally on your iPhone’s display. This could allow an alarm app to display additional information, such as route, or weather warnings. Interactive Widgets: The widget screen in StandBy mode is interactive and customizable. I look forward to hearing your thoughts on this matter. Best regards, Phil Cutting
2
5
910
Jan ’24
AVCaptureDevice.FocusMode cannot be set in iPhone15
We are developing an app which uses AVCaptureSession. Here is a part of my code: if context.config.basic_settings.auto_focus == 1 { // 自動フォーカス device.focusMode = AVCaptureDevice.FocusMode.continuousAutoFocus completion() } else { device.focusMode = AVCaptureDevice.FocusMode.locked var _lenspos = Float(context.config.basic_settings.lens_position) ?? 0.5 if _lenspos > 1.0 { _lenspos = 1.0 } if _lenspos < 0.0 { _lenspos = 0.0 } device.setFocusModeLocked(lensPosition: _lenspos, completionHandler: { (time) in completion() }) } This code can successfully set focus mode to autofoucs or manual focus and also can set lens position perfectly if we use iPhone13 or iPhone14. But If we use iPhone15, this code cannot set the focus mode or lensposition. We also tried with different iPhone15 devices, but the result is always the same(fails to set focus). And also used different iPhone13 and iPhone14 devices. But these iPhones can set the focus correctly everytime. Is it a bug of iPhone15? Or is there anything that I can do about the issue?
2
0
686
Jan ’24
Adding accessibility to an existing application (Parental Control)
We are developing a parental control system. The application is written with .NET Xamarin for the framework version 4.8. The Mac version is addressed anything down to Mac OS 10.9, Maverick The application is running in the menu bar only and will fire a dialog, but the application does not have a real main window. We are currently adopting the applications to accessibility and 2 issues : during installation we need to elevate the account, the resulting "enter admin password"-dialog (system dialog) is not gaining focus, and as such is not getting a voice over help. when ever alert is shown, the focus is not pushed to the alert. (basically the same as also not getting voice over help)
0
0
482
Nov ’23
tvos: change focused color of UIButton
How to change default white color of tvos swift UIButton focus selection? override func didUpdateFocus(in context: UIFocusUpdateContext, with coordinator: UIFocusAnimationCoordinator) { if let nextFocusedView = context.nextFocusedView { playAllOutlet.backgroundColor = UIColor.red shuffleBtnOutlet.backgroundColor = UIColor.green } if let previousFocusView = context.previouslyFocusedView { playAllOutlet.backgroundColor = UIColor.red shuffleBtnOutlet.backgroundColor = UIColor.green } } But background when button is focused is still white
1
1
867
Nov ’23
Read sleep schedule
Hi Is there a way to read the sleep schedule i have set in either the health or clock apps? I found a few posts on here asking the same thing and the responce was always either no or just no responce but they are all from over 2 years ago so im not sure if something has changed since then. Up untill recently i was using a shortcuts automation to get the data but a recent update started excluding the sleep schedule alarm from the list that the shortcuts app can pull from the clock app. I dont want historical data, just when the alarm is set to go off next. I was using it to turn my lights on dim half an hour before the alarm goes off without having to set the schedule in 2 places. I have an annoyingly inconsistent morning schedule. Thanks
1
0
854
Oct ’23