I once wrote a post about using Shortcuts to sync my fitness records to the status field on my blog.
But in practice, it felt pretty rough. For one thing, the shortcut was so long that tweaking even a small piece of it was an absolute pain. For another, Apple's automation doesn't offer a fixed-time trigger, so to keep syncs running throughout the day I had to set up five or six separate automations. The whole thing was clunky and tedious. So I spent the Chinese New Year holiday building an app that uses HKObserverQuery plus a widget-based scheduled task to push data automatically in the background.



But since I'm on a free Apple developer account, I could only package the app manually as an ipa file and install it through SideStore. That meant that even after declaring the HealthKit entitlements, no health data authorization prompt would appear following installation, and the app couldn't access any health data. I searched around online and found nothing useful, and at one point I figured my only option was to plug my phone into Xcode every week and build to it again just to keep the app alive.
Then I stumbled across this Reddit post, where someone in the comments suggested changing the app's Bundle ID so it uses another existing App ID — essentially impersonating it to get around the problem where an unexpired App ID blocks installation of a new app.
After trying it, this trick also fixes the issue where apps installed via SideStore don't show the health data authorization prompt. It goes like this: change the Bundle ID in the Xcode project to the same App ID that was originally used when SideStore installed the app, then connect a real device in Xcode and run it once so Xcode registers the HealthKit capability for that App ID. At that point, opening the app will bring up the health data authorization prompt as expected, and you can complete the authorization.
Finally, rebuild the app as an ipa and install it again through SideStore, and it can access HealthKit data once authorized. This method lets you get around a restriction that free Apple developer accounts normally face: sideloaded apps don't show the authorization prompt.
Of course, whether authorization obtained this way will hold up long-term remains to be seen. If I get new results down the line, I'll post an update. This method is confirmed to work long-term.