Skip to content

Migrate data from Apple Health to Google Fit (iOS to Android)

License

Notifications You must be signed in to change notification settings

hermuxo/AppleHealth2GoogleFit

Repository files navigation

AppleHealth2GoogleFit

Want to move to Android from iOS but don't want to loose your Apple Health data? This is a simple script to move data from Apple Health to Google Fit.

Currently migrating:

  • Steps
  • Distance
  • Weight

Installation

Install dependencies:

sudo pip install -r requirements.txt

Get Apple Health Data

You need to to export your Apple Health data in XML format. Here are some clues on how to do that:

Get Access to Google Fitness API

Now for the difficult part. Getting a Google Access Token.

Easiest Way:

  1. Got to https://developers.google.com/oauthplayground/
  2. Scroll down and select Fitness v1
  3. Select and Authorize:
  1. Click on Exchange auth code for token
  2. Rename config.py.example to config.py and add the access token

For more details: https://developers.google.com/fit/rest/v1/get-started

Running

python main.py /path/to/export.xml

It takes about 10 minutes for data to show on Google Fit.

About

Migrate data from Apple Health to Google Fit (iOS to Android)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages