Post

Replies

Boosts

Views

Activity

CKNotification on watchOS fails to compile because compiler thinks non-optional but it really is
Xcode 14 beta 1 is yelling at me that CKNotification initializer should return a non-optional value. This happens only AFTER letting Xcode upgrade my project settings. The change that the upgrade project settings made was it merged my WatchKit and WatchKit extension targets into a single watch app target. After doing so, this code will not compile which I know to be good. // This line fails to compile with ' if let notification = CKNotification(fromRemoteNotificationDictionary: userInfo) { // Do something } Compile error: "Initializer for conditional binding must have Optional type, not 'CKNotification'" Feedback w/ sysdiagnose: FB10282805 - watchOS / CloudKit: CKNotification doesn't return optional, xcode build failing after updating project settings for Xcode 14 I could not reproduce this in a sample application. I tried making a standalone watch app with Xcode 13, upgrading the project file with Xcode 14 beta, and then creating a CKNotification object--but that worked fine. :/
0
0
874
Jun ’22
Builds from Xcode 14 RC are missing app clip domain status value in App Store Connect
Note: My app is in pre-order status for a version approved against Xcode 13.4.1, the below is for submitting an update with iOS/iPadOS 16 support using Xcode 14 RC released today. Is this happening for anyone else? I just downloaded Xcode 14 RC and archived/uploaded a build. When I select the build in App Store Connect to submit to review, it isn't showing my App Clip domains. When I select a build that was created yesterday with Xcode 14 Beta 6 from Xcode Cloud, the domains show, but for obvious reasons (Xcode beta tools) I cannot submit that build. I'm waiting for Xcode Cloud to add RC to their list and try again, but I'm stuck. I think it is just an App Store Connect issue, because my code is literally unchanged between these two builds less the build version. Furthermore, I inspected the archive locally from Xcode 14 RC and in the validation step, confirmed the entitlement lists my two appclips associated domains in both the app target and app clip target. I created a feedback for this here: FB11471066, FB11335182 Has anyone else had this issue? I know that App Clips was having some issues a few weeks ago but this seems like something entirely different: https://developer.apple.com/forums/thread/712372 Finally, to the last of my ability to troubleshoot, running the Diagnostics under App Clips Testing in the Settings app, I get all green checkmarks for both of my domains--so I really just believe this to be a portal issue and that everything actually checks out.
1
0
2.1k
Dec ’22
Core Location invoking visit callback with dozens of previously delivered visits from the past
I've been getting duplicate visits sent to my CLLocationManagerDelegate. This is new since iOS 16, I did not see this behavior in iOS 15--the observed effect is a quite severe regression in the behavior of CoreLocation. Here is what I'm seeing: The visits have already been delivered When they're sent 'again', they're sent in dozens of callbacks When they're sent 'again', they're sent in batches irrespective of app state I have had a debug app on my phone running since November to capture sysdiagnose for FB12107066. My app simply records data from CoreLocation into a mini Core Data table. Since November 11th, I have had 3808 visits, but when I do some distinct queries on arrival and departure I get a fraction of that. Select distinct arrivalDate: 929 Select distinct departureDate: 799 Select distinct arrivalDate + departureDate: 1172 I wrote some logic to attempt to deduplicate and filter out garbage visits that have already been delivered to me, but my filtering isn't bullet proof. This issue has been happening for me on multiple devices since Nov (iOS 16.2 days?). This happens on an iPhone 13 Pro and an iPad Pro 11-inch (4th gen). This is a real nasty bug as it also keeps waking my app up in the background when I don't expect it to since the OS is delivering me old / replay visits. :/ Has anyone else seen issue with the Core Location Visit API in iOS 16? What deduplication and filtering logic did you come up with? While the issue is affecting me via CoreLocation, I would suspect the same might also occur for anyone using the visits API in SensorKit too.
0
0
997
May ’23
Decoding crash report IPS metadata JSON keys
I've recently started working with IPS files, specifically crash reports. According to the documentation there are a number of metadata keys included in these payloads, however, I have found a number that are present in real ips files from device but are not documented. Does anyone know what version of iOS these 'new' metadata keys were introduced? How about if they're expected or if I should treat them as optional. https://developer.apple.com/documentation/xcode/interpreting-the-json-format-of-a-crash-report#IPS-metadata { "app_name":"ApplicationNameHere", "timestamp":"2024-02-15 08:05:05.00 -0600", "app_version":"1.6.0", "slice_uuid":"6b1f9f4e-3025-364f-9847-914fc1fe14d1", "build_version":"800", "platform":2, "bundleID":"reverse.domainname.bundleidentifier", "share_with_app_devs":1, "is_first_party":0, "bug_type":"309", "os_version":"iPhone OS 17.3.1 (21D61)", "roots_installed":0, "name":"ApplicationNameHere", "incident_id":"1CF0B8A1-EB43-46B3-AA9F-CFA8A9259190" } The following keys are not in the documentation: app_name, os_version, slice_uuid, share_with_app_devs, is_first_party, roots_installed I created this feedback to request the documentation be updated with current state. FB13631161 - Developer Documentation: Update IPS metadata to reflect latest values found in IPS Metadata JSON
1
0
3.5k
Feb ’24
Unable to view artifacts from Xcode Cloud build in Xcode - getting 501 error message
I'm trying to download artifacts from some recent Xcode Cloud builds. In both Xcode and App Store Connect I'm getting errors. Xcode says: "Error Fetching Test Results: API Invalid status code: 501. App Store Connect says: "artifacts could not be found." FB13773789 - Xcode Cloud: Service returning 501 in Xcode when trying to view artifacts of successful build from minutes ago I have tried several projects to rule out project specific issues and it is happening to all of my Xcode Cloud enabled projects. Both Xcode 15.3 and 15.4 beta exhibit this behavior. Is anyone else running into this issue? I noticed it yesterday, and it continues into this morning.
0
0
779
May ’24
SwiftUI SortDescriptor with optional chaining key-path will not archive using Xcode 16 beta 4
I'm running into an error in Xcode 16 beta 4 where the compiler can't type check what appears to be a simple @FetchRequest. I have the following Core Data types: Establishment name website etc. locations (relationship, to many, optional) Location name address establishment (relationship, to one, non-optional) In one of my SwiftUI views I have the following @FetchRequest and SortDescriptors. Unwrap required because 'core data' optional types. It looks based on the swift lang key-path expression docs that this should be allowed. Build and run works, but archiving does not. https://docs.swift.org/swift-book/documentation/the-swift-programming-language/expressions/#Key-Path-Expression In practice it won't be nil and validation should prevent it too so I could force unwrap the relationship property, but, defensive coding I want to make it safe as I can. @FetchRequest( sortDescriptors: [ SortDescriptor(\Location.establishment?.name, order: .forward), SortDescriptor(\Location.city, order: .forward), SortDescriptor(\Location.state, order: .forward) ] ) private var locations: FetchedResults<Location> This worked fine with Xcode 15.x, but fails to archive in Xcode 16 beta 4. The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions When I remove the first sort descriptor it works. When I force unwrap the optional key path property it works. Does anyone know of a documented change that would make this no longer work? FB14515958 - SwiftUI: SortDescriptor cannot archive in Xcode 16 beta 4 but works in Xcode 15.4 For clarity, this archives fine, note the force unwrap. @FetchRequest( sortDescriptors: [ SortDescriptor(\CraftTaproom.brewery!.name, order: .forward), SortDescriptor(\CraftTaproom.city, order: .forward), SortDescriptor(\CraftTaproom.state, order: .forward) ] ) private var taprooms: FetchedResults<CraftTaproom>
0
0
658
Jul ’24
What is the correct way to modify a SceneStorage variable from an AppIntent to one scene only for iPad SplitView mode
Apple's sample code 'Trails' supports multiple scenes, however everything is using shared state across the scenes. Put the app in Split View mode and have two windows of the app running and navigate, you can see both mirror each other. Works as designed, it is using a shared 'navigation model' across all scenes. https://developer.apple.com/documentation/appintents/acceleratingappinteractionswithappintents I would like to know if there is a supported or recommended way to modify individual scene storage from within the perform body of an AppIntent. The objective is to have App Shortcuts that launch different tabs in a TabView or different selections in a List. In short, I want to deep link to features, but account for more than one scene being open on iPad and only have programatic navigation happen on the scene that is 'foremost' or the 'activated' one in Split View. I have it working with either a @Dependency or posting a Notification with my main ContentView listening to the other end, but it changes all scenes.
0
0
710
Aug ’24
Workouts, activity rings, samples and more not syncing across devices running iOS 18 RC and watchOS 11 RC
I noticed last night that workouts I have been recording on my main carry device running 17.6.x have not been syncing to my beta devices running iOS 18 RC, iPadOS 18 RC and watchOS 11 RC. All devices are using the same Apple Account and I have iCloud enabled for Health data. The iPad running the RC has the syncing enabled in Profile. Is anyone else experiencing health data not propagating to the 18.x devices? Some of data exists on all devices but not all. For good measure I left the device unlocked on the health app last night for a long period of time to let it do its thing. This morning the data still hadn't propagated. I disabled and reenabled the synchronization on my iPad having chosen to delete all samples when disabling it. Hopefully all of my data dating back to the first Apple Watch in 2014 restores. FWIW my data set according to iCloud settings my health dataset is just shy of 650 MB. FB15102443 - Health / HealthKit: Workouts, activity rings, sample data, and more not syncing via iCloud to 18 RC device
0
0
656
Sep ’24
HealthKit bugs related to new workout effort score - heart rate samples take forever to fetch, Health app displays invalid data
I am encountering issues on my device running iOS 18 that fetching heart rate samples associated to a given workout is very slow. Like 10+ seconds slow. This is unacceptable and unexpected. In producing a video to attach to a feedback, I also observed that Apple Health app displays incorrect information if a workout effort score is associated to a workout. In this image, you can see the Health app bug: Total Resting Energy != Estimated Workout Effort Score Here is the same workout after I delete the workout effort score using the Apple Health app: Can anyone else see if attempting to view 'heart rate' data within the workout summary in Apple Health is unbearably slow if that workout also has an effort score associated? My steps: Record workout (Apple Activity app on watchOS) Associate effort score View the workout on Apple Health (iOS) Attempt to view it's heart rate samples Observe very slow loading times Observe the incorrect cell label and value and disappearance of resting energy cell data Remove/disassociate the effort score from the workout by tapping the workout effort row, and swipe to delete the value. Navigate back, navigate back, and then go into the workout detail again At this time the UI fixes itself, but the loading of heart rate data is still super slow FB15269657 - HealthKit: Sample query to fetch heart rate samples associated to a workout is taking over 10 seconds - computing 'time in heart rate zone' FB15278790 - Health: Workout summary 'Total Resting Energy' label has value of 'Estimated Workout Effort Score' for a value, pushed view shows empty
0
0
730
Sep ’24
CloudKit production index not being applied to existing records
I created a new index on two record types on Oct 12th. I still cannot query the records using the new queryable index on records that were created before that date. There is no indication in the schema history that the reindexing has started, completed, failed, or still in progress. What is the expectation for new indices being applied to existing records? Well over a week seems unacceptable for a database that has maybe 5000 records across a few record types. When I query my data using an old index and an old record field, I get hundreds of matching results so I know the data is there. FB15554144 - CloudKit / CloudKit Console: PRODUCTION ISSUE - Query against index created two weeks ago not returning all data as expected
1
0
574
Nov ’24
HealthKit - HKWorkoutRouteBuilder never returns from insert when created from newly added iOS HKLiveWorkoutBuilder API on Simulator
Has anyone had success using the HKWorkoutRouteBuilder in conjunction with the new iOS support for HKLiveWorkoutBuilder? I was running my watchOS code that worked now brought over to iOS and when I call insertRouteData the function never returns. This happens for both the legacy and closure based block patterns. private var workoutSession: HKWorkoutSession? private var workoutBuilder: HKLiveWorkoutBuilder? private var serviceSession: CLServiceSession? private var workoutRouteBuilder: HKWorkoutRouteBuilder? private func startRouteBuilder() { Task { @MainActor in self.serviceSession = CLServiceSession(authorization: .whenInUse) self.workoutRouteBuilder = self.workoutBuilder?.seriesBuilder(for: .workoutRoute()) as? HKWorkoutRouteBuilder self.locationUpdateTask = Task { do { for try await update in CLLocationUpdate.liveUpdates(.fitness) { if let location = update.location { self.logger.notice(#function, metadata: [ "location": .stringConvertible(location) ]) try await self.workoutRouteBuilder?.insertRouteData([location]) self.logger.notice("Added location") } } } catch { self.logger.error(#function, metadata: [ "error": .stringConvertible(error.localizedDescription) ]) } } } } I did also try CLLocationManager API with delegate which is what my current watch code uses (a bit old). Same issue. Here is what I've found so far: If the workout session is not running, and if the builder hasn't started collection yet, inserting route data works just fine I've tried different swift language modes, flipped from main actor to non isolated project settings (Xcode 26) Modified Apple's sample code and added location route building to that and reproduced the error, modified sample attached to feedback This issue was identified against Xcode 26 beta 2 and iPhone 16 Pro simulator. Works as expected on my iPhone 13 Pro beta 2. FB18603581 - HealthKit: HKWorkoutRouteBuilder insert call within CLLocationUpdate task never returns
0
0
214
Jul ’25
Strategies for Age Assurance using DeclaredAgeRange when installed via MDM
I develop and maintain an app for craft breweries. It is very clearly 18+ due to frequent references of alcohol. Integrating DeclaredAgeRange is pretty straightforward, I should ask for the age signal, and check / require the user to be 18+ to align with my app terms of service. Under the limit, user declined, and unavailable, YOU SHALL NOT PASS. The moment that I introduce the concept of having an 'admin' or 'brewery mode' of that same public app, things break down. Why? Because I would be enabling this brewery or admin mode to run when the app is installed via MDM, and configured via MDM. The downside of this strategy is that Business Essentials for as long as it has listed, has not supported app-based configuration. Neither the legacy configuration, nor the new ManagedApp framework configuration. FB19980558 - Business Essentials: Add Support for Managed App Configuration (via UserDefaults) and newer Managed App Framework (August 2025) FB13398533 - Business Essentials: Add ability to send managed application configuration to an application installed via Apple Small Business Essentials app (November 2023) FB9967549 - Business Essentials: Add ability to send MDM Configuration payload to MDM managed applications (March 2022) There is a real integration issue when trying to use a public app on MDM devices. Making a fully custom app distribution is an option, then don't do Age Assurance in it, but, that doesn't seem to fit with the new regional requirements because even a Custom App is still distributed using App Store technologies and I don't want to argue semantics and play it safe, and a custom app also introduces additional friction for B2B customers that can't just find it on the App Store to buy licenses for the app. In the context of the app being installed via MDM, the user's age range might not be available, after all the device could be 'supervised' and considered company owned--the user might not even be able to sign in. I could be a warehouse iPad shared amongst workers and not really have a singular 'identity'. I'd like Apple to provide a mechanism to enable developers to make apps that do age assurance for standard downloads via DeclaredAgeRange API as it exists today, and, add support for these MDM based installs. I will assume that the App Configuration solution is out of the picture due to the lack of adoption by MDM vendors, including Business Essentials. So the next best thing would be a configuration profile, either a new restriction, or new enablement, that tells the DeclaredAgeRange system missing details. I can't just assume that if I can detect installed via MDM that it is enough and to allow the user to pass when the age signal comes up as notAvailable. I need to go further because of Apple School Manager. With respect to DeclaredAgeRange and MDM I see these scenarios: Installed via Apple School Manager MDM for K-12 - Minor (student) Installed via Apple School Manager MDM for K-12 - Adult (instructor, older student) Installed via Apple School Manager MDM for College - Minor / Adult (student) Installed via Apple School Manager MDM for College - Adult (student | instructor) Then the business side Installed via Apple Business Manager MDM - Adult (employee) Installed via Apple Business Manager MDM - Minor (younger worker, 16+?) In my particular instance, 18+ app with a hard 'you need to be 18' requirement, I'd only want to allow a pass through and more or less 'AgeRangeDeclaration.verifiedByMDM' or something to that nature. I think that Age Assurance should be built into the platform to support ABM and ASM use cases. Assuming that a personal Apple Account can be used by DeclaredAgeRange API when installed via MDM (user-enrolled or supervised), the argument can easily be made to 'just have the user sign in with a personal account'. But for several reasons this won't be feasible at all times. Either due to device restrictions, or a supervised device is shared amongst employees (brewery warehouse / inventory). FB21340165 - DeclaredAgeRange: Add mechanism to determine that no signal is available due to mdm-based install
0
0
250
Dec ’25
App Store Connect API returning 403 from perfPowerMetrics using Admin / Dev role keys
I'm unexpectedly getting 403 status codes when calling the perfPowerMetrics APIs for any arbitrary app on my account. This worked last week, it is not working now. I have since revoked keys and recreated admin and developer keys--no luck, still getting 403. I've been working with the analytics APIs lately so I don't know exactly when the power and performance API stopped working. I've narrowed it down to something related to the token scope. When I have a scope on this endpoint of "GET /v1/apps/1234567890/perfPowerMetrics" it is rejected -- but the docs say I can create a token and reduce its scope like this. When I remove the scope and let the token be unbounded, the API call returns a valid response. FB22313063 - App Store Connect API: Fetching xcode metrics with an admin key generated token results in a 403 unexpectedly
1
0
203
Mar ’26
CKNotification on watchOS fails to compile because compiler thinks non-optional but it really is
Xcode 14 beta 1 is yelling at me that CKNotification initializer should return a non-optional value. This happens only AFTER letting Xcode upgrade my project settings. The change that the upgrade project settings made was it merged my WatchKit and WatchKit extension targets into a single watch app target. After doing so, this code will not compile which I know to be good. // This line fails to compile with ' if let notification = CKNotification(fromRemoteNotificationDictionary: userInfo) { // Do something } Compile error: "Initializer for conditional binding must have Optional type, not 'CKNotification'" Feedback w/ sysdiagnose: FB10282805 - watchOS / CloudKit: CKNotification doesn't return optional, xcode build failing after updating project settings for Xcode 14 I could not reproduce this in a sample application. I tried making a standalone watch app with Xcode 13, upgrading the project file with Xcode 14 beta, and then creating a CKNotification object--but that worked fine. :/
Replies
0
Boosts
0
Views
874
Activity
Jun ’22
Builds from Xcode 14 RC are missing app clip domain status value in App Store Connect
Note: My app is in pre-order status for a version approved against Xcode 13.4.1, the below is for submitting an update with iOS/iPadOS 16 support using Xcode 14 RC released today. Is this happening for anyone else? I just downloaded Xcode 14 RC and archived/uploaded a build. When I select the build in App Store Connect to submit to review, it isn't showing my App Clip domains. When I select a build that was created yesterday with Xcode 14 Beta 6 from Xcode Cloud, the domains show, but for obvious reasons (Xcode beta tools) I cannot submit that build. I'm waiting for Xcode Cloud to add RC to their list and try again, but I'm stuck. I think it is just an App Store Connect issue, because my code is literally unchanged between these two builds less the build version. Furthermore, I inspected the archive locally from Xcode 14 RC and in the validation step, confirmed the entitlement lists my two appclips associated domains in both the app target and app clip target. I created a feedback for this here: FB11471066, FB11335182 Has anyone else had this issue? I know that App Clips was having some issues a few weeks ago but this seems like something entirely different: https://developer.apple.com/forums/thread/712372 Finally, to the last of my ability to troubleshoot, running the Diagnostics under App Clips Testing in the Settings app, I get all green checkmarks for both of my domains--so I really just believe this to be a portal issue and that everything actually checks out.
Replies
1
Boosts
0
Views
2.1k
Activity
Dec ’22
Core Location invoking visit callback with dozens of previously delivered visits from the past
I've been getting duplicate visits sent to my CLLocationManagerDelegate. This is new since iOS 16, I did not see this behavior in iOS 15--the observed effect is a quite severe regression in the behavior of CoreLocation. Here is what I'm seeing: The visits have already been delivered When they're sent 'again', they're sent in dozens of callbacks When they're sent 'again', they're sent in batches irrespective of app state I have had a debug app on my phone running since November to capture sysdiagnose for FB12107066. My app simply records data from CoreLocation into a mini Core Data table. Since November 11th, I have had 3808 visits, but when I do some distinct queries on arrival and departure I get a fraction of that. Select distinct arrivalDate: 929 Select distinct departureDate: 799 Select distinct arrivalDate + departureDate: 1172 I wrote some logic to attempt to deduplicate and filter out garbage visits that have already been delivered to me, but my filtering isn't bullet proof. This issue has been happening for me on multiple devices since Nov (iOS 16.2 days?). This happens on an iPhone 13 Pro and an iPad Pro 11-inch (4th gen). This is a real nasty bug as it also keeps waking my app up in the background when I don't expect it to since the OS is delivering me old / replay visits. :/ Has anyone else seen issue with the Core Location Visit API in iOS 16? What deduplication and filtering logic did you come up with? While the issue is affecting me via CoreLocation, I would suspect the same might also occur for anyone using the visits API in SensorKit too.
Replies
0
Boosts
0
Views
997
Activity
May ’23
Decoding crash report IPS metadata JSON keys
I've recently started working with IPS files, specifically crash reports. According to the documentation there are a number of metadata keys included in these payloads, however, I have found a number that are present in real ips files from device but are not documented. Does anyone know what version of iOS these 'new' metadata keys were introduced? How about if they're expected or if I should treat them as optional. https://developer.apple.com/documentation/xcode/interpreting-the-json-format-of-a-crash-report#IPS-metadata { "app_name":"ApplicationNameHere", "timestamp":"2024-02-15 08:05:05.00 -0600", "app_version":"1.6.0", "slice_uuid":"6b1f9f4e-3025-364f-9847-914fc1fe14d1", "build_version":"800", "platform":2, "bundleID":"reverse.domainname.bundleidentifier", "share_with_app_devs":1, "is_first_party":0, "bug_type":"309", "os_version":"iPhone OS 17.3.1 (21D61)", "roots_installed":0, "name":"ApplicationNameHere", "incident_id":"1CF0B8A1-EB43-46B3-AA9F-CFA8A9259190" } The following keys are not in the documentation: app_name, os_version, slice_uuid, share_with_app_devs, is_first_party, roots_installed I created this feedback to request the documentation be updated with current state. FB13631161 - Developer Documentation: Update IPS metadata to reflect latest values found in IPS Metadata JSON
Replies
1
Boosts
0
Views
3.5k
Activity
Feb ’24
Unable to view artifacts from Xcode Cloud build in Xcode - getting 501 error message
I'm trying to download artifacts from some recent Xcode Cloud builds. In both Xcode and App Store Connect I'm getting errors. Xcode says: "Error Fetching Test Results: API Invalid status code: 501. App Store Connect says: "artifacts could not be found." FB13773789 - Xcode Cloud: Service returning 501 in Xcode when trying to view artifacts of successful build from minutes ago I have tried several projects to rule out project specific issues and it is happening to all of my Xcode Cloud enabled projects. Both Xcode 15.3 and 15.4 beta exhibit this behavior. Is anyone else running into this issue? I noticed it yesterday, and it continues into this morning.
Replies
0
Boosts
0
Views
779
Activity
May ’24
SwiftUI SortDescriptor with optional chaining key-path will not archive using Xcode 16 beta 4
I'm running into an error in Xcode 16 beta 4 where the compiler can't type check what appears to be a simple @FetchRequest. I have the following Core Data types: Establishment name website etc. locations (relationship, to many, optional) Location name address establishment (relationship, to one, non-optional) In one of my SwiftUI views I have the following @FetchRequest and SortDescriptors. Unwrap required because 'core data' optional types. It looks based on the swift lang key-path expression docs that this should be allowed. Build and run works, but archiving does not. https://docs.swift.org/swift-book/documentation/the-swift-programming-language/expressions/#Key-Path-Expression In practice it won't be nil and validation should prevent it too so I could force unwrap the relationship property, but, defensive coding I want to make it safe as I can. @FetchRequest( sortDescriptors: [ SortDescriptor(\Location.establishment?.name, order: .forward), SortDescriptor(\Location.city, order: .forward), SortDescriptor(\Location.state, order: .forward) ] ) private var locations: FetchedResults<Location> This worked fine with Xcode 15.x, but fails to archive in Xcode 16 beta 4. The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions When I remove the first sort descriptor it works. When I force unwrap the optional key path property it works. Does anyone know of a documented change that would make this no longer work? FB14515958 - SwiftUI: SortDescriptor cannot archive in Xcode 16 beta 4 but works in Xcode 15.4 For clarity, this archives fine, note the force unwrap. @FetchRequest( sortDescriptors: [ SortDescriptor(\CraftTaproom.brewery!.name, order: .forward), SortDescriptor(\CraftTaproom.city, order: .forward), SortDescriptor(\CraftTaproom.state, order: .forward) ] ) private var taprooms: FetchedResults<CraftTaproom>
Replies
0
Boosts
0
Views
658
Activity
Jul ’24
What is the correct way to modify a SceneStorage variable from an AppIntent to one scene only for iPad SplitView mode
Apple's sample code 'Trails' supports multiple scenes, however everything is using shared state across the scenes. Put the app in Split View mode and have two windows of the app running and navigate, you can see both mirror each other. Works as designed, it is using a shared 'navigation model' across all scenes. https://developer.apple.com/documentation/appintents/acceleratingappinteractionswithappintents I would like to know if there is a supported or recommended way to modify individual scene storage from within the perform body of an AppIntent. The objective is to have App Shortcuts that launch different tabs in a TabView or different selections in a List. In short, I want to deep link to features, but account for more than one scene being open on iPad and only have programatic navigation happen on the scene that is 'foremost' or the 'activated' one in Split View. I have it working with either a @Dependency or posting a Notification with my main ContentView listening to the other end, but it changes all scenes.
Replies
0
Boosts
0
Views
710
Activity
Aug ’24
Workouts, activity rings, samples and more not syncing across devices running iOS 18 RC and watchOS 11 RC
I noticed last night that workouts I have been recording on my main carry device running 17.6.x have not been syncing to my beta devices running iOS 18 RC, iPadOS 18 RC and watchOS 11 RC. All devices are using the same Apple Account and I have iCloud enabled for Health data. The iPad running the RC has the syncing enabled in Profile. Is anyone else experiencing health data not propagating to the 18.x devices? Some of data exists on all devices but not all. For good measure I left the device unlocked on the health app last night for a long period of time to let it do its thing. This morning the data still hadn't propagated. I disabled and reenabled the synchronization on my iPad having chosen to delete all samples when disabling it. Hopefully all of my data dating back to the first Apple Watch in 2014 restores. FWIW my data set according to iCloud settings my health dataset is just shy of 650 MB. FB15102443 - Health / HealthKit: Workouts, activity rings, sample data, and more not syncing via iCloud to 18 RC device
Replies
0
Boosts
0
Views
656
Activity
Sep ’24
HealthKit bugs related to new workout effort score - heart rate samples take forever to fetch, Health app displays invalid data
I am encountering issues on my device running iOS 18 that fetching heart rate samples associated to a given workout is very slow. Like 10+ seconds slow. This is unacceptable and unexpected. In producing a video to attach to a feedback, I also observed that Apple Health app displays incorrect information if a workout effort score is associated to a workout. In this image, you can see the Health app bug: Total Resting Energy != Estimated Workout Effort Score Here is the same workout after I delete the workout effort score using the Apple Health app: Can anyone else see if attempting to view 'heart rate' data within the workout summary in Apple Health is unbearably slow if that workout also has an effort score associated? My steps: Record workout (Apple Activity app on watchOS) Associate effort score View the workout on Apple Health (iOS) Attempt to view it's heart rate samples Observe very slow loading times Observe the incorrect cell label and value and disappearance of resting energy cell data Remove/disassociate the effort score from the workout by tapping the workout effort row, and swipe to delete the value. Navigate back, navigate back, and then go into the workout detail again At this time the UI fixes itself, but the loading of heart rate data is still super slow FB15269657 - HealthKit: Sample query to fetch heart rate samples associated to a workout is taking over 10 seconds - computing 'time in heart rate zone' FB15278790 - Health: Workout summary 'Total Resting Energy' label has value of 'Estimated Workout Effort Score' for a value, pushed view shows empty
Replies
0
Boosts
0
Views
730
Activity
Sep ’24
CloudKit production index not being applied to existing records
I created a new index on two record types on Oct 12th. I still cannot query the records using the new queryable index on records that were created before that date. There is no indication in the schema history that the reindexing has started, completed, failed, or still in progress. What is the expectation for new indices being applied to existing records? Well over a week seems unacceptable for a database that has maybe 5000 records across a few record types. When I query my data using an old index and an old record field, I get hundreds of matching results so I know the data is there. FB15554144 - CloudKit / CloudKit Console: PRODUCTION ISSUE - Query against index created two weeks ago not returning all data as expected
Replies
1
Boosts
0
Views
574
Activity
Nov ’24
HealthKit - HKWorkoutRouteBuilder never returns from insert when created from newly added iOS HKLiveWorkoutBuilder API on Simulator
Has anyone had success using the HKWorkoutRouteBuilder in conjunction with the new iOS support for HKLiveWorkoutBuilder? I was running my watchOS code that worked now brought over to iOS and when I call insertRouteData the function never returns. This happens for both the legacy and closure based block patterns. private var workoutSession: HKWorkoutSession? private var workoutBuilder: HKLiveWorkoutBuilder? private var serviceSession: CLServiceSession? private var workoutRouteBuilder: HKWorkoutRouteBuilder? private func startRouteBuilder() { Task { @MainActor in self.serviceSession = CLServiceSession(authorization: .whenInUse) self.workoutRouteBuilder = self.workoutBuilder?.seriesBuilder(for: .workoutRoute()) as? HKWorkoutRouteBuilder self.locationUpdateTask = Task { do { for try await update in CLLocationUpdate.liveUpdates(.fitness) { if let location = update.location { self.logger.notice(#function, metadata: [ "location": .stringConvertible(location) ]) try await self.workoutRouteBuilder?.insertRouteData([location]) self.logger.notice("Added location") } } } catch { self.logger.error(#function, metadata: [ "error": .stringConvertible(error.localizedDescription) ]) } } } } I did also try CLLocationManager API with delegate which is what my current watch code uses (a bit old). Same issue. Here is what I've found so far: If the workout session is not running, and if the builder hasn't started collection yet, inserting route data works just fine I've tried different swift language modes, flipped from main actor to non isolated project settings (Xcode 26) Modified Apple's sample code and added location route building to that and reproduced the error, modified sample attached to feedback This issue was identified against Xcode 26 beta 2 and iPhone 16 Pro simulator. Works as expected on my iPhone 13 Pro beta 2. FB18603581 - HealthKit: HKWorkoutRouteBuilder insert call within CLLocationUpdate task never returns
Replies
0
Boosts
0
Views
214
Activity
Jul ’25
Strategies for Age Assurance using DeclaredAgeRange when installed via MDM
I develop and maintain an app for craft breweries. It is very clearly 18+ due to frequent references of alcohol. Integrating DeclaredAgeRange is pretty straightforward, I should ask for the age signal, and check / require the user to be 18+ to align with my app terms of service. Under the limit, user declined, and unavailable, YOU SHALL NOT PASS. The moment that I introduce the concept of having an 'admin' or 'brewery mode' of that same public app, things break down. Why? Because I would be enabling this brewery or admin mode to run when the app is installed via MDM, and configured via MDM. The downside of this strategy is that Business Essentials for as long as it has listed, has not supported app-based configuration. Neither the legacy configuration, nor the new ManagedApp framework configuration. FB19980558 - Business Essentials: Add Support for Managed App Configuration (via UserDefaults) and newer Managed App Framework (August 2025) FB13398533 - Business Essentials: Add ability to send managed application configuration to an application installed via Apple Small Business Essentials app (November 2023) FB9967549 - Business Essentials: Add ability to send MDM Configuration payload to MDM managed applications (March 2022) There is a real integration issue when trying to use a public app on MDM devices. Making a fully custom app distribution is an option, then don't do Age Assurance in it, but, that doesn't seem to fit with the new regional requirements because even a Custom App is still distributed using App Store technologies and I don't want to argue semantics and play it safe, and a custom app also introduces additional friction for B2B customers that can't just find it on the App Store to buy licenses for the app. In the context of the app being installed via MDM, the user's age range might not be available, after all the device could be 'supervised' and considered company owned--the user might not even be able to sign in. I could be a warehouse iPad shared amongst workers and not really have a singular 'identity'. I'd like Apple to provide a mechanism to enable developers to make apps that do age assurance for standard downloads via DeclaredAgeRange API as it exists today, and, add support for these MDM based installs. I will assume that the App Configuration solution is out of the picture due to the lack of adoption by MDM vendors, including Business Essentials. So the next best thing would be a configuration profile, either a new restriction, or new enablement, that tells the DeclaredAgeRange system missing details. I can't just assume that if I can detect installed via MDM that it is enough and to allow the user to pass when the age signal comes up as notAvailable. I need to go further because of Apple School Manager. With respect to DeclaredAgeRange and MDM I see these scenarios: Installed via Apple School Manager MDM for K-12 - Minor (student) Installed via Apple School Manager MDM for K-12 - Adult (instructor, older student) Installed via Apple School Manager MDM for College - Minor / Adult (student) Installed via Apple School Manager MDM for College - Adult (student | instructor) Then the business side Installed via Apple Business Manager MDM - Adult (employee) Installed via Apple Business Manager MDM - Minor (younger worker, 16+?) In my particular instance, 18+ app with a hard 'you need to be 18' requirement, I'd only want to allow a pass through and more or less 'AgeRangeDeclaration.verifiedByMDM' or something to that nature. I think that Age Assurance should be built into the platform to support ABM and ASM use cases. Assuming that a personal Apple Account can be used by DeclaredAgeRange API when installed via MDM (user-enrolled or supervised), the argument can easily be made to 'just have the user sign in with a personal account'. But for several reasons this won't be feasible at all times. Either due to device restrictions, or a supervised device is shared amongst employees (brewery warehouse / inventory). FB21340165 - DeclaredAgeRange: Add mechanism to determine that no signal is available due to mdm-based install
Replies
0
Boosts
0
Views
250
Activity
Dec ’25
App Store Connect API returning 403 from perfPowerMetrics using Admin / Dev role keys
I'm unexpectedly getting 403 status codes when calling the perfPowerMetrics APIs for any arbitrary app on my account. This worked last week, it is not working now. I have since revoked keys and recreated admin and developer keys--no luck, still getting 403. I've been working with the analytics APIs lately so I don't know exactly when the power and performance API stopped working. I've narrowed it down to something related to the token scope. When I have a scope on this endpoint of "GET /v1/apps/1234567890/perfPowerMetrics" it is rejected -- but the docs say I can create a token and reduce its scope like this. When I remove the scope and let the token be unbounded, the API call returns a valid response. FB22313063 - App Store Connect API: Fetching xcode metrics with an admin key generated token results in a 403 unexpectedly
Replies
1
Boosts
0
Views
203
Activity
Mar ’26