I have recently come across a couple of odd HealthKit step samples from WatchOS. They represent step data measured in 2022 by my Apple Watch, but they have a creation date ("Date Added to Health") within the past couple of days. These odd samples show a "View All Quantities" button at the bottom of the sample Details page in the Health app on iOS 26 (which I've never seen before); the button leads to a list of many small step quantities, almost as if some older, smaller samples were consolidated into these newer samples.
Even weirder is that at least some of these samples seem to be getting re-created repeatedly. For example, I've seen the same sample with a "Date Added to Health" of 9/5/25, then 9/8/25, twice on 9/9/25, and twice on 9/10/25.
These samples were originally created by WatchOS 9, and are not being deleted/recreated by any apps on my device. I have only observed it since I updated to the iOS 26 beta (and now the RC); my watch was still running iOS 18 the first time it happened, but it has also happened since my watch was updated to WatchOS 26 beta.
I did some debug printing of the odd samples and the normal samples surrounding them for comparison.
Here's a normal sample:
Sample: 80AC5AC5-CBD7-4581-B275-0C2ACA35B7B4 6 count 80AC5AC5-CBD7-4581-B275-0C2ACA35B7B4, (9.0), "Watch6,1" (9.0) "Apple Watch" (2022-09-15 16:20:14 -0500 - 2022-09-15 16:20:16 -0500)
Device: <<HKDevice: 0x10591eee0>, name:Apple Watch, manufacturer:Apple Inc., model:Watch, hardware:Watch6,1, software:9.0, creation date:2022-08-25 18:22:26 +0000>
Source revision: <HKSourceRevision name:My Apple Watch, bundle:com.apple.health.EE83959D-D009-4BA0-83A5-2E5A1CC05FE6, version:9.0, productType:Watch6,1, operatingSystemVersion:9.0>
Source: <HKSource:0x110588690 "My Apple Watch", bundle identifier: com.apple.health.EE83959D-D009-4BA0-83A5-2E5A1CC05FE6, localDeviceSource: 0, modification date: 2024-01-31 05:49:18 +0000>
Date added: 2022-09-15 21:20:16 +0000
Days between end and add: 0
And here's one of the odd samples:
Sample: 4982487F-1189-4F16-AB00-61E37818A66D 676 count 4982487F-1189-4F16-AB00-61E37818A66D, (9.0), "iPhone12,1" (16.2) "Apple Watch" metadata: {
HKMetadataKeySyncIdentifier = "6:38082859-D9C8-466A-8882-53443B2A2D94:684969619.25569:684970205.31182:119";
HKMetadataKeySyncVersion = 1;
} (2022-09-15 16:20:19 -0500 - 2022-09-15 16:30:05 -0500)
Device: <<HKDevice: 0x10591ce40>, name:Apple Watch, manufacturer:Apple Inc., model:Watch, hardware:Watch6,1, software:9.0, creation date:2022-08-25 18:22:26 +0000>
Source revision: <HKSourceRevision name:My Apple Watch, bundle:com.apple.health.EE83959D-D009-4BA0-83A5-2E5A1CC05FE6, version:9.0, productType:iPhone12,1, operatingSystemVersion:16.2>
Source: <HKSource:0x110588640 "My Apple Watch", bundle identifier: com.apple.health.EE83959D-D009-4BA0-83A5-2E5A1CC05FE6, localDeviceSource: 0, modification date: 2024-01-31 05:49:18 +0000>
Date added: 2025-09-08 21:11:12 +0000
Days between end and add: 1088
Here's that same odd sample a day later, apparently recreated:
Sample: 9E8B12FC-048D-4ECD-BE5B-D387AADE5130 676 count 9E8B12FC-048D-4ECD-BE5B-D387AADE5130, (9.0), "iPhone12,1" (16.2) "Apple Watch" metadata: {
HKMetadataKeySyncIdentifier = "6:38082859-D9C8-466A-8882-53443B2A2D94:684969619.25569:684970205.31182:119";
HKMetadataKeySyncVersion = 1;
} (2022-09-15 16:20:19 -0500 - 2022-09-15 16:30:05 -0500)
Device: <<HKDevice: 0x12f01c4e0>, name:Apple Watch, manufacturer:Apple Inc., model:Watch, hardware:Watch6,1, software:9.0, creation date:2022-08-25 18:22:26 +0000>
Source revision: <HKSourceRevision name:My Apple Watch, bundle:com.apple.health.EE83959D-D009-4BA0-83A5-2E5A1CC05FE6, version:9.0, productType:iPhone12,1, operatingSystemVersion:16.2>
Source: <HKSource:0x12f0f8230 "My Apple Watch", bundle identifier: com.apple.health.EE83959D-D009-4BA0-83A5-2E5A1CC05FE6, localDeviceSource: 0, modification date: 2024-01-31 05:49:18 +0000>
Date added: 2025-09-09 20:53:18 +0000
Days between end and add: 1089
It's worth pointing out some differences between the "normal" and "odd" samples (besides the "View All Quantities" button in the Health app). The recreated "odd" samples have a different Source Revision - the "productType" and "operatingSystemVersion" refer to my iPhone, not the Apple Watch device that actually captured the samples. The odd samples also have metadata keys that don't exist in the other samples - HKMetadataKeySyncIdentifier and HKMetadataKeySyncVersion.
Questions I'm hoping someone can help with:
What are these samples? Why/how do they have a "View All Quantities" button that shows sub-samples?
Is this new to iOS 26?
Why are some of the samples getting recreated multiple times?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I have filed this as FB13722352. I am sharing it here because I haven't seen it mentioned anywhere online yet and am curious if anyone else has run into it.
In Xcode 15.3+, writing data to disk fails when running the tests for a Framework project in a fresh simulator. Specifically, if the selected simulator has never been launched before (i.e. is newly-created), any test execution that attempts to write data into the NSDocumentDirectory directory will fail for a period of time after the simulator is first launched (I've observed between 10s and 20s). After that period of time, the same data write action will succeed. It appears that Xcode 15.3+ is starting test execution too soon, without waiting a sufficient amount of time for the Simulator to fully boot. This issue does not occur in Xcode 15.2 or prior versions.
Since the issue only appears in a fresh (never-before booted) simulator, it is likely to pop up consistently in CI test runs (where simulators are not re-used). This can cause confusion because the same test would not fail locally when re-using an existing simulator.
When the issue appears, the file write API returns the following error:
Domain=NSCocoaErrorDomain Code=4 "The folder “testFile” doesn’t exist." UserInfo={NSFilePath=[...]/data/Documents/testFile, NSUserStringVariant=Folder, NSUnderlyingError= {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"} }
Reproduction Steps:
Open Xcode 15.3 or 15.4. Make sure Simulator.app is closed.
Using the "Devices and Simulators" window, create a new iPhone 15 Pro simulator with iOS 17.4 (other devices and OS versions work as well). Do not launch this new simulator.
Create a new Framework project and add a test that performs and then checks the output of a data write to the Document directory (see example test code below).
Select the new simulator (created in step 2) as the test run target and run the test.
Here's an example test that fails in the scenario outlined above:
- (void)testBasicRepro {
NSString *testString = @"Hello, World!";
NSData *data = [testString dataUsingEncoding:NSUnicodeStringEncoding];
// Get documents directory
NSURL *url = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
NSURL *testFileURL = [url URLByAppendingPathComponent:@"testFile"];
// Write the data
NSError *error;
bool result = [data writeToURL:testFileURL options:NSDataWritingAtomic error:&error];
// Check if it was successful
XCTAssertTrue(result);
XCTAssertNil(error);
XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:testFileURL.path]);
}
Workaround
The workaround that I have come up with is to create a test that runs first (by disabling parallelization and randomization, and making sure the test class filename is alphabetically first). Alternatively, it could be called from the setUp method in any test files that are affected. This test performs a data write and checks the result in a loop in order to block until the data write succeeds (i.e. the Simulator is sufficiently booted for data write operations to complete).
- (void)testWorkaroundBug {
NSString *testString = @"Hello, World!";
NSData *data = [testString dataUsingEncoding:NSUnicodeStringEncoding];
NSError *error;
// Get documents directory
NSURL *documentsURL = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
NSURL *testFileURL;
NSDate *startTime = [NSDate date];
NSLog(@"Starting test at %@", startTime);
for (int i = 0; i < 120; i++) {
// Create unique URL
testFileURL = [documentsURL URLByAppendingPathComponent:[NSString stringWithFormat:@"testFile-%@", @(i)]];
// Write the data
BOOL success = [data writeToURL:testFileURL options:NSDataWritingAtomic error:&error];
// Check if it exists
if (success && [[NSFileManager defaultManager] fileExistsAtPath:testFileURL.path]) {
NSLog(@"Test file %@ was created successfully! Elapsed time %@s", @(i), @(fabs([startTime timeIntervalSinceNow])));
return;
}
else {
NSLog(@"Test file %@ was not created. Error: %@. Sleeping for 0.5s and trying again.", @(i), error);
[NSThread sleepForTimeInterval:0.5];
}
}
}