Post

Replies

Boosts

Views

Activity

Reply to [AppKit] CNPropertyNotFetchedException when using CNContactFormatter on CNContact retrieved from CNContactPicker
Sorry for the late response, for some reason I wasn't notified via mail about your response. Here's there information you were asking for: Code reproducing your issue: #import "ViewController.h" @import Contacts; @import ContactsUI; @implementation ViewController CNContactPicker *contactPicker; -(IBAction)buttonPressed:(id)sender { contactPicker = [[CNContactPicker alloc] init]; contactPicker.delegate = self; contactPicker.displayedKeys = @[CNContactPostalAddressesKey]; [contactPicker showRelativeToRect:NSZeroRect ofView:sender preferredEdge:NSRectEdgeMinY]; } - (void)contactPicker:(CNContactViewController *)picker didSelectContactProperty:(CNContactProperty *)contactProperty { CNPostalAddressFormatter *formatter = [[CNPostalAddressFormatter alloc] init]; NSString *formattedAddress = [formatter stringFromPostalAddress:contactProperty.value]; NSLog(@"Formatted Address:\n%@", formattedAddress); @try { CNContactFormatter *contactFormatter = [[CNContactFormatter alloc] init]; NSString *formattedContact = [contactFormatter stringFromContact:contactProperty.contact]; NSLog(@"Formatted Contact:\n%@", formattedContact); } @catch(id anException) { NSLog(@"Exception:\n%@", anException); } } @end iOS version reproducing your issue: This is not an iOS issue. It happens in AppKit on macOS Sonoma 14.6.1. Does the issue also occur when using Xcode 16 beta 2? I didn't test Xcode 16 Beta 2 but it also happens with the (more recent) Xcode 16.1 Beta
Topic: App & System Services SubTopic: General Tags:
Aug ’24
Reply to NSTextList not rendering on MacOS
I'm not sure if it's regression - the NSTextList never worked in the first place (or, they only work when you manually add the bullets into the text content itself - which user could select and delete). On iOS, the bullets are non-selectable and added automatically, just by setting the ParagraphStyle. I submitted a feedback report: FB15162186
Topic: UI Frameworks SubTopic: AppKit Tags:
Sep ’24
Reply to UITabBarController render glitch since iOS18 beta 1 & 2 when activating tabs.
@BMS have you filed a bug report and received any response to it? I am hitting the same issue and feel like there shouldn't be a workaround needed. But it seems like Apple really wants us to have only UINavigationController as children for the UITabBarController - the new "tab bar" on iPad also only seems to share the space with the navigation bar of child view controllers - it doesn't work if the Tab bar controller itself is nested in a UINavigationController
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’24
Reply to UIDocumentPickerViewController: Cannot access file from OneDrive
You can force the OneDrive app to download the file first by settings "asCopy" to true: https://developer.apple.com/documentation/uikit/uidocumentpickerviewcontroller/3566731-initforexportingurls However, this can cause a hang, especially when the file is large and OneDrive doesn't show a progress indicator. I am also on the search for a way to download the file asynchronously and be able to show a progress indicator in my app
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’24
Reply to Clarification on the correct use for CLServiceSession
@joey_needs_sleep I am struggling with the same problem after the iOS 18 update. Is the feature working reliably for you again now? Adding location to UIBackgroundModes is not needed, is it? Also, allowsBackgroundLocationUpdates doesn't need to be set to true in order to monitor geofences in the background? I am using CLMonitor.events and haven't found a way to query the minimal horizontalAccuracy for the geofencing to work Do you also start your CLServiceSession in the background, when the app is relaunched? According to the WWDC session, you can only start holding one (a CLServiceSession) when your app is in the foreground https://developer.apple.com/videos/play/wwdc2024/10212?time=522 and also ... CLMonitor.events won’t yield results when it is not in use, unless a session which was started in the foreground, .... https://developer.apple.com/videos/play/wwdc2024/10212?time=663
Nov ’24
Reply to CLMonitor does not always trigger on entry
I am also experiencing unreliable geofence entry & exit events since iOS 18. With iOS 17, I didn't need to use a CLServiceSession at all, now even when using one, it's unreliable. I also see the same behavior of the events timestamp to be the current time, and not the time of actual geofence entry. I made sure the app has the "Always" permission but I did not set the new NSLocationRequireExplicitServiceSession key in the Info.plist (I tested it, but couldn't see any change in the reliability) What I am confused about is whether to start a CLServiceSession if the app is restarted in the background. Apple is not clear about it. In the WWDC session they say: ... So your job, ..., is to make sure that your process launch logic knows what features it has been tasked with pursuing, and re-takes session objects... https://developer.apple.com/videos/play/wwdc2024/10212?time=758 But on the other hand it's also said that: you can only start holding one (a CLServiceSession) when your app is in the foreground https://developer.apple.com/videos/play/wwdc2024/10212?time=522 and also ... CLMonitor.events won’t yield results when it is not in use, unless a session which was started in the foreground, .... https://developer.apple.com/videos/play/wwdc2024/10212?time=663 It is also not clear if we need to use CLLocationManager.allowsBackgroundLocationUpdates (which is documented as "Apps that receive location updates when running in the background must include the UIBackgroundModes key (with the location value) in their app’s Info.plist file"). However, in my tests, doing so didn't yield any improvement (and as I said, in iOS 17 it wasn't required either).
Nov ’24
Reply to Issue with geolocation without using maps
I am also experiencing unreliable geofence entry & exit events since iOS 18. With iOS 17, I didn't need to use a CLServiceSession at all, now even when using one, it's unreliable. I also see the same behavior of the events timestamp to be the current time, and not the time of actual geofence entry. I made sure the app has the "Always" permission but I did not set the new NSLocationRequireExplicitServiceSession key in the Info.plist (I tested it, but couldn't see any change in the reliability) What I am confused about is whether to start a CLServiceSession if the app is restarted in the background. Apple is not clear about it. In the WWDC session they say: ... So your job, ..., is to make sure that your process launch logic knows what features it has been tasked with pursuing, and re-takes session objects... https://developer.apple.com/videos/play/wwdc2024/10212?time=758 But on the other hand it's also said that: you can only start holding one (a CLServiceSession) when your app is in the foreground https://developer.apple.com/videos/play/wwdc2024/10212?time=522 and also ... CLMonitor.events won’t yield results when it is not in use, unless a session which was started in the foreground, .... https://developer.apple.com/videos/play/wwdc2024/10212?time=663 It is also not clear if we need to use CLLocationManager.allowsBackgroundLocationUpdates (which is documented as "Apps that receive location updates when running in the background must include the UIBackgroundModes key (with the location value) in their app’s Info.plist file"). However, in my tests, doing so didn't yield any improvement (and as I said, in iOS 17 it wasn't required either). @Engineer what makes me doubt this being the cause for the unreliability of the geofencing is that it worked perfectly with iOS 17.
Nov ’24
Reply to UIMenuElementAttributesKeepsMenuPresented not working when Glass Grouping changes
Thanks for your response. You can find an example project here (https://1drv.ms/u/c/9ff2ada21b6e758d/EchgHRMV9CpPhDWa5H3qQI8Bca72rFWsDCXVrTLnVAKEGw?e=HMiScu) or see the example code below. As you can see, the menu collapses when clicking the "Only favorites" menu action, even though .keepsMenuPresented is provided final class FiltersVC: UIViewController { lazy var barItem = UIBarButtonItem(image: UIImage(systemName: "line.3.horizontal.decrease"), menu: makeFilterMenu()) private var isFilterActive = false override func viewDidLoad() { super.viewDidLoad() let other = UIBarButtonItem(systemItem: .add, primaryAction: UIAction { _ in }) navigationItem.leftBarButtonItems = [barItem, other] // if we only had one bar button item, the menu would not collapse after clicking "Only favorites" } private func makeFilterMenu() -> UIMenu { let a1 = UIAction(title: "Only favorites", attributes: [.keepsMenuPresented], state: isFilterActive ? .on : .off) { [weak self] action in guard let self = self else { return } isFilterActive = !isFilterActive; barItem.style = isFilterActive ? .prominent : .plain // this causes the menu to collapse despite .keepsMenuPresented barItem.menu = makeFilterMenu() } let a2 = UIAction(title: "Some other action") { _ in } return UIMenu(title: "Filter", options: [.displayInline], children: [a1, a2]) } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Oct ’25
Reply to ASWebAuthenticationSession won't open the Safari login window on Monterey
Same problem here - since months. Also very surprised Apple isn't interested in fixing this.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to CKQueryOperation returns new cursor, but no results, eventually rejects requests
This is not a temporary phenomenon, it still happens. The same thing can be observed in the web UI (https://icloud.developer.apple.com/dashboard/database/teams/TEAMID). Either no results are shown at all when using the "Query records" button, or it errors out:
Replies
Boosts
Views
Activity
Sep ’23
Reply to CKQueryOperation returns new cursor, but no results, eventually rejects requests
Still happening...
Replies
Boosts
Views
Activity
Oct ’23
Reply to [AppKit] CNPropertyNotFetchedException when using CNContactFormatter on CNContact retrieved from CNContactPicker
Sorry for the late response, for some reason I wasn't notified via mail about your response. Here's there information you were asking for: Code reproducing your issue: #import "ViewController.h" @import Contacts; @import ContactsUI; @implementation ViewController CNContactPicker *contactPicker; -(IBAction)buttonPressed:(id)sender { contactPicker = [[CNContactPicker alloc] init]; contactPicker.delegate = self; contactPicker.displayedKeys = @[CNContactPostalAddressesKey]; [contactPicker showRelativeToRect:NSZeroRect ofView:sender preferredEdge:NSRectEdgeMinY]; } - (void)contactPicker:(CNContactViewController *)picker didSelectContactProperty:(CNContactProperty *)contactProperty { CNPostalAddressFormatter *formatter = [[CNPostalAddressFormatter alloc] init]; NSString *formattedAddress = [formatter stringFromPostalAddress:contactProperty.value]; NSLog(@"Formatted Address:\n%@", formattedAddress); @try { CNContactFormatter *contactFormatter = [[CNContactFormatter alloc] init]; NSString *formattedContact = [contactFormatter stringFromContact:contactProperty.contact]; NSLog(@"Formatted Contact:\n%@", formattedContact); } @catch(id anException) { NSLog(@"Exception:\n%@", anException); } } @end iOS version reproducing your issue: This is not an iOS issue. It happens in AppKit on macOS Sonoma 14.6.1. Does the issue also occur when using Xcode 16 beta 2? I didn't test Xcode 16 Beta 2 but it also happens with the (more recent) Xcode 16.1 Beta
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’24
Reply to NSTextList not rendering on MacOS
I'm not sure if it's regression - the NSTextList never worked in the first place (or, they only work when you manually add the bullets into the text content itself - which user could select and delete). On iOS, the bullets are non-selectable and added automatically, just by setting the ParagraphStyle. I submitted a feedback report: FB15162186
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to UITabBarController render glitch since iOS18 beta 1 & 2 when activating tabs.
@BMS have you filed a bug report and received any response to it? I am hitting the same issue and feel like there shouldn't be a workaround needed. But it seems like Apple really wants us to have only UINavigationController as children for the UITabBarController - the new "tab bar" on iPad also only seems to share the space with the navigation bar of child view controllers - it doesn't work if the Tab bar controller itself is nested in a UINavigationController
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to NSTextList not rendering on MacOS
Downloaded that example project and ran it on my macOS 14.7 machine: the bullets/numbers do not render - do they on your machine?
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to NSTextList not rendering on MacOS
Thanks for the repsonse. I'm glad this issue is now being investigated, and I'm a bit surprised this hasn't been reported by another user before.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to iOS 18 rotate animation not working by layer for custom icon
I'm a bit confused now. Isn't SVGs the recommended way to export my custom symbols that I created in the SF Symbols app? If not, what other way am I supposed to export my custom symbol? And if it's not supposed to work, why does the wiggle effect works as expected?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to UIDocumentPickerViewController: Cannot access file from OneDrive
You can force the OneDrive app to download the file first by settings "asCopy" to true: https://developer.apple.com/documentation/uikit/uidocumentpickerviewcontroller/3566731-initforexportingurls However, this can cause a hang, especially when the file is large and OneDrive doesn't show a progress indicator. I am also on the search for a way to download the file asynchronously and be able to show a progress indicator in my app
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Clarification on the correct use for CLServiceSession
@joey_needs_sleep I am struggling with the same problem after the iOS 18 update. Is the feature working reliably for you again now? Adding location to UIBackgroundModes is not needed, is it? Also, allowsBackgroundLocationUpdates doesn't need to be set to true in order to monitor geofences in the background? I am using CLMonitor.events and haven't found a way to query the minimal horizontalAccuracy for the geofencing to work Do you also start your CLServiceSession in the background, when the app is relaunched? According to the WWDC session, you can only start holding one (a CLServiceSession) when your app is in the foreground https://developer.apple.com/videos/play/wwdc2024/10212?time=522 and also ... CLMonitor.events won’t yield results when it is not in use, unless a session which was started in the foreground, .... https://developer.apple.com/videos/play/wwdc2024/10212?time=663
Replies
Boosts
Views
Activity
Nov ’24
Reply to CLMonitor does not always trigger on entry
I am also experiencing unreliable geofence entry & exit events since iOS 18. With iOS 17, I didn't need to use a CLServiceSession at all, now even when using one, it's unreliable. I also see the same behavior of the events timestamp to be the current time, and not the time of actual geofence entry. I made sure the app has the "Always" permission but I did not set the new NSLocationRequireExplicitServiceSession key in the Info.plist (I tested it, but couldn't see any change in the reliability) What I am confused about is whether to start a CLServiceSession if the app is restarted in the background. Apple is not clear about it. In the WWDC session they say: ... So your job, ..., is to make sure that your process launch logic knows what features it has been tasked with pursuing, and re-takes session objects... https://developer.apple.com/videos/play/wwdc2024/10212?time=758 But on the other hand it's also said that: you can only start holding one (a CLServiceSession) when your app is in the foreground https://developer.apple.com/videos/play/wwdc2024/10212?time=522 and also ... CLMonitor.events won’t yield results when it is not in use, unless a session which was started in the foreground, .... https://developer.apple.com/videos/play/wwdc2024/10212?time=663 It is also not clear if we need to use CLLocationManager.allowsBackgroundLocationUpdates (which is documented as "Apps that receive location updates when running in the background must include the UIBackgroundModes key (with the location value) in their app’s Info.plist file"). However, in my tests, doing so didn't yield any improvement (and as I said, in iOS 17 it wasn't required either).
Replies
Boosts
Views
Activity
Nov ’24
Reply to Issue with geolocation without using maps
I am also experiencing unreliable geofence entry & exit events since iOS 18. With iOS 17, I didn't need to use a CLServiceSession at all, now even when using one, it's unreliable. I also see the same behavior of the events timestamp to be the current time, and not the time of actual geofence entry. I made sure the app has the "Always" permission but I did not set the new NSLocationRequireExplicitServiceSession key in the Info.plist (I tested it, but couldn't see any change in the reliability) What I am confused about is whether to start a CLServiceSession if the app is restarted in the background. Apple is not clear about it. In the WWDC session they say: ... So your job, ..., is to make sure that your process launch logic knows what features it has been tasked with pursuing, and re-takes session objects... https://developer.apple.com/videos/play/wwdc2024/10212?time=758 But on the other hand it's also said that: you can only start holding one (a CLServiceSession) when your app is in the foreground https://developer.apple.com/videos/play/wwdc2024/10212?time=522 and also ... CLMonitor.events won’t yield results when it is not in use, unless a session which was started in the foreground, .... https://developer.apple.com/videos/play/wwdc2024/10212?time=663 It is also not clear if we need to use CLLocationManager.allowsBackgroundLocationUpdates (which is documented as "Apps that receive location updates when running in the background must include the UIBackgroundModes key (with the location value) in their app’s Info.plist file"). However, in my tests, doing so didn't yield any improvement (and as I said, in iOS 17 it wasn't required either). @Engineer what makes me doubt this being the cause for the unreliability of the geofencing is that it worked perfectly with iOS 17.
Replies
Boosts
Views
Activity
Nov ’24
Reply to Illegible navigation title when presenting Map view
I'm having the same issue. Have you found a workaround or has Apple responded to your ticket?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’25
Reply to UIMenuElementAttributesKeepsMenuPresented not working when Glass Grouping changes
Thanks for your response. You can find an example project here (https://1drv.ms/u/c/9ff2ada21b6e758d/EchgHRMV9CpPhDWa5H3qQI8Bca72rFWsDCXVrTLnVAKEGw?e=HMiScu) or see the example code below. As you can see, the menu collapses when clicking the "Only favorites" menu action, even though .keepsMenuPresented is provided final class FiltersVC: UIViewController { lazy var barItem = UIBarButtonItem(image: UIImage(systemName: "line.3.horizontal.decrease"), menu: makeFilterMenu()) private var isFilterActive = false override func viewDidLoad() { super.viewDidLoad() let other = UIBarButtonItem(systemItem: .add, primaryAction: UIAction { _ in }) navigationItem.leftBarButtonItems = [barItem, other] // if we only had one bar button item, the menu would not collapse after clicking "Only favorites" } private func makeFilterMenu() -> UIMenu { let a1 = UIAction(title: "Only favorites", attributes: [.keepsMenuPresented], state: isFilterActive ? .on : .off) { [weak self] action in guard let self = self else { return } isFilterActive = !isFilterActive; barItem.style = isFilterActive ? .prominent : .plain // this causes the menu to collapse despite .keepsMenuPresented barItem.menu = makeFilterMenu() } let a2 = UIAction(title: "Some other action") { _ in } return UIMenu(title: "Filter", options: [.displayInline], children: [a1, a2]) } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’25