Post

Replies

Boosts

Views

Activity

Transit Directions
Why do I receive MKErrorDirectionsNotFound for transit directions even though the Maps app does provide transit directions for the same source/destination pair? Other transport types such as driving or walking return results just fine.
5
0
80
6d
Bounding region in MKGeocodingRequest
With iOS 26 deprecations around MKPlacemark, MKGeocodingRequest + MKMapItem is the migration path for forward geocoding. However, geocoding results don’t expose a canonical region/bounding region for the result set (similar to MKLocalSearch.Response.boundingRegion). Any idea how to mitigate this?
2
0
82
6d
MKMapView blur effect
The Maps app exhibits a sophisticated blur effect behind the status bar: map content (labels, POI icons) is hidden map background (roads, buildings) is slightly blurred Can I achieve this effect in MKMapView, too? Just putting a UIVisualEffectView on top doesn't achieve the same effect since it also blurs the labels.
2
0
71
6d
Disambiguation for .system.search AppIntent
I'd like to display a list of items to disambiguate for a fulltext search intent. Using the Apple AppIntentsSampleApp, I added TrailSearch.swift: import AppIntents @AssistantIntent(schema: .system.search) struct TrailSearch: AppIntent { static let title: LocalizedStringResource = "Search Trail" static let description = IntentDescription("Search trail by name.", categoryName: "Discover", resultValueName: "Trail") @Parameter(title: "Trail") var criteria: StringSearchCriteria func perform() async throws -> some IntentResult & ReturnsValue<TrailEntity> { if criteria.term.isEmpty { throw $criteria.needsValueError(IntentDialog("need value")) } let trails = TrailDataManager.shared.trails { trail in trail.name.contains(criteria.term) } if trails.count > 1 { throw $criteria.needsDisambiguationError(among: trails.map { StringSearchCriteria(term: $0.name) }) } else if let firstTrail = trails.first { return .result(value: TrailEntity(trail: firstTrail)) } throw $criteria.needsValueError(IntentDialog("Nothing found")) } } Now when I type "trail" which matches several trails and thus lets us enter the disambiguation code path, the Shortcut app just displays the dialog title but no disambiguation items to pick from. Is this by design or a bug? (filed as FB17412220)
0
0
161
Apr ’25
How to debug a CoreSpotlight extension?
My CoreSpotlight extension seems to exceed the 6 MB memory limit. What’s the best way to debug this? I've tried to attach the debugger on the Simulator but the extension seems to be never launched when I trigger the reindex from Developer settings. Is this supposed to work? On device, I am able to attach the debugger. However, I can neither transfer the debug session to Instruments, nor display the memory graph. So I've no idea how the memory is used. Any recommendations how to move forward? Is there a way to temporarily disable the memory limit since even with LLDB attached, the extension is killed.
0
1
236
Apr ’25
OSLog in Swift macro doesn't persist original file/line number
I need to log to OSLog and into a file in parallel (due to OSLogStore not being able to provide old logs (FB13191608)). In Objective-C I can accomplish this with a macro using __FILE__ and __LINE__ in the macro implementation which still reference the position in the original code. I tried to create a Swift macro to make this work from Swift. However, log() takes the file and line number of the macro definition file instead of the position in the calling code. So when I click on the metadata link, I'm taken to the macro instead of the calling location. Is there any solution to that? #file and #line are correctly set in the macro but there’s no way to specify file and line number to the log() function (FB13204310).
5
0
1.7k
Oct ’23
What does this UICollectionView exception mean?
In my application using UICollectionViewDiffableDataSource and compositional layout, I saw this exception Thread 1: "This solver does not handle estimated items so this method does nothing. Are you calling this in error?" that was thrown in dataSource.apply(snapshot, animatingDifferences: animated). I don't understand what it is telling me and how I should fix it. Any idea?
4
0
1.4k
Sep ’23
Are App Intents supported on watchOS?
I'm trying to implement App Intents and App Shortcuts on watchOS. To do that, I included my AppIntent and my AppShortcutsProvider to the WatchKit extension target. The intent has one variable parameter: @Parameter(title: "Category", description: "Category", requestValueDialog: "What are you searching for?") var category: String However, when I speak the invocation phrase to Siri on the watch, Siri immediately responds there's something wrong. My perform() method isn't even called and there's nothing in the log. Is this supposed to work? How could I debug this? Is there a sample app showing App Intents on watchOS?
2
4
1.9k
Jul ’23
IAP Receipt for app bundles
We're validating app receipts and use the original_purchase_date and original_application_version to determine if the user is a legacy user and thus entitled to certain privileges. (We moved from paid to freemium and give legacy users free access to features now requiring a subscription.) Now we're wondering what values the above fields have if the user purchased an app bundle (consisting of two apps). Is the receipt for both apps the same? If yes, which bundle_id and which original_application_version is sent in the receipt? If not, how is original_application_version set? (According to the version of each app at purchase time?) How is original_purchase_date set? (According to the bundle purchase date? Or the first installation date of each app? – one of the apps could be installed much later!)
3
0
2.6k
Jul ’21
Transit Directions
Why do I receive MKErrorDirectionsNotFound for transit directions even though the Maps app does provide transit directions for the same source/destination pair? Other transport types such as driving or walking return results just fine.
Replies
5
Boosts
0
Views
80
Activity
6d
Bounding region in MKGeocodingRequest
With iOS 26 deprecations around MKPlacemark, MKGeocodingRequest + MKMapItem is the migration path for forward geocoding. However, geocoding results don’t expose a canonical region/bounding region for the result set (similar to MKLocalSearch.Response.boundingRegion). Any idea how to mitigate this?
Replies
2
Boosts
0
Views
82
Activity
6d
MKMapView blur effect
The Maps app exhibits a sophisticated blur effect behind the status bar: map content (labels, POI icons) is hidden map background (roads, buildings) is slightly blurred Can I achieve this effect in MKMapView, too? Just putting a UIVisualEffectView on top doesn't achieve the same effect since it also blurs the labels.
Replies
2
Boosts
0
Views
71
Activity
6d
Disambiguation for .system.search AppIntent
I'd like to display a list of items to disambiguate for a fulltext search intent. Using the Apple AppIntentsSampleApp, I added TrailSearch.swift: import AppIntents @AssistantIntent(schema: .system.search) struct TrailSearch: AppIntent { static let title: LocalizedStringResource = "Search Trail" static let description = IntentDescription("Search trail by name.", categoryName: "Discover", resultValueName: "Trail") @Parameter(title: "Trail") var criteria: StringSearchCriteria func perform() async throws -> some IntentResult & ReturnsValue<TrailEntity> { if criteria.term.isEmpty { throw $criteria.needsValueError(IntentDialog("need value")) } let trails = TrailDataManager.shared.trails { trail in trail.name.contains(criteria.term) } if trails.count > 1 { throw $criteria.needsDisambiguationError(among: trails.map { StringSearchCriteria(term: $0.name) }) } else if let firstTrail = trails.first { return .result(value: TrailEntity(trail: firstTrail)) } throw $criteria.needsValueError(IntentDialog("Nothing found")) } } Now when I type "trail" which matches several trails and thus lets us enter the disambiguation code path, the Shortcut app just displays the dialog title but no disambiguation items to pick from. Is this by design or a bug? (filed as FB17412220)
Replies
0
Boosts
0
Views
161
Activity
Apr ’25
How to debug a CoreSpotlight extension?
My CoreSpotlight extension seems to exceed the 6 MB memory limit. What’s the best way to debug this? I've tried to attach the debugger on the Simulator but the extension seems to be never launched when I trigger the reindex from Developer settings. Is this supposed to work? On device, I am able to attach the debugger. However, I can neither transfer the debug session to Instruments, nor display the memory graph. So I've no idea how the memory is used. Any recommendations how to move forward? Is there a way to temporarily disable the memory limit since even with LLDB attached, the extension is killed.
Replies
0
Boosts
1
Views
236
Activity
Apr ’25
OSLog in Swift macro doesn't persist original file/line number
I need to log to OSLog and into a file in parallel (due to OSLogStore not being able to provide old logs (FB13191608)). In Objective-C I can accomplish this with a macro using __FILE__ and __LINE__ in the macro implementation which still reference the position in the original code. I tried to create a Swift macro to make this work from Swift. However, log() takes the file and line number of the macro definition file instead of the position in the calling code. So when I click on the metadata link, I'm taken to the macro instead of the calling location. Is there any solution to that? #file and #line are correctly set in the macro but there’s no way to specify file and line number to the log() function (FB13204310).
Replies
5
Boosts
0
Views
1.7k
Activity
Oct ’23
What does this UICollectionView exception mean?
In my application using UICollectionViewDiffableDataSource and compositional layout, I saw this exception Thread 1: "This solver does not handle estimated items so this method does nothing. Are you calling this in error?" that was thrown in dataSource.apply(snapshot, animatingDifferences: animated). I don't understand what it is telling me and how I should fix it. Any idea?
Replies
4
Boosts
0
Views
1.4k
Activity
Sep ’23
Are App Intents supported on watchOS?
I'm trying to implement App Intents and App Shortcuts on watchOS. To do that, I included my AppIntent and my AppShortcutsProvider to the WatchKit extension target. The intent has one variable parameter: @Parameter(title: "Category", description: "Category", requestValueDialog: "What are you searching for?") var category: String However, when I speak the invocation phrase to Siri on the watch, Siri immediately responds there's something wrong. My perform() method isn't even called and there's nothing in the log. Is this supposed to work? How could I debug this? Is there a sample app showing App Intents on watchOS?
Replies
2
Boosts
4
Views
1.9k
Activity
Jul ’23
IAP Receipt for app bundles
We're validating app receipts and use the original_purchase_date and original_application_version to determine if the user is a legacy user and thus entitled to certain privileges. (We moved from paid to freemium and give legacy users free access to features now requiring a subscription.) Now we're wondering what values the above fields have if the user purchased an app bundle (consisting of two apps). Is the receipt for both apps the same? If yes, which bundle_id and which original_application_version is sent in the receipt? If not, how is original_application_version set? (According to the version of each app at purchase time?) How is original_purchase_date set? (According to the bundle purchase date? Or the first installation date of each app? – one of the apps could be installed much later!)
Replies
3
Boosts
0
Views
2.6k
Activity
Jul ’21