Health and Fitness

RSS for tag

Use HealthKit to enable your iOS and watchOS apps to work with the Apple Health app.

Posts under Health and Fitness tag

57 Posts
Sort by:
Post not yet marked as solved
0 Replies
148 Views
Hey! TLDR: How Health app knows the new menstruation cycle started? The API Adding .menstrualFlow (HKCategoryValueMenstrualFlow) samples require HKMetadataKeyMenstrualCycleStart: Bool parameter. It's fairly simple for the consecutive days - the first sample includes true, the rest false. The problem What about more complex scenarios like: 3 days of unspecified samples, then 2 days of none samples, and unspecified sample again. Should it be marked as the new cycle start? I don't want to prompt the user to confirm the new menstruation cycle. Observations I noticed Health app performs some logic under the hood. For instance, when I marked 5 days in a row unspecified, then left 6 days in a row empty, then selected unspecified again, I got 2 menstruation cycles (11 days ago and today). But when I changed the number of the days I marked as unspecified before the gap, or the length of the gap, or edited the cycles further in the past, I ended up having just 1 menstruation cycle. I guess Health app takes into consideration: previous menstruation length, gap length, average cycle length. But what is the exact math here? I don't want to ruin the user's statistics 💚 I found in the user guide this info about the fertility: The fertile window will be the six days you're most likely to be fertile, based on data that you’ve logged about your period or a positive ovulation test result. The fertile window prediction is based on a traditional calendar method. The fertile window is calculated by subtracting 13 days (the luteal phase) from the estimated next cycle start date. So I think something similar might be going on here. Thanks in advance!
Posted Last updated
.
Post not yet marked as solved
1 Replies
258 Views
Hi, I am developing a service that reads data from wearable devices. It should launch the scheduler every 15 min, but however sometimes there is a delay of 1 - 5 minutes, there are days that the scheduler does not run between 23:00 to 7 am, I am using BGAppRefreshTaskRequest. Can someone give me a hand?
Posted Last updated
.
Post not yet marked as solved
0 Replies
160 Views
Dear Apple App Store Team, I am reaching out to seek clarity and guidance specifically regarding the documentation requirements for submitting a research-based healthcare application on the App Store. Our development team is committed to ensuring compliance with all relevant guidelines, and we would appreciate your assistance in understanding the specific documentation needed for these applications. As our application involves collecting data from patients for research purposes, we want to ensure that we provide the necessary documentation to support our submission. Here are the key areas for which we are seeking clarification: Consent Documentation: Any specific forms or templates required to demonstrate the obtaining of informed consent, especially for minors where parental consent is involved. Research Nature, Purpose, and Duration: Guidance on documenting and communicating the nature, purpose, and expected duration of the research to the participants. Procedures, Risks, and Benefits: Clarity on the documentation needed to communicate the research procedures, potential risks, and expected benefits to the participants or users. Confidentiality and Data Handling: Any specific documentation or information required demonstrating how confidentiality will be maintained and how data collected during the research will be handled, including any sharing with third parties. Participant Contact Information: Guidance on providing a point of contact for participant questions and inquiries. Withdrawal Process Information: Documentation needed to explain the withdrawal process for participants who choose to discontinue their involvement in the research. Ethics Review Board Approval: Specific requirements for providing proof of approval from an independent ethics review board, including any templates or forms that may be necessary. Understanding these specific requirements will enable us to compile a comprehensive submission package tailored to the expectations of the App Store review process for research-based applications. We appreciate your attention to this matter and look forward to your guidance. If there are any specific forms or templates that should accompany our submission, kindly let us know. Thank you for your time and assistance. Best regards, Youcef Barkat
Posted
by Youcefbr.
Last updated
.
Post not yet marked as solved
1 Replies
244 Views
iPhone 15 pro max. iOS 17.4 (had to ask here because of normal discussion group rules) This past Monday I checked my rings and they were all closed. On Tuesday I saw that my Monday rings had changed and were now not closed. The recorded data for the day should be enough to make all the rings closed, but it is acting like it reads some small proportion of the data and stops. I've not noticed this behavior on any other day in my fitness history. The move ring stops at about 25% and reports 65/260 cal, but the data shows about the same activity as the day before and the day before closed health also shows Monday had a higher than normal active energy level. The step count is off by an order of magnitude. The recorded data clearly shows 15+ minutes of exercise, but the ring shows 1. My stand graph shows 12 hours, but the ring shows 4. (can't post images to this forum so have to describe). Since then I have tried several things to make it recalculate the data. I've had the iPhone delete all health data and reload from the cloud 3 times. I've reset the phone to factory and reloaded from backup. I turned back time to Sunday evening at 11:58 and let the day turn over and did the same for Monday and it keeps drawing to the same point. I looked at the underlying data in health and nothing about the day seems strange. I tried adding 1000 extra steps to see if that would make the move ring jump any with no effect. Any help or ideas would be appreciated since this anomaly broke my 500 day streak (at 498!) Was sent here when I asked in the general forums and they pointed out I was running public beta, so had to ask here.
Posted
by SFRoberts.
Last updated
.
Post not yet marked as solved
0 Replies
168 Views
When obtaining the running data of the Apple Watch in the health App, the segmented average heart rate obtained is inconsistent with the data displayed in the health App. Have you encountered it?
Posted Last updated
.
Post not yet marked as solved
1 Replies
262 Views
With a web interface and mobile app, a user who buys a subscription through Stripe is automatically created an account that allows them to log in to both the web interface and mobile app. When going through the review, we received a rejection from Apple review team with the requirement to implement in app purchase. I have an already published app with the same functionality where the review team did not require IAP implementation. Does the web interface have to contain 100% of the same features as the mobile app in order for the mobile app to be recognized as a "Read" version and no IAP integration is required? When asked if Stripe can remain available for purchase through the web interface in conjunction with IAP in the mobile app, I received the response "In regards to using Stripe alongside in-app purchases, please note that providing access to mechanisms other than in-app purchases for purchases or subscriptions to be used in the app does not comply with the App Store Review Guidelines." On what basis the subscription purchase in the web interface does not take place, if there are no requirements for mandatory installation of the mobile application and the user can use the web version without installing the mobile application.
Posted Last updated
.
Post not yet marked as solved
0 Replies
260 Views
I have the same issues, when i use HKStatisticsCollectionQuery query user step count, there's a big difference in the number of steps I'm query before and after a minute's interval. 2023-12-17 15:45:41 steps=529 2023-12-17 15:46:52 steps=5817 2023-12-19 19:43:59 steps=2680 2023-12-19 19:44:31 steps=5554 What is causing this issue? I would like some assistance, please.
Posted Last updated
.
Post not yet marked as solved
0 Replies
236 Views
Hi, The fitness features such as distance moved, steps, calories burned is it in HealthKit or in a different kit ? couldn't find any API in HealthKit ? Also for example how can Apple Watch distinguish that this amount of steps was walked and not moved by a slow car or a scoter for example ? Kindest Regards
Posted Last updated
.
Post not yet marked as solved
2 Replies
1.6k Views
I developed an iPhone/Watch app with the single target setting (new method) for Watch app projects, which will be available from Xcode14. This app uses HealthKit to retrieve information such as step count and heart rate from healthcare. The watch app is not independent and requires the iPhone app (companion app). Regarding the permission to access health care, i found some differences from the Old WatchApp Project (application project structure using WatchExtension when Xcode 13.4 or lower is used). This does not occur in the iPhone simulator or watch simulator, but only on the actual device. Both the iPhone app and watch app now display a dialog to allow access to health care In the Old WatchApp Project, if access was granted in either app, the granted access is synchronized. When checking the Health Care access status in the iPhone Settings App, permission settings for both the iPhone app and watch app are displayed independently. Because each permission setting is independent, you can choose to allow access to the iPhone app but not to allow it to the watch app. the Old WatchApp Project, permission settings for the iPhone app and watch app were synchronized, so it was not possible to have different settings for each. These behaviors are not described in the documentation. It would be understandable if the transition from watch "extension" to watch "app" is to split the app into two separate units. However, since there is no official documentation explaining this, i cannot determine whether this is the correct specification or not. Furthermore, since the companion app is required rather than a separate Watch app, having the Health Care permission settings out of sync with the companion app could cause unexpected problems and worsen the user experience. (It would be difficult and cumbersome for the user to know what settings they have made). Is there a solution to synchronize this behavior with the companion app like as the Old WatchApp Project? Do i have to go back to the project configuration (use of watchExtension) before Xcode13? I have prepared a sample project below that can test the above. https://github.com/HayakawaAKIRA/SingleTargetWatchOSApp-HealthKit reference: https://developer.apple.com/videos/play/wwdc2022/10133/ https://developer.apple.com/documentation/watchkit/wkapplication https://developer.apple.com/documentation/healthkit/setting_up_healthkit
Posted Last updated
.
Post not yet marked as solved
0 Replies
273 Views
Even if you have granted read permission for specific health data items (such as walking, weight, etc.), calling the function below will return the permission as 'sharingDenied'. How can I obtain 'sharingAuthorized'? let stepType = HKObjectType.quantityType(forIdentifier: .stepCount)! let authorizationStatus = HKHealthStore().authorizationStatus(for: stepType) //authorizationStatus => sharingDenied
Posted
by sanghong.
Last updated
.
Post not yet marked as solved
0 Replies
321 Views
The app I distribute has a function that retrieves step count information from the "Healthcare" app and displays it on the app, but depending on the device, the step count may not be retrieved. When I checked the settings of the "Healthcare" app, I found that it was properly linked to the app, but for some reason I was unable to retrieve it. Is there any countermeasure in such a case? Is there anyone who has experienced a similar incident?*The same issue occurs even if the device is changed and the same Apple ID is used, so I think it is caused by the Apple ID.
Posted Last updated
.
Post not yet marked as solved
1 Replies
722 Views
I've ran into an error with the insertRouteData function of the HKWorkoutRouteBuilder that I can't seem to find any information on. The error is "Unable to find location series 1A193D3B-AFF5-41D8-A967-B1BE08D9F543 during data insert.". It seems to only happen when trying to insert very long routes, in the most recent case it was a 5 hour bike ride with 5900 samples. I save all the route data in a sqlite table as backup and after checking out the data there isn't any red flags as to why it would not insert correctly. Has anyone seen this before and could offer some insight or point me in the right direction to find the source of the error?
Posted
by Alex89.
Last updated
.
Post not yet marked as solved
0 Replies
325 Views
Hi guys, I'm delveloping an app that use HealthData. I use this data: HKWorkoutType.workoutType(), HKObjectType.quantityType(forIdentifier: .heartRate)!, HKObjectType.quantityType(forIdentifier: .distanceSwimming)! I would like use Simulator to test app, but there aren't data. How can I import data? Now to test my app use only my iPhone, but in this way I don't test multiple device to test my app. Could you help me? Thank you. Filippo
Posted
by gatfil.
Last updated
.
Post not yet marked as solved
4 Replies
858 Views
For some reason I am not receiving HKQuantityTypeIdentifierDistanceSwimming samples when using the watchOS 10 beta (8). The same code works fine on watchOS 9 but not on watchOS 10. I have tried specifically enabling them in the collection types for the live builder and /or starting a query for them, but neither approach is causing any samples to be returned to the app. Is this a known issue? Has something changed for swimming in watchOS 10? Thanks in advance.
Posted
by cfc.
Last updated
.
Post not yet marked as solved
1 Replies
387 Views
When the build a multi-device workout app sample project is ran, there is a problem that stops workouts from being logged with only the watch. When the workout is started from the Apple Watch with the iPhone app closed, you can usually end the workout from the watch in the first few seconds. However, if the workout lasts more than 30 seconds, when the workout is ended via the watch, everything will stall for multiple minutes or indefinitely until the iPhone app is opened. How is it reccommended to fix this issue? It makes the sample project unusable for production as is because many users may want to sometimes log a workout with their watch without the iPhone present. I haven't been able to figure out a good solution, can someone please help with this.
Posted Last updated
.
Post not yet marked as solved
2 Replies
1.3k Views
If a "Minimum Deployment Target" is updated to WatchOS7 on a product(iOS app with a companion watch app) that is already available on the App Store, watches running WatchOS6 will obviously no longer get updates. However, what is the experience for a user who has a WatchOS6 (maybe they own a Series 2) connected to an iPhone with iOS14? Will both the iPhone app and the Watch app stop getting updates? Will the Watch app stop getting updates, but the iPhone app continue receiving them and we have to manage this? Something else? Thanks in advance!
Posted Last updated
.
Post not yet marked as solved
0 Replies
331 Views
At the moment I am working on a small app that retrieves Activities via HealthKit and allows user to trim activities. A typical use case would be when an user forgets to finish / stop an activity recording on his watch. Has anyone experience with submit such kind of apps to the app store. Does apple even allow this kind of feature? It could harm the integrity of health data if not done correctly.
Posted Last updated
.