Get data from ios step counter into my game?

Not sure where to post this, but I’ve created an RPG and want to encourage players to walk more while they are offline. So I want to get their total number of steps counted while they are logged out and convert this to an extra currency in the game when they log back in. But I’m not sure where to start. I’m using Playfab for the online part of the game, so I need to get the data from iphone to Playfab.

Edit: Even trialling it with an offline version of the game so the user can get steps tracked to a local version of the game would be an interesting experiment.

I’m using iphone, as there is already a built-in Health app that counts steps each day (plus I have access to a few). But how do I get this data from the phone into the game at log in? I know users can manually export all of the health app data somewhere, then it can be cleaned up and the step count data pulled from it and added to the player’s account data. But I’m not sure that’s the most efficient way. I’m not even sure what to search for to find tutorials.

Hey there @super-squirrel! You aren’t likely to find a tutorial on this subject due to it’s specific nature. I can’t help you too much with integration as it’s going to be a journey, though I can say the healthkit does have an API to request data from it. Though I’m not certain all third party apps can access it.

Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.