I have previously written an article about using Shortcuts to sync fitness records to the personal status on my blog.
But in practice, it felt very painful. On one hand, because the shortcut was very long, once you needed to adjust any part of it, the operation became extremely cumbersome; on the other hand, Apple's automation didn't have an option for fixed-time automatic execution. To cover the whole day's scheduled sync, you had to create five or six automation tasks. Overall, it was very clunky and tedious. So during the Lunar New Year period, I wrote an app that uses HKObserverQuery + widget timed tasks to achieve automatic background data push.



But since I was using a free Apple Developer account, I could only manually package the app as an ipa file and then install it via SideStore. This meant that even with HealthKit entitlements declared, the health data authorization page would not pop up after installation, making it impossible to access any health data. After searching online, there were no good solutions; I even thought I could only connect to Xcode every week to rebuild and keep the app alive on my phone.
Later, I stumbled upon this Reddit post. In the comments, someone mentioned an idea: by modifying the app's Bundle ID to use another existing App ID as a stand-in, it could bypass the issue of being unable to install a new app because the App ID had not expired.
After trying it out, this method also works for resolving the issue where apps installed via SideStore cannot display the health data authorization. The specific approach is: change the Bundle ID in the Xcode project to the same App ID that was used when first installing the app via SideStore, then connect a real device in Xcode and run it once, allowing Xcode to register the HealthKit capability for this App ID. At this point, opening the app will bring up the health data authorization page normally and complete the authorization.
Finally, rebuild the app as an ipa and install it again via SideStore, and you'll be able to access HealthKit data in the authorized state. This method can, to some extent, bypass the limitation of sideloaded apps from free Apple Developer accounts not showing the authorization page.
Of course, whether the authorization completed this way can be maintained long-term remains to be seen. If there are new results later, I will update. This method has been confirmed to work long-term.