Hi there.
After following the guide on setting up the dependencies for the iOS sdk, the flow would look something like this:
- Create a manager instance:
- Generate an auth token. For this, you should implement a backend endpoint to get the token from Terra using your dev-id, x-api-key and then call this endpoint from your mobile app (protected by your auth). For example
And then request this endpoint from your app and use the token
- Then initialise a connection, which should pull up the HealthKit permissions screen (this only needs to be done once):
- Now request data as desired (ensuring you use swift date objects):